# -*- 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


class FullscreenShellModeFeedbackV1(Interface):
    name = "zwp_fullscreen_shell_mode_feedback_v1"
    version = 1


@FullscreenShellModeFeedbackV1.event("", [])
def mode_successful(self):
    """Mode switch succeeded

    This event indicates that the attempted mode switch operation was
    successful.  A surface of the size requested in the mode switch will fill
    the output without scaling.

    Upon receiving this event, the client should destroy the :class:`~pywayland
    .protocol.wayland.fullscreenshellmodefeedback.FullscreenShellModeFeedback`
    object.
    """
    self._post_event(0)


@FullscreenShellModeFeedbackV1.event("", [])
def mode_failed(self):
    """Mode switch failed

    This event indicates that the attempted mode switch operation failed. This
    may be because the requested output mode is not possible or it may mean
    that the compositor does not want to allow it.

    Upon receiving this event, the client should destroy the :class:`~pywayland
    .protocol.wayland.fullscreenshellmodefeedback.FullscreenShellModeFeedback`
    object.
    """
    self._post_event(1)


@FullscreenShellModeFeedbackV1.event("", [])
def present_cancelled(self):
    """Mode switch cancelled

    This event indicates that the attempted mode switch operation was
    cancelled.  Most likely this is because the client requested a second mode
    switch before the first one completed.

    Upon receiving this event, the client should destroy the :class:`~pywayland
    .protocol.wayland.fullscreenshellmodefeedback.FullscreenShellModeFeedback`
    object.
    """
    self._post_event(2)


FullscreenShellModeFeedbackV1._gen_c()
