sharpdx/SharpDX — pull request #320 by zhuman (2014-03-26 09:10:38+00:00)
Title: Add support for DirectComposition and DirectManipulation

I'd like to propose adding the following assemblies to SharpDX, both wrappers for APIs added in Windows 8 and further updated in 8.1:
* [DirectComposition](http://msdn.microsoft.com/en-us/library/windows/desktop/hh437371%28v=vs.85%29.aspx)
* Allows highly performant bitmap compositing by leveraging DWM. You can build visual trees made up of combinations of D3D swapchains, classic HWNDs, layered HWNDs, static textures, virtualized textures, animations, and more.
* This implementation has undergone a good bit of testing (although this pull request does not include any samples - I can add some later)
* I've included a few Win32 utility functions implemented as static functions of DesktopDevice which make it much easier to use DComp in existing Windows apps.
* The existing animation library works well with DComp for more complicated storyboarded animations.
* [DirectManipulation](http://msdn.microsoft.com/en-us/library/windows/desktop/hh446969%28v=vs.85%29.aspx)
* Provides extremely low-latency touch processing.
* Integrates closely with DirectComposition, which is why I developed them together. You can hook up DComp as the compositor backend and get buttery smooth touch gesture support for your visual tree.
* Not very heavily tested, still missing callbackable interface wrappers for some of the event callbacks. I'm planning on adding these in another pull request, but I think the current library is already useful. I also plan on adding some samples.

In order to add these APIs, I made a few modifications to the SharpGen utility and the docs processor. The most notable change is that function overloads in COM interfaces are not laid out the same way with MSVC as compared to GCC. Therefore, I added code to re-sort the methods based on MSVC's layout algorithm. This was never an issue before because overloads aren't generally used with COM, but DComp has quite a few overloaded functions.

As an aside, in case it's unclear from the MSDN docs, both DirectComposition and DirectManipulation are important low-level frameworks underlying all of the Win8+ XAML and IE rendering/input stacks.