File: Windows.Win32.PInvoke.IMM32.dll.g.cs
Project: src\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj (System.Windows.Forms.Primitives)
// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{

	/// <content>
	/// Contains extern methods from "IMM32.dll".
	/// </content>
	internal static partial class PInvoke
	{
		/// <summary>The ImmDestroyContext function (immdev.h) releases the input context and frees associated memory.</summary>
		/// <returns>Returns a nonzero value if successful, or 0 otherwise.</returns>
		/// <remarks>Any application that creates an input context by using the <a href="https://docs.microsoft.com/windows/desktop/api/imm/nf-imm-immcreatecontext">ImmCreateContext</a> function must call this function to free the context before it terminates. However, before calling <b>ImmDestroyContext</b>, the application must remove the input context from any association with windows in the thread by using the <a href="https://docs.microsoft.com/windows/desktop/api/imm/nf-imm-immassociatecontext">ImmAssociateContext</a> function.</remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.Foundation.BOOL ImmDestroyContext(winmdroot.UI.Input.Ime.HIMC param0);

		/// <summary>The ImmAssociateContext function (immdev.h) associates the specified input context with the specified window.</summary>
		/// <returns>Returns the handle to the input context previously associated with the window.</returns>
		/// <remarks>When associating an input context with a window, an application must remove the association before destroying the input context. One way to do this is to save the handle and reassociate it to the default input context with the window.</remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.UI.Input.Ime.HIMC ImmAssociateContext(winmdroot.Foundation.HWND param0, winmdroot.UI.Input.Ime.HIMC param1);

		/// <summary>The ImmCreateContext function (immdev.h) creates a new input context, allocating memory for the context and initializing it.</summary>
		/// <returns>Returns the handle to the new input context if successful, or <b>NULL</b> otherwise.</returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/immdev/nf-immdev-immcreatecontext">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.UI.Input.Ime.HIMC ImmCreateContext();

		/// <summary>The ImmGetContext function (immdev.h) returns the input context associated with the specified window.</summary>
		/// <returns>Returns the handle to the input context.</returns>
		/// <remarks>
		/// <para>An application should routinely use this function to retrieve the current input context before attempting to access information in the context. The application must call <a href="https://docs.microsoft.com/windows/desktop/api/imm/nf-imm-immreleasecontext">ImmReleaseContext</a> when it is finished with the input context.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/immdev/nf-immdev-immgetcontext#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.UI.Input.Ime.HIMC ImmGetContext(winmdroot.Foundation.HWND param0);

		/// <summary>The ImmGetConversionStatus function (immdev.h) retrieves the current conversion status.</summary>
		/// <param name="lpfdwConversion">Pointer to a variable in which the function retrieves a combination of conversion mode values. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Intl/ime-conversion-mode-values">IME Conversion Mode Values</a>.</param>
		/// <param name="lpfdwSentence">Pointer to a variable in which the function retrieves a sentence mode value. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Intl/ime-sentence-mode-values">IME Sentence Mode Values</a>.</param>
		/// <returns>Returns a nonzero value if successful, or 0 otherwise.</returns>
		/// <remarks>Conversion and sentence mode values are set only if the IME supports those modes.</remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern unsafe winmdroot.Foundation.BOOL ImmGetConversionStatus(winmdroot.UI.Input.Ime.HIMC param0, [Optional] winmdroot.UI.Input.Ime.IME_CONVERSION_MODE* lpfdwConversion, [Optional] winmdroot.UI.Input.Ime.IME_SENTENCE_MODE* lpfdwSentence);

		/// <summary>The ImmGetOpenStatus function (immdev.h) determines whether the IME is open or closed.</summary>
		/// <returns>Returns a nonzero value if the IME is open, or 0 otherwise.</returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/immdev/nf-immdev-immgetopenstatus">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.Foundation.BOOL ImmGetOpenStatus(winmdroot.UI.Input.Ime.HIMC param0);

		/// <summary>The ImmNotifyIME function (immdev.h) notifies the IME about changes to the status of the input context.</summary>
		/// <param name="dwAction"></param>
		/// <param name="dwIndex"></param>
		/// <param name="dwValue">Index of a candidate string. The application can set this parameter or ignore it, depending on the value of the <i>dwAction</i> parameter.</param>
		/// <returns>Returns nonzero if successful, or 0 otherwise.</returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/immdev/nf-immdev-immnotifyime">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.Foundation.BOOL ImmNotifyIME(winmdroot.UI.Input.Ime.HIMC param0, winmdroot.UI.Input.Ime.NOTIFY_IME_ACTION dwAction, winmdroot.UI.Input.Ime.NOTIFY_IME_INDEX dwIndex, uint dwValue);

		/// <summary>The ImmReleaseContext function (immdev.h) releases the input context and unlocks the memory associated in the input context.</summary>
		/// <returns>Returns a nonzero value if successful, or 0 otherwise.</returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/immdev/nf-immdev-immreleasecontext">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.Foundation.BOOL ImmReleaseContext(winmdroot.Foundation.HWND param0, winmdroot.UI.Input.Ime.HIMC param1);

		/// <summary>The ImmSetConversionStatus function (immdev.h) sets the current conversion status.</summary>
		/// <returns>Returns a nonzero value if successful, or 0 otherwise.</returns>
		/// <remarks>
		/// <para>This function sends the <a href="https://docs.microsoft.com/windows/desktop/Intl/imn-setconversionmode">IMN_SETCONVERSIONMODE</a> and <a href="https://docs.microsoft.com/windows/desktop/Intl/imn-setsentencemode">IMN_SETSENTENCEMODE</a> commands to the application. <div class="alert"><b>Note</b>  <b>Beginning with Windows 8:</b> By default, the input switch is set per user instead of per thread. The Microsoft IME (Japanese) respects the mode globally, and therefore  <b>ImmSetConversionStatus</b> fails when getting focus.</div> <div> </div></para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/immdev/nf-immdev-immsetconversionstatus#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.Foundation.BOOL ImmSetConversionStatus(winmdroot.UI.Input.Ime.HIMC param0, winmdroot.UI.Input.Ime.IME_CONVERSION_MODE param1, winmdroot.UI.Input.Ime.IME_SENTENCE_MODE param2);

		/// <summary>The ImmSetOpenStatus function (immdev.h) opens or closes the IME.</summary>
		/// <returns>Returns a nonzero value if successful, or 0 otherwise.</returns>
		/// <remarks>This function causes an <a href="https://docs.microsoft.com/windows/desktop/Intl/imn-setopenstatus">IMN_SETOPENSTATUS</a> command to be sent to the application.</remarks>
		[DllImport("IMM32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.Foundation.BOOL ImmSetOpenStatus(winmdroot.UI.Input.Ime.HIMC param0, winmdroot.Foundation.BOOL param1);
	}
}