예제 #1
0
 /// <summary>
 /// <p>Creates an Interaction/InputSink to route mouse button down and any  subsequent move and up events to the given <see cref = "System.IntPtr"/>. There is no move  thresholding; when enabled, all events including and following the down  are unconditionally redirected to the specified window. After calling this  API, the device owning the visual must be committed.</p>
 /// </summary>
 /// <param name = "visual"><dd>  <p>The visual to route messages from.</p> </dd></param>
 /// <param name = "hwnd"><dd>  <p>The <see cref = "System.IntPtr"/> to route messages to.</p> </dd></param>
 /// <param name = "enable"><dd>  <p>Boolean value indicating whether to enable or disable routing.</p> </dd></param>
 /// <returns><p>If this function succeeds, it returns <strong><see cref = "SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref = "SharpDX.Result"/></strong> error code.</p></returns>
 /// <doc-id>mt734228</doc-id>
 /// <unmanaged>HRESULT DCompositionAttachMouseDragToHwnd([In] IDCompositionVisual* visual,[In] HWND hwnd,[In] BOOL enable)</unmanaged>
 /// <unmanaged-short>DCompositionAttachMouseDragToHwnd</unmanaged-short>
 internal static unsafe void AttachMouseDragToHwnd(SharpDX.DirectComposition.Visual visual, System.IntPtr hwnd, SharpDX.Mathematics.Interop.RawBool enable)
 {
     System.IntPtr  visual_ = System.IntPtr.Zero;
     SharpDX.Result __result__;
     visual_    = SharpDX.CppObject.ToCallbackPtr <SharpDX.DirectComposition.Visual>(visual);
     __result__ = DCompositionAttachMouseDragToHwnd_((void *)visual_, (void *)hwnd, enable);
     __result__.CheckError();
 }
예제 #2
0
 /// <summary>
 /// <p>Creates a new composition surface object that can be bound to a
 /// Microsoft DirectX swap chain or swap buffer and associated
 /// with a visual.</p>
 /// </summary>
 /// <param name="visual"><dd>  <p>The requested access to the composition surface object. It can be one of the following values:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong></strong></dt> <dt>0x0000L</dt> </dl> </td><td> <p>No access.</p> </td></tr> <tr><td><dl> <dt><strong>COMPOSITIONSURFACE_READ</strong></dt> <dt>0x0001L</dt> </dl> </td><td> <p>Read access. For internal use only.</p> </td></tr> <tr><td><dl> <dt><strong>COMPOSITIONSURFACE_WRITE</strong></dt> <dt>0x0002L</dt> </dl> </td><td> <p>Write access. For internal use only.</p> </td></tr> <tr><td><dl> <dt><strong>COMPOSITIONSURFACE_ALL_ACCESS</strong></dt> <dt>0x0003L</dt> </dl> </td><td> <p>Read/write access. Always specify this flag except when duplicating a surface in another process, in which case set <em>desiredAccess</em> to 0.</p> </td></tr> </table> <p>?</p> </dd></param>
 /// <param name="hwnd"><dd>  <p>Contains the security descriptor for the composition surface object, and specifies whether the handle of the composition surface object is inheritable when a child process is created. If this parameter is <c>null</c>, the composition surface object is created with default security attributes  that grant read and write access to the current process,  but do not enable child processes to  inherit the handle.</p> </dd></param>
 /// <param name="enable"><dd>  <p>The handle of the new composition surface object. This parameter must not be <c>null</c>.</p> </dd></param>
 /// <returns><p>If the function succeeds, it returns <see cref="SharpDX.Result.Ok"/>. Otherwise, it returns an <strong><see cref="SharpDX.Result"/></strong> error code. See DirectComposition Error Codes for a list of error codes.  </p></returns>
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DCompositionAttachMouseWheelToHwnd']/*"/>
 /// <msdn-id>hh437360</msdn-id>
 /// <unmanaged>HRESULT DCompositionAttachMouseWheelToHwnd([In] IDCompositionVisual* visual,[In] HWND hwnd,[In] BOOL enable)</unmanaged>
 /// <unmanaged-short>DCompositionAttachMouseWheelToHwnd</unmanaged-short>
 internal static void AttachMouseWheelToHwnd(SharpDX.DirectComposition.Visual visual, System.IntPtr hwnd, SharpDX.Mathematics.Interop.RawBool enable)
 {
     unsafe {
         SharpDX.Result __result__;
         __result__ =
             DCompositionAttachMouseWheelToHwnd_((void *)((visual == null)?IntPtr.Zero:visual.NativePointer), (void *)hwnd, enable);
         __result__.CheckError();
     }
 }