dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.12k stars 222 forks source link

Asking for support of Magnification.dll #336

Closed aadfPT closed 7 years ago

aadfPT commented 7 years ago

It's an important dll for accessibility apps.

More information here https://msdn.microsoft.com/en-us/library/windows/desktop/ms692162(v=vs.85).aspx

Cheers

AArnott commented 7 years ago

I'll add the library stub and a few functions, but we'll probably need to rely on community contributions to fill out the library based on which functions are most popular.

aadfPT commented 7 years ago

Thank you.

AArnott commented 7 years ago

I may have inadvertently deleted a comment you made, @aadfPT. If so, I apologize. Can you reproduce?

aadfPT commented 7 years ago

You did not. I was including the whole header file from the windows kit, but then decided not to, and edited the comment. Here it is magnification.txt.

aadfPT commented 7 years ago

Thank you for your work.

aadfPT commented 7 years ago

It still hasn't published to NuGet. Do I just have to wait, or did something fail in an otherwise automated process? https://www.nuget.org/packages/PInvoke.Magnification

AArnott commented 7 years ago

We haven't published to nuget.org yet. Can you confirm that the work I did is complete enough for you to use? I only implemented some of the methods and some of the structs are not fully implemented. If it's enough for you, I'll publish. Otherwise, please specify which methods you use that are missing and we can prioritize filling those in first.

aadfPT commented 7 years ago

Short version: I'm missing MagSetFullscreenTransform.

Long Version: The reason I first looked into this was to have an application similar to zoomit, but that would zoom the desktop without requiring entering modes. I would use just a key combination to zoom in and another to zoom out. I made a quick poc in c++ and the functions I needed were MagInitialize to set it up, MagSetFullscreenTransform to set the zoom level and MagUninitialize to clean up. Future versions would probably require MagSetInputTransform and MagGetInputTransform to allow pen interactions although I don't need it myself.

AArnott commented 7 years ago

OK, I've added the function you were missing in 22a8ca3.

I'll prepare to release an update to nuget.org

aadfPT commented 7 years ago

Thank you.

Here it is in use https://github.com/aadfPT/ZoomAssistant

AArnott commented 7 years ago

Nice. Note you can change

PInvoke.Magnification.MagInitialize();

to just

Magnification.MagInitialize();