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

# XmImSetXIC(3)

An input manager function that registers an existing XIC with a widget

## NAME

**XmImSetXIC** — An input manager function that registers an existing XIC with a widget

## SYNOPSIS

```
#include <Xm/XmIm.h>
XIC XmImSetXIC(
Widget widget,
XIC xic);
```

## DESCRIPTION

**XmImSetXIC** registers the specified X Input Context (XIC) with *widget*. Any existing XIC registered for *widget* is unregistered. The new XIC registered for *widget* is returned.

If *xic* was not created by **XmImGetXIC** or **XmImRegister**, it will not be subject to closing activities when it has no widgets registered with it.

- *widget*

  Specifies the ID of a widget for which a new Input Context is to be registered.

- *xic*

  Specifies the Input Context to be registered with the widget. If *xic* is NULL, the function returns the current **XIC** used by *widget*.

## RETURN

Returns the new XIC registered for *widget*. The application is responsible for freeing the returned XIC. To free the XIC, call **XmImFreeXIC**.

## RELATED

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