• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dapplo / Dapplo.Windows / 22359276833

24 Feb 2026 04:08PM UTC coverage: 32.763% (-0.04%) from 32.805%
22359276833

push

github

Lakritzator
Removed project from sln, as it somehow didn't compile.

617 of 2002 branches covered (30.82%)

Branch coverage included in aggregate %.

1698 of 5064 relevant lines covered (33.53%)

30.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.64
/src/Dapplo.Windows.User32/Structs/CursorInfo.cs
1
// Copyright (c) Dapplo and contributors. All rights reserved.
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3

4
using System;
5
using System.Runtime.InteropServices;
6
using Dapplo.Windows.Common.Structs;
7
using Dapplo.Windows.User32.Enums;
8

9
namespace Dapplo.Windows.User32.Structs;
10

11
/// <summary>
12
/// See <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms648381(v=vs.85).aspx"></a>
13
/// </summary>
14
[StructLayout(LayoutKind.Sequential)]
15
public struct CursorInfo
16
{
17
        /// <summary>
18
        /// Size of the struct
19
        /// </summary>
20
        private int _cbSize;
21

22
        private readonly CursorInfoFlags _flags;
23
        private readonly IntPtr _hCursor;
24
        private readonly NativePoint _ptScreenPos;
25

26

27
        /// <summary>
28
        /// The cursor state, as CursorInfoFlags
29
        /// </summary>
30
        public CursorInfoFlags Flags => _flags;
×
31

32
        /// <summary>
33
        /// Handle (IntPtr) to the Cursor
34
        /// </summary>
35
    public IntPtr CursorHandle => _hCursor;
×
36

37
    /// <summary>
38
    /// A structure that receives the screen coordinates of the cursor.
39
    /// </summary>
40
    public NativePoint Location => _ptScreenPos;
×
41

42
        /// <summary>
43
        /// Gets a value indicating whether the cursor is currently visible.
44
        /// </summary>
45
        public bool IsShowing => _hCursor != IntPtr.Zero && _flags == CursorInfoFlags.Showing;
1!
46

47
        /// <summary>
48
        /// Factory for the structure
49
        /// </summary>
50
        public static CursorInfo Create()
51
        {
52
                var result = new CursorInfo
1✔
53
                {
1✔
54
                        _cbSize = Marshal.SizeOf(typeof(CursorInfo))
1✔
55
                };
1✔
56
                return result;
1✔
57
        }
58
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc