### Method

# Foundry Contextual inhibit

#### Declaration [src]

    FoundryInhibitor*
    foundry_contextual_inhibit (
      FoundryContextual* self
      GError** error
    )

#### Description [src]

Creates a new `FoundryInhibitor` that will keep the `FoundryContext` alive and prevent shutdown until `foundry_inhibitor_uninhibit()` is called or the `FoundryInhibitor` is finalized, whichever comes first.

If the context is already in shutdown, then `NULL` is returned and `error` is set.

#### Return value

Type: `FoundryInhibitor`

A `FoundryInhibitor` or `NULL` and `error` is set.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.