Skip to content
Back to top
View this page

# Screenshot

## Description

Screenshot portal backend interface

This screenshot portal lets sandboxed applications request a screenshot.

This documentation describes version 2 of this interface.

## Properties

### org.freedesktop.impl.portal.Screenshot:version

    version readable u

## Methods

### org.freedesktop.impl.portal.Screenshot.Screenshot

    Screenshot (
      IN handle o,
      IN app_id s,
      IN parent_window s,
      IN options a{sv},
      OUT response u,
      OUT results a{sv}
    )

Takes a screenshot.

Supported keys in the `options` vardict include:

- `modal` (`b`)

  Whether the dialog should be modal. Defaults to yes.

- `interactive` (`b`)

  Hint whether the dialog should offer customization before taking a screenshot. Defaults to no.

- `permission_store_checked` (`b`)

  Hint whether the screenshot portal has checked the ‘screenshot’ permission for the requesting app. Defaults to no.

  This option was added in version 2 of this interface.

The following results get returned via the `results` vardict:

- `uri` (`s`)

  A string containing the URI of the screenshot.

handle

  Object path for the Request object representing this call

app_id

  App id of the application

parent_window

  Identifier for the application window, see Window Identifiers

options

  Vardict with optional further information

response

  Numeric response

results

  Vardict with the results of the call

### org.freedesktop.impl.portal.Screenshot.PickColor

    PickColor (
      IN handle o,
      IN app_id s,
      IN parent_window s,
      IN options a{sv},
      OUT response u,
      OUT results a{sv}
    )

Obtains the value of a pixel.

The following results get returned via the `results` vardict:

- `color`` (`(ddd)`)

  The color, RGB values in the range [0,1].

handle

  Object path for the Request object representing this call

app_id

  App id of the application

parent_window

  Identifier for the application window, see Window Identifiers

options

  Vardict with optional further information

response

  Numeric response

results

  Vardict with the results of the call