blob: 2792ac45c145fddc58fd432b1aa24f4b786ee679 [file] [log] [blame]
/* Generated by wayland-scanner 1.13.0 */
#ifndef AURA_SHELL_CLIENT_PROTOCOL_H
#define AURA_SHELL_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_aura_shell The aura_shell protocol
* @section page_ifaces_aura_shell Interfaces
* - @subpage page_iface_zaura_shell - aura_shell
* - @subpage page_iface_zaura_surface - aura shell interface to a wl_surface
* @section page_copyright_aura_shell Copyright
* <pre>
*
* Copyright 2017 The Chromium Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
* </pre>
*/
struct wl_surface;
struct zaura_shell;
struct zaura_surface;
/**
* @page page_iface_zaura_shell zaura_shell
* @section page_iface_zaura_shell_desc Description
*
* The global interface exposing aura shell capabilities is used to
* instantiate an interface extension for a wl_surface object.
* This extended interface will then allow the client to use aura shell
* specific functionality.
* @section page_iface_zaura_shell_api API
* See @ref iface_zaura_shell.
*/
/**
* @defgroup iface_zaura_shell The zaura_shell interface
*
* The global interface exposing aura shell capabilities is used to
* instantiate an interface extension for a wl_surface object.
* This extended interface will then allow the client to use aura shell
* specific functionality.
*/
extern const struct wl_interface zaura_shell_interface;
/**
* @page page_iface_zaura_surface zaura_surface
* @section page_iface_zaura_surface_desc Description
*
* An additional interface to a wl_surface object, which allows the
* client to access aura shell specific functionality for surface.
* @section page_iface_zaura_surface_api API
* See @ref iface_zaura_surface.
*/
/**
* @defgroup iface_zaura_surface The zaura_surface interface
*
* An additional interface to a wl_surface object, which allows the
* client to access aura shell specific functionality for surface.
*/
extern const struct wl_interface zaura_surface_interface;
#ifndef ZAURA_SHELL_ERROR_ENUM
#define ZAURA_SHELL_ERROR_ENUM
enum zaura_shell_error {
/**
* the surface already has an aura surface object associated
*/
ZAURA_SHELL_ERROR_AURA_SURFACE_EXISTS = 0,
};
#endif /* ZAURA_SHELL_ERROR_ENUM */
#define ZAURA_SHELL_GET_AURA_SURFACE 0
/**
* @ingroup iface_zaura_shell
*/
#define ZAURA_SHELL_GET_AURA_SURFACE_SINCE_VERSION 1
/** @ingroup iface_zaura_shell */
static inline void
zaura_shell_set_user_data(struct zaura_shell *zaura_shell, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zaura_shell, user_data);
}
/** @ingroup iface_zaura_shell */
static inline void *
zaura_shell_get_user_data(struct zaura_shell *zaura_shell)
{
return wl_proxy_get_user_data((struct wl_proxy *) zaura_shell);
}
static inline uint32_t
zaura_shell_get_version(struct zaura_shell *zaura_shell)
{
return wl_proxy_get_version((struct wl_proxy *) zaura_shell);
}
/** @ingroup iface_zaura_shell */
static inline void
zaura_shell_destroy(struct zaura_shell *zaura_shell)
{
wl_proxy_destroy((struct wl_proxy *) zaura_shell);
}
/**
* @ingroup iface_zaura_shell
*
* Instantiate an interface extension for the given wl_surface to
* provide aura shell functionality. If the given wl_surface is not
* associated with a shell surface, the shell_surface_missing protocol
* error is raised.
*/
static inline struct zaura_surface *
zaura_shell_get_aura_surface(struct zaura_shell *zaura_shell, struct wl_surface *surface)
{
struct wl_proxy *id;
id = wl_proxy_marshal_constructor((struct wl_proxy *) zaura_shell,
ZAURA_SHELL_GET_AURA_SURFACE, &zaura_surface_interface, NULL, surface);
return (struct zaura_surface *) id;
}
#ifndef ZAURA_SURFACE_FRAME_TYPE_ENUM
#define ZAURA_SURFACE_FRAME_TYPE_ENUM
/**
* @ingroup iface_zaura_surface
* different frame types
*
* Frame types that can be used to decorate a surface.
*/
enum zaura_surface_frame_type {
/**
* no frame
*/
ZAURA_SURFACE_FRAME_TYPE_NONE = 0,
/**
* caption with shadow
*/
ZAURA_SURFACE_FRAME_TYPE_NORMAL = 1,
/**
* shadow only
*/
ZAURA_SURFACE_FRAME_TYPE_SHADOW = 2,
};
#endif /* ZAURA_SURFACE_FRAME_TYPE_ENUM */
#define ZAURA_SURFACE_SET_FRAME 0
/**
* @ingroup iface_zaura_surface
*/
#define ZAURA_SURFACE_SET_FRAME_SINCE_VERSION 1
/** @ingroup iface_zaura_surface */
static inline void
zaura_surface_set_user_data(struct zaura_surface *zaura_surface, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zaura_surface, user_data);
}
/** @ingroup iface_zaura_surface */
static inline void *
zaura_surface_get_user_data(struct zaura_surface *zaura_surface)
{
return wl_proxy_get_user_data((struct wl_proxy *) zaura_surface);
}
static inline uint32_t
zaura_surface_get_version(struct zaura_surface *zaura_surface)
{
return wl_proxy_get_version((struct wl_proxy *) zaura_surface);
}
/** @ingroup iface_zaura_surface */
static inline void
zaura_surface_destroy(struct zaura_surface *zaura_surface)
{
wl_proxy_destroy((struct wl_proxy *) zaura_surface);
}
/**
* @ingroup iface_zaura_surface
*
* Suggests a surface should use a specific frame.
*/
static inline void
zaura_surface_set_frame(struct zaura_surface *zaura_surface, uint32_t type)
{
wl_proxy_marshal((struct wl_proxy *) zaura_surface,
ZAURA_SURFACE_SET_FRAME, type);
}
#ifdef __cplusplus
}
#endif
#endif