以下是 IDirectManipulationViewport 接口的简要说明:
interface IDirectManipulationViewport : IUnknown
{
STDMETHOD(Enable)(void) PURE;
STDMETHOD(Disable)(void) PURE;
STDMETHOD(SetViewportRect)(const RECT *viewport) PURE;
STDMETHOD(SetViewportTransform)(const float *matrix, DWORD pointCount) PURE;
STDMETHOD(EnableSnapping)(BOOL enable) PURE;
STDMETHOD(SetSnapInterval)(DM_SNAPPOINT point, float interval) PURE;
STDMETHOD(SetSnapCoordinate)(DM_SNAPPOINT point, float coordinate) PURE;
STDMETHOD(SetZoomBoundaries)(float zoomMinimum, float zoomMaximum) PURE;
STDMETHOD(SetContent)(IUnknown *content) PURE;
STDMETHOD(AddConfiguration)(HWND window, IDirectManipulationFrameInfoProvider *info) PURE;
STDMETHOD(RemoveConfiguration)(HWND window) PURE;
STDMETHOD(Activate)(void) PURE;
STDMETHOD(Deactivate)(void) PURE;
STDMETHOD(GetStatus)(DIRECTMANIPULATION_STATUS *status) PURE;
STDMETHOD(GetTag)(UINT32 *tag) PURE;
STDMETHOD(SetTag)(UINT32 tag) PURE;
STDMETHOD(GetInputMode)(DIRECTMANIPULATION_INPUT_MODE *mode) PURE;
STDMETHOD(SetInputMode)(DIRECTMANIPULATION_INPUT_MODE mode) PURE;
STDMETHOD(Flush)() PURE;
STDMETHOD(GetPerformanceCounters)(DIRECTMANIPULATION_PERFORMANCE_COUNTERS *counters) PURE;
STDMETHOD(GetDiagnostic)(DIRECTMANIPULATION_DIAGNOSTIC *diagnostic) PURE;
};
这个接口提供了一系列方法,可以启用或禁用视口、设置视口矩形、变换等操作,以及配置 DirectManipulation 的一些参数。这些方法允许你更好地控制用户界面上的手势交互。
请注意,使用这些 API 需要了解 DirectManipulation 框架和相关概念。你可能需要查阅 Microsoft 的官方文档以获取更详细的信息和示例代码。
转载请注明出处:http://www.zyzy.cn/article/detail/26824/Win32 API/Directmanipulation.h/IDirectManipulationViewport