Gtk.Widget.add_controller

### Method

# Gtk Widgetadd_controller

#### Declaration [src]

    void
    gtk_widget_add_controller (
      GtkWidget* widget,
      GtkEventController* controller
    )

#### Description [src]

Adds `controller` to `widget` so that it will receive events.

You will usually want to call this function right after creating any kind of `GtkEventController`.

#### Parameters

`controller` | `GtkEventController`
| A `GtkEventController` that hasn’t been added to a widget yet.
| The instance takes ownership of the data, and is responsible for freeing it.