mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
df562dd251
- For cursors that are embedded in libcef.dll the OnCursorChange method is passing in IntPtr.Zero so we're unable to load the cursor. This commit adds a manual mapping of CursorType to resource Id and loads the cursors manually - Adds a basic test to assert the cursors load, should validate if the resource ids change This needs to be fixed upstream https://bitbucket.org/chromiumembedded/cef/issues/3270/osr-pan-icon-missing-when-pressing-the Test url https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#values Issue #4021
48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
// Copyright © 2020 The CefSharp Authors. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
//NOTE:Classes in the CefSharp.Core namespace have been hidden from intellisnse so users don't use them directly
|
|
|
|
using System;
|
|
|
|
namespace CefSharp
|
|
{
|
|
/// <summary>
|
|
/// Native static methods for low level operations, memory copy
|
|
/// Avoids having to P/Invoke as we can call the C++ API directly.
|
|
/// </summary>
|
|
public static class NativeMethodWrapper
|
|
{
|
|
public static void MemoryCopy(IntPtr dest, IntPtr src, int numberOfBytes)
|
|
{
|
|
CefSharp.Core.NativeMethodWrapper.MemoryCopy(dest, src, numberOfBytes);
|
|
}
|
|
|
|
public static bool IsFocused(IntPtr handle)
|
|
{
|
|
return CefSharp.Core.NativeMethodWrapper.IsFocused(handle);
|
|
}
|
|
|
|
public static void SetWindowPosition(IntPtr handle, int x, int y, int width, int height)
|
|
{
|
|
CefSharp.Core.NativeMethodWrapper.SetWindowPosition(handle, x, y, width, height);
|
|
}
|
|
|
|
public static void SetWindowParent(IntPtr child, IntPtr newParent)
|
|
{
|
|
CefSharp.Core.NativeMethodWrapper.SetWindowParent(child, newParent);
|
|
}
|
|
|
|
public static void RemoveExNoActivateStyle(IntPtr browserHwnd)
|
|
{
|
|
CefSharp.Core.NativeMethodWrapper.RemoveExNoActivateStyle(browserHwnd);
|
|
}
|
|
|
|
public static IntPtr LoadCursorFromLibCef(int resourceIdentifier)
|
|
{
|
|
return CefSharp.Core.NativeMethodWrapper.LoadCursorFromLibCef(resourceIdentifier);
|
|
}
|
|
}
|
|
}
|