Skip to content

Commit f6b5787

Browse files
committed
Merge pull request #1044 from cuddlyogre/cursor-type
SetCursor CefCursorType parameter
2 parents 29f8021 + d0e7042 commit f6b5787

File tree

6 files changed

+59
-4
lines changed

6 files changed

+59
-4
lines changed

CefSharp.Core/Internals/RenderClientAdapter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ namespace CefSharp
174174
virtual DECL void OnCursorChange(CefRefPtr<CefBrowser> browser, CefCursorHandle cursor, CursorType type,
175175
const CefCursorInfo& custom_cursor_info) OVERRIDE
176176
{
177-
_renderWebBrowser->SetCursor((IntPtr)cursor);
177+
_renderWebBrowser->SetCursor((IntPtr)cursor, (CefSharp::CefCursorType)type);
178178
};
179179

180180
private:

CefSharp.OffScreen/ChromiumWebBrowser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ void IRenderWebBrowser.InvokeRenderAsync(BitmapInfo bitmapInfo)
422422
}
423423
}
424424

425-
void IRenderWebBrowser.SetCursor(IntPtr cursor)
425+
void IRenderWebBrowser.SetCursor(IntPtr handle, CefCursorType type)
426426
{
427427
}
428428

CefSharp.Wpf/ChromiumWebBrowser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void IRenderWebBrowser.SetPopupIsOpen(bool isOpen)
295295
UiThreadRunAsync(() => { popup.IsOpen = isOpen; });
296296
}
297297

298-
void IRenderWebBrowser.SetCursor(IntPtr handle)
298+
void IRenderWebBrowser.SetCursor(IntPtr handle, CefCursorType type)
299299
{
300300
UiThreadRunAsync(() =>
301301
{

CefSharp/CEFCursorType.cs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
2+
//
3+
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4+
5+
namespace CefSharp
6+
{
7+
public enum CefCursorType
8+
{
9+
Pointer = 0,
10+
Cross,
11+
Hand,
12+
IBeam,
13+
Wait,
14+
Help,
15+
EastResize,
16+
NorthResize,
17+
NortheastResize,
18+
NorthwestResize,
19+
SouthResize,
20+
SoutheastResize,
21+
SouthwestResize,
22+
WestResize,
23+
NorthSouthResize,
24+
EastWestResize,
25+
NortheastSouthwestResize,
26+
NorthwestSoutheastResize,
27+
ColumnResize,
28+
RowResize,
29+
MiddlePanning,
30+
EastPanning,
31+
NorthPanning,
32+
NortheastPanning,
33+
NorthwestPanning,
34+
SouthPanning,
35+
SoutheastPanning,
36+
SouthwestPanning,
37+
WestPanning,
38+
Move,
39+
VerticalText,
40+
Cell,
41+
ContextMenu,
42+
Alias,
43+
Progress,
44+
NoDrop,
45+
Copy,
46+
None,
47+
NotAllowed,
48+
ZoomIn,
49+
ZoomOut,
50+
Grab,
51+
Grabbing,
52+
Custom,
53+
}
54+
}

CefSharp/CefSharp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
<Compile Include="DefaultResourceHandlerFactory.cs" />
9494
<Compile Include="DependencyChecker.cs" />
9595
<Compile Include="IJavascriptCallback.cs" />
96+
<Compile Include="CefCursorType.cs" />
9697
<Compile Include="Internals\IntPtrExtensions.cs" />
9798
<Compile Include="Internals\JavascriptCallbackProxy.cs" />
9899
<Compile Include="Internals\JavascriptCallback.cs" />

CefSharp/Internals/IRenderWebBrowser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public interface IRenderWebBrowser : IWebBrowserInternal
1313
BitmapInfo CreateBitmapInfo(bool isPopup);
1414
void InvokeRenderAsync(BitmapInfo bitmapInfo);
1515

16-
void SetCursor(IntPtr cursor);
16+
void SetCursor(IntPtr cursor, CefCursorType type);
1717

1818
void SetPopupIsOpen(bool show);
1919
void SetPopupSizeAndPosition(int width, int height, int x, int y);

0 commit comments

Comments
 (0)