Comments (8)
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.
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.
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.
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.
As long as we're ok deviating from the headers, we can change it back to int.
from win32metadata.
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.
Everything looks correct to me in the latest builds.
from win32metadata.
Okay, thank you for the quick response. I will cast the values.
from win32metadata.
Related Issues (20)
- IXpsOMGeometryFigure::SetSegments definition is wrong HOT 2
- `RAIIFree` implies `InvalidHandleValue` HOT 3
- `RAIIFree` functions have wrong type HOT 2
- `EventRegister` needs handle type HOT 1
- DWRITE_PAINT_FEATURE_LEVEL is defined twice with one definition that's wrong HOT 1
- `ICERR_*` constants should be typed as `LRESULT` HOT 1
- Determine if we need to do something re: nonmoveable structures
- Need Rust bindings for bcrypt_provider.h and ncrypt_provider.h HOT 6
- `BCRYPT_HANDLE` should not have a `RAIIFree` attribute HOT 2
- Update to latest D3D12 Agility SDK 1.614.0 HOT 1
- Legacy Direct3D Versions (2-8) Support
- Missing unsafe context/modifier when parsing SslGetCipherSuitePRFHashAlgorithm
- Recognize COM _NewEnum method as IEnumerable HOT 8
- Make more structs AnyCPU-compatible by ignoring non-default StructLayout Packing when it makes no layout difference HOT 1
- It would be nice to have an `impl From<DEVPROPKEY> for PROPERTYKEY` HOT 1
- Generate xmldoc descriptions for enum values HOT 1
- Emit handles as void* not IntPtr HOT 3
- NCRYPT_SSL_FUNCTION_TABLE/SslGetCipherSuitePRFHashAlgorithmFn doesn't exist HOT 6
- Inconsistent const in parameters of RmRegisterResources
- RM_PROCESS_INFO::TSSessionId is unsigned but RM_INVALID_TS_SESSION is signed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from win32metadata.