.. _org.freedesktop.portal.Screenshot:

=================================
 Screenshot
=================================

-----------
Description
-----------

.. _org.freedesktop.portal.Screenshot Description:

Portal for taking screenshots

This simple portal lets sandboxed applications request a screenshot.

The screenshot will be made accessible to the application (which
may involve adding it to the :ref:`Documents
portal<org.freedesktop.portal.Documents>`).

This documentation describes **version 2** of this interface.



.. _org.freedesktop.portal.Screenshot Properties:

----------
Properties
----------

.. _org.freedesktop.portal.Screenshot:version:

org.freedesktop.portal.Screenshot:version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    version readable u




.. _org.freedesktop.portal.Screenshot Methods:

-------
Methods
-------

.. _org.freedesktop.portal.Screenshot.Screenshot:

org.freedesktop.portal.Screenshot.Screenshot
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    Screenshot (
      IN parent_window s,
      IN options a{sv},
      OUT handle o
    )



Takes a screenshot.

Supported keys in the ``options`` vardict include:

* ``handle_token`` (``s``)

  A string that will be used as the last element of the ``handle``. Must be a valid
  object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
  more information about the ``handle``.

* ``modal`` (``b``)

  Whether the dialog should be modal. Default is yes.

* ``interactive`` (``b``)

  Hint whether the dialog should offer customization before taking a screenshot.
  Default is no.  **Since version 2.**

The following results get returned via the :ref:`org.freedesktop.portal.Request::Response`
signal:

* ``uri`` (``s``)

  String containing the uri of the screenshot.



parent_window
  Identifier for the application window, see :doc:`window-identifiers`

options
  Vardict with optional further information

handle
  Object path for the :ref:`org.freedesktop.portal.Request` object representing this call



.. _org.freedesktop.portal.Screenshot.PickColor:

org.freedesktop.portal.Screenshot.PickColor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    PickColor (
      IN parent_window s,
      IN options a{sv},
      OUT handle o
    )



Obtains the color of a single pixel.

Supported keys in the ``options`` vardict include:

* ``handle_token`` (``s``)

  A string that will be used as the last element of the ``handle``. Must be a valid
  object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
  more information about the ``handle``.

The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:

* ``color`` (``(ddd)``)

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



parent_window
  Identifier for the application window, see :doc:`window-identifiers`

options
  Vardict with optional further information

handle
  Object path for the :ref:`org.freedesktop.portal.Request` object representing this call


