Panel.Workspace.inhibit

### Method

# Panel Workspaceinhibit

since: 1.4

#### Declaration [src]

    PanelInhibitor*
    panel_workspace_inhibit (
      PanelWorkspace* self,
      GtkApplicationInhibitFlags flags,
      const char* reason
    )

#### Description [src]

Inhibits one or more particular actions in the session.

When the resulting `PanelInhibitor` releases it’s last reference the inhibitor will be dismissed. Alternatively, you may force the release of the inhibit using panel_inhibitor_uninhibit().

Available since: 1.4

#### Parameters

`flags`

  Type: `GtkApplicationInhibitFlags`

  The inhibit flags.

`reason`

  Type: `const char*`

  The reason for the inhibit.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `PanelInhibitor`

A `PanelInhibitor` or `NULL`.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.