# -*- coding: utf-8 -*-
# This file has been autogenerated by the pywayland scanner

# Copyright 2015 Sean Vig
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from pywayland.interface import Interface
from ..wayland.pointer import Pointer as wl_Pointer
from .pointergesturepinchv1 import PointerGesturePinchV1
from .pointergestureswipev1 import PointerGestureSwipeV1


class PointerGesturesV1(Interface):
    """Touchpad gestures

    A global interface to provide semantic touchpad gestures for a given
    pointer.

    Two gestures are currently supported: swipe and zoom/rotate. All gestures
    follow a three-stage cycle: begin, update, end and are identified by a
    unique id.

    Warning! The protocol described in this file is experimental and backward
    incompatible changes may be made. Backward compatible changes may be added
    together with the corresponding interface version bump. Backward
    incompatible changes are done by bumping the version number in the protocol
    and interface names and resetting the interface version. Once the protocol
    is to be declared stable, the 'z' prefix and the version number in the
    protocol and interface names are removed and the interface version number
    is reset.
    """
    name = "zwp_pointer_gestures_v1"
    version = 1


@PointerGesturesV1.request("no", [PointerGestureSwipeV1, wl_Pointer])
def get_swipe_gesture(self, pointer):
    """Get swipe gesture

    Create a swipe gesture object. See the :class:`~pywayland.protocol.wayland.
    pointergestureswipe.PointerGestureSwipe` interface for details.

    :param pointer:
    :type pointer: :class:`~pywayland.protocol.wayland.pointer.Pointer`
    :returns: :class:`~pywayland.protocol.pointer_gestures_unstable_v1.pointergestureswipev1.PointerGestureSwipeV1`
    """
    id = self._marshal_constructor(0, PointerGestureSwipeV1, pointer)
    return id


@PointerGesturesV1.request("no", [PointerGesturePinchV1, wl_Pointer])
def get_pinch_gesture(self, pointer):
    """Get pinch gesture

    Create a pinch gesture object. See the :class:`~pywayland.protocol.wayland.
    pointergesturepinch.PointerGesturePinch` interface for details.

    :param pointer:
    :type pointer: :class:`~pywayland.protocol.wayland.pointer.Pointer`
    :returns: :class:`~pywayland.protocol.pointer_gestures_unstable_v1.pointergesturepinchv1.PointerGesturePinchV1`
    """
    id = self._marshal_constructor(1, PointerGesturePinchV1, pointer)
    return id


PointerGesturesV1._gen_c()
