User:Plfiorini/WaylandProtocols/windoweffects.xml

From KDE Community Wiki
<protocol name="windoweffects">
  <copyright>
    Copyright (C) 2014 Pier Luigi Fiorini

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 2.1 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  </copyright>

  <interface name="kf5_window_effects" version="1">
    <enum name="edge">
      <!-- TODO: Do we need noedge? -->
      <entry name="left" value="0"/>
      <entry name="top" value="1"/>
      <entry name="right" value="2"/>
      <entry name="bottom" value="3"/>
    </enum>

    <request name="slide">
      <description name="slide a surface from a location to another">
        Ask the compositor to move the surface from a location to another
        with a slide animation.

        The edge argument provides a clue about where the slide animation
        begins, destination coordinates are specified with x and y.
      </description>
      <arg name="output" type="object" interface="wl_output"/>
      <arg name="surface" type="object" interface="wl_surface"/>
      <arg name="edge" type="uint"/>
      <arg name="x" type="int"/>
      <arg name="y" type="int"/>
    </request>

    <request name="present">
      <description name="present all surfaces specified">
        Tell the compositor to present all surfaces specified here.
      </description>
      <arg name="output" type="object" interface="wl_output"/>
      <!-- XXX: What is controller in KWindowEffects? -->
      <arg name="controller" type="object" interface="wl_surface"/>
      <!-- TODO: How do we specify the list of surfaces?
                 IMHO we shouldn't - we should either specify a workspace and assume
                 the compositor will know which windows present or none
      -->
    </request>

    <request name="highlight">
      <description name="highlight a surface">
        Tell the compositor to highlight a particular surface.
      </description>
      <!-- XXX: What is controller in KWindowEffects? -->
      <arg name="controller" type="object" interface="wl_surface"/>
      <arg name="surface" type="object" interface="wl_output"/>
    </request>

    <request name="set_blur_behind_region">
      <description name="set blur behind region">
        This request sets the region of the surface that will allow to see
        through with a blur effect.

        Pass a null region to disable blur behind.
      </description>
      <arg name="surface" type="object" interface="wl_surface"/>
      <arg name="region" type="object" interface="wl_region" allow-null="true"/>
    </request>

    <request name="set_contrast_region">
      <description name="set contrast region">
        This request sets the region of the surface with a different
        contrast.

        Pass a null region to disable this effect.

        When a null region is passed the contrast, intensity and saturation
        arguments are not taken into account.

        The contrast, intensity and saturation parameters are in
        the 0-255 range.
      </description>
      <arg name="surface" type="object" interface="wl_surface"/>
      <arg name="region" type="object" interface="wl_region" allow-null="true"/>
      <arg name="contrast" type="uint"/>
      <arg name="intensity" type="uint"/>
      <arg name="saturation" type="uint"/>
    </request>

    <request name="set_dashboard_surface">
      <description name="set dashboard role">
        The surface set by this request will receive the dashboard role.
      </description>
      <!-- XXX: How can we unset this role?
                Should this be moved to another protocol where we
                have requests to set more surface roles?
      -->
      <arg name="surface" type="object" interface="wl_surface"/>
  </interface>
</protocol>