// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
namespace Common.ComInterlop
{
///
/// Enables preview handlers to pass keyboard shortcuts to the host. This interface retrieves a list of keyboard shortcuts and directs the host to handle a keyboard shortcut.
///
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("fec87aaf-35f9-447a-adb7-20234491401a")]
public interface IPreviewHandlerFrame
{
///
/// Gets a list of the keyboard shortcuts for the preview host.
///
/// A pointer to a PREVIEWHANDLERFRAMEINFO structure
/// that receives accelerator table information.
void GetWindowContext(IntPtr pinfo);
///
/// Directs the host to handle an keyboard shortcut passed from the preview handler.
///
/// A reference to that corresponds to a keyboard shortcut.
/// If the keyboard shortcut is one that the host intends to handle, the host will process it and return S_OK(0); otherwise, it returns S_FALSE(1).
[PreserveSig]
uint TranslateAccelerator(ref MSG pmsg);
}
}