---
name: "XmImGetXIC"
section: "3"
platform: "linux"
package: "openmotif"
version: "2.3.8-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XmImGetXIC"
---

# XmImGetXIC(3)

An input manager function that obtains an XIC for a widget

## NAME

**XmImGetXIC** — An input manager function that obtains an XIC for a widget

## SYNOPSIS

```
#include <Xm/XmIm.h>
XIC XmImGetXIC(
Widget widget,
XmInputPolicy input_policy,
ArgList args,
Cardinal num_args);
```

## DESCRIPTION

**XmImGetXIC** creates and registers an X Input Context (XIC) with the specified arguments for *widget*. If **XmINHERIT\_POLICY** is specified for *input\_policy*, a new XIC will be created only if required to by the arguments or by the **VendorShell** input policy. Any existing XIC registered with *widget* is unregistered.

Refer to the **VendorShell** reference page for further details.

- *widget*

  Specifies the ID of a widget for which an Input Context is to be created.

- *input\_policy*

  Specifies the type of input policy. It accepts the following values:

  - **XmINHERIT\_POLICY**

    Inherits the policy from **VendorShell**.

  - **XmPER\_WIDGET**

    Creates a new XIC for this widget.

  - **XmPER\_SHELL**

    Creates a new XIC for the shell, if needed.

- *args*

  Specifies an **XtArgList** parameter to use for creating the XIC.

- *num\_args*

  Specifies the number of arguments in the *args* parameter.

## RETURN

Returns the created XIC. The application is responsible for freeing the returned XIC by calling **XmImFreeXIC**.

## RELATED

[**XmImSetXIC**(3)](/XmImSetXIC/3.md) and [**XmImFreeXIC**(3)](/XmImFreeXIC/3.md).
