feat(tablet): improve Wintab API documentation and add configurable context initialization#100
Conversation
…ontext initialization - Add comprehensive XML documentation to all Wintab structs and methods - Rename struct fields from Hungarian notation (pkX, orAzimuth, axMin) to PascalCase - Add lcOut struct for configurable output coordinate mapping - Make Initialize() accept parameters for context options, packet mode, movement mask, and packet rate - Update TabletManager to use new Initialize signature with default 5000x5000 output extent BREAKING CHANGE: Initialize() now requires lcOut parameter; Packet, Orientation, Rotation, and Axis field names changed to PascalCase
…ontext initialization - Add comprehensive XML documentation to all Wintab structs and methods - Rename struct fields from Hungarian notation (pkX, orAzimuth, axMin) to PascalCase - Add lcOut struct for configurable output coordinate mapping - Make Initialize() accept parameters for context options, packet mode, movement mask, and packet rate - Update TabletManager to use new Initialize signature with default 5000x5000 output extent BREAKING CHANGE: Initialize() now requires lcOut parameter; Packet, Orientation, Rotation, and Axis field names changed to PascalCase
…actor # Conflicts: # src/Shared.Core/Utilities/Tablet.cs
There was a problem hiding this comment.
This seems like a highly breaking change. I'd only merge it if we are sure there are 0 plugins using this. Also the native structs should at least retain the original native member names in their comments.
If only the initialization method is a breaking change then add an obsolete overload without the new parameters for backwards compatibility.
| context.lcPktData = PK_CONTEXT | | ||
| PK_STATUS | | ||
| PK_TIME | | ||
| PK_CHANGED | | ||
| PK_SERIAL_NUMBER | | ||
| PK_CURSOR | | ||
| PK_BUTTONS | | ||
| PK_X | | ||
| PK_Y | | ||
| PK_Z | | ||
| PK_NORMAL_PRESSURE | | ||
| PK_TANGENT_PRESSURE | | ||
| PK_ORIENTATION | | ||
| PK_ROTATION; |
There was a problem hiding this comment.
Why replace this with a magic number?
There was a problem hiding this comment.
mn evaluates to the enum flags, I was gonna all param selection of lcPktData, but then decided against it given that it would cause issues with Packets getting corrupted
| /// <summary> | ||
| /// Handle to the tablet context that generated this packet. | ||
| /// </summary> | ||
| public IntPtr Context; |
There was a problem hiding this comment.
All of those renames are breaking changes too since some of those classes are public. Are you sure no plugin used this API at all?
BREAKING CHANGE: Initialize() now requires lcOut parameter; Packet, Orientation, Rotation, and Axis field names changed to PascalCase