---
name: "Gtk2::IMContext"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::IMContext"
---

# Gtk2::IMContext(3pm)

wrapper for GtkIMContext

## NAME

Gtk2::IMContext - wrapper for GtkIMContext

## HIERARCHY

```
  Glib::Object
  +----Gtk2::IMContext
```

## METHODS

### $context-\>set\_client\_window ($window)

- •

  `$window` (Gtk2::Gdk::Window or undef)

### $context-\>set\_cursor\_location ($area)

- •

  `$area` (Gtk2::Gdk::Rectangle)

### boolean = $context-\>delete\_surrounding ($offset, $n\_chars)

- •

  `$offset` (integer)

- •

  `$n_chars` (integer)

### boolean = $context-\>filter\_keypress ($key\_event)

- •

  `$key_event` (Gtk2::Gdk::Event)

### $context-\>focus\_in

### $context-\>focus\_out

### list = $context-\>get\_preedit\_string

### $context-\>reset

### list = $context-\>get\_surrounding

### $context-\>set\_surrounding ($text, $cursor\_index)

- •

  `$text` (string)

- •

  `$cursor_index` (integer)

### $context-\>set\_use\_preedit ($use\_preedit)

- •

  `$use_preedit` (boolean)

## SIGNALS

- **commit** (Gtk2::IMContext, string)

  - boolean = **delete-surrounding** (Gtk2::IMContext, integer, integer)

  - **preedit-changed** (Gtk2::IMContext)

  - **preedit-end** (Gtk2::IMContext)

  - **preedit-start** (Gtk2::IMContext)

  - boolean = **retrieve-surrounding** (Gtk2::IMContext)

  ## SEE ALSO

Gtk2, Glib::Object

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
