# Class TCEFOSRIMEHandler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFOSRIMEHandler

## Declaration

`type TCEFOSRIMEHandler = class(TObject)`

## Description

Class used to handle the IME window.

## Hierarchy

- TObject
- TCEFOSRIMEHandler

## Overview

### Fields

| `FHWND: HWND;`
| `FCompositionRange: TCefRange;`
| `FCursorIndex: cardinal;`
| `FIMERect: TCefRect;`
| `FSystemCaret: boolean;`
| `FInputLanguageID: LANGID;`
| `FCompositionBounds: TCefRectDynArray;`
| `FIsComposing: boolean;`
| `FIMM32DLL: THandle;`

### Methods

| `function GetPrimaryLangID: word;`
| `function GetSubLangID: word;`
| `function GetInitialized: boolean;`
| `procedure GetCompositionInfo(imc : HIMC; aParam : LPARAM; var composition_text : ustring; var underlines : TCefCompositionUnderlineDynArray; var composition_start : integer);`
| `function GetString(imc : HIMC; aParam : WParam; aType : integer; var aResult : ustring) : boolean;`
| `function IsSelectionAttribute(aAttribute : AnsiChar) : boolean;`
| `procedure GetCompositionSelectionRange(imc : HIMC; var target_start, target_end : cardinal);`
| `procedure GetCompositionUnderlines(imc : HIMC; target_start, target_end : cardinal; var underlines : TCefCompositionUnderlineDynArray);`
| `constructor Create(aHWND : HWND);`
| `destructor Destroy; override;`
| `procedure SetInputLanguage;`
| `procedure CreateImeWindow;`
| `procedure DestroyImeWindow;`
| `procedure CleanupComposition;`
| `procedure ResetComposition;`
| `function GetResult(aParam : LPARAM; var aResult : ustring) : boolean;`
| `function GetComposition(aParam : LPARAM; var composition_text : ustring; var underlines : TCefCompositionUnderlineDynArray; var composition_start : integer) : boolean;`
| `procedure EnableIME;`
| `procedure DisableIME;`
| `procedure CancelIME;`
| `procedure UpdateCaretPosition(index : cardinal);`
| `procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray);`
| `procedure MoveImeWindow;`

### Properties

| `property IsComposing : boolean read FIsComposing;`
| `property InputLanguageID : LANGID read FInputLanguageID;`
| `property PrimaryLangID : word read GetPrimaryLangID;`
| `property SubLangID : word read GetSubLangID;`
| `property Initialized : boolean read GetInitialized;`

## Description

### Fields

| `FHWND: HWND;`
This item has no description.

| `FCompositionRange: TCefRange;`
This item has no description.

| `FCursorIndex: cardinal;`
This item has no description.

| `FIMERect: TCefRect;`
This item has no description.

| `FSystemCaret: boolean;`
This item has no description.

| `FInputLanguageID: LANGID;`
This item has no description.

| `FCompositionBounds: TCefRectDynArray;`
This item has no description.

| `FIsComposing: boolean;`
This item has no description.

| `FIMM32DLL: THandle;`
This item has no description.

### Methods

| `function GetPrimaryLangID: word;`
This item has no description.

| `function GetSubLangID: word;`
This item has no description.

| `function GetInitialized: boolean;`
This item has no description.

| `procedure GetCompositionInfo(imc : HIMC; aParam : LPARAM; var composition_text : ustring; var underlines : TCefCompositionUnderlineDynArray; var composition_start : integer);`
This item has no description.

| `function GetString(imc : HIMC; aParam : WParam; aType : integer; var aResult : ustring) : boolean;`
This item has no description.

| `function IsSelectionAttribute(aAttribute : AnsiChar) : boolean;`
This item has no description.

| `procedure GetCompositionSelectionRange(imc : HIMC; var target_start, target_end : cardinal);`
This item has no description.

| `procedure GetCompositionUnderlines(imc : HIMC; target_start, target_end : cardinal; var underlines : TCefCompositionUnderlineDynArray);`
This item has no description.

| `constructor Create(aHWND : HWND);`
This item has no description.

| `destructor Destroy; override;`
This item has no description.

| `procedure SetInputLanguage;`
Sets InputLanguageID using the name of the active input locale identifier obtained from a GetKeyboardLayoutNameW call. <see href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getkeyboardlayoutnamew">See the GetKeyboardLayoutNameW article.)

| `procedure CreateImeWindow;`
Calls CreateCaret for some languages in order to creates a new shape for the system caret and assigns ownership of the caret to the specified window. <see href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createcaret">See the CreateCaret article.)

| `procedure DestroyImeWindow;`
Calls DestroyCaret for some languages in order to destroy the caret's current shape, frees the caret from the window, and removes the caret from the screen. <see href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-destroycaret">See the DestroyCaret article.)

| `procedure CleanupComposition;`
Cleans up the all resources attached to the given IMM32Manager object, and reset its composition status. <see href="https://learn.microsoft.com/en-us/windows/win32/api/imm/nf-imm-immnotifyime">See the ImmNotifyIME article.)

| `procedure ResetComposition;`
Reset the composition status. Cancel the ongoing composition if it exists.

| `function GetResult(aParam : LPARAM; var aResult : ustring) : boolean;`
Retrieve a composition result of the ongoing composition if it exists.

| `function GetComposition(aParam : LPARAM; var composition_text : ustring; var underlines : TCefCompositionUnderlineDynArray; var composition_start : integer) : boolean;`
Retrieve the current composition status of the ongoing composition. Includes composition text, underline information and selection range in the composition text. IMM32 does not support char selection.

| `procedure EnableIME;`
Enable the IME attached to the given window, i.e. allows user-input events to be dispatched to the IME. In Chromium, this function is used when a renderer process moves its input focus to another edit control, or a renrerer process moves the position of the focused edit control.

| `procedure DisableIME;`
Disable the IME attached to the given window, i.e. prohibits any user-input events from being dispatched to the IME. In Chromium, this function is used when a renreder process sets its input focus to a password input.

| `procedure CancelIME;`
Cancels an ongoing composition of the IME.

| `procedure UpdateCaretPosition(index : cardinal);`
Updates the IME caret position of the given window.

| `procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray);`
Updates the composition range. |selected_range| is the range of characters that have been selected. |character_bounds| is the bounds of each character in view device coordinates.

| `procedure MoveImeWindow;`
Updates the position of the IME windows.

### Properties

| `property IsComposing : boolean read FIsComposing;`
Retrieves whether or not there is an ongoing composition.

| `property InputLanguageID : LANGID read FInputLanguageID;`
The current input Language ID retrieved from Windows used for processing language-specific operations in IME.

| `property PrimaryLangID : word read GetPrimaryLangID;`
Returns the primary language ID based on the InputLanguageID value.

| `property SubLangID : word read GetSubLangID;`
Returns the sublanguage ID based on the InputLanguageID value.

| `property Initialized : boolean read GetInitialized;`
Resturns True if the library was loaded successfully.

Generated by PasDoc 0.16.0-snapshot.