Coder Social home page Coder Social logo

Comments (8)

kennykerr avatar kennykerr commented on June 17, 2024 1

The type is clearly uint - I don't see a compelling reason to change it - the caller is clearly expected to cast a negative value.

from win32metadata.

kennykerr avatar kennykerr commented on June 17, 2024

MOUSEINPUT is originally defined as follows:

typedef struct tagMOUSEINPUT {
    LONG    dx;
    LONG    dy;
    DWORD   mouseData;
    DWORD   dwFlags;
    DWORD   time;
    ULONG_PTR dwExtraInfo;
} MOUSEINPUT, *PMOUSEINPUT, FAR* LPMOUSEINPUT;

The metadata defines it as follows:

public struct MOUSEINPUT
{
	public int dx;
	public int dy;
	public uint mouseData;
	public MOUSE_EVENT_FLAGS dwFlags;
	public uint time;
	public UIntPtr dwExtraInfo;
}

So mouseData looks correct to me.

from win32metadata.

pentamassiv avatar pentamassiv commented on June 17, 2024

It looks like there is a lot of going back and forth between the two types (https://github.com/microsoft/win32metadata/issues?q=is%3Aissue+mouseinput+is%3Aclosed). It was changed to i32 because you have to be able to use negative values to scroll up (#933) and a special case was added to the metadata. Later that seems to have been reverted.

from win32metadata.

kennykerr avatar kennykerr commented on June 17, 2024

Yes, it seems that way. I haven't been tracking that, but I believe the value is correct as of now. I'll transfer to the Win32 metadata repo for their input.

from win32metadata.

mikebattista avatar mikebattista commented on June 17, 2024

As long as we're ok deviating from the headers, we can change it back to int.

from win32metadata.

riverar avatar riverar commented on June 17, 2024

I originally marked it as int long before we had ABI and codegen compatibility concerns/discussions (#889). I now agree this should remain uint and the user should cast.

Metadata currently has this listed as uint, but then we have this in the emitter rsp... 🤔 https://github.com/riverar/win32metadata/blob/master/generation/WinSDK/emitter.settings.rsp#L464. Looks like something we need to clean up.

from win32metadata.

mikebattista avatar mikebattista commented on June 17, 2024

Everything looks correct to me in the latest builds.

from win32metadata.

pentamassiv avatar pentamassiv commented on June 17, 2024

Okay, thank you for the quick response. I will cast the values.

from win32metadata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.