blob: 8877acc61ab78f2685dc4e81d088860db97e9c8a [file] [log] [blame]
/* Generated by wayland-scanner 1.13.0 */
#ifndef NOTIFICATION_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H
#define NOTIFICATION_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-server.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wl_client;
struct wl_resource;
/**
* @page page_notification_shell_unstable_v1 The notification_shell_unstable_v1 protocol
* Create desktop notifications
*
* @section page_desc_notification_shell_unstable_v1 Description
*
* notification_shell allows clients to create desktop notification on host.
*
* 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.
*
* @section page_ifaces_notification_shell_unstable_v1 Interfaces
* - @subpage page_iface_zcr_notification_shell_v1 - A notification window
* - @subpage page_iface_zcr_notification_shell_surface_v1 - A notification window
* @section page_copyright_notification_shell_unstable_v1 Copyright
* <pre>
*
* Copyright 2018 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 zcr_notification_shell_surface_v1;
struct zcr_notification_shell_v1;
/**
* @page page_iface_zcr_notification_shell_v1 zcr_notification_shell_v1
* @section page_iface_zcr_notification_shell_v1_desc Description
*
* An interface that is used for creating desktop notification on host.
* @section page_iface_zcr_notification_shell_v1_api API
* See @ref iface_zcr_notification_shell_v1.
*/
/**
* @defgroup iface_zcr_notification_shell_v1 The zcr_notification_shell_v1 interface
*
* An interface that is used for creating desktop notification on host.
*/
extern const struct wl_interface zcr_notification_shell_v1_interface;
/**
* @page page_iface_zcr_notification_shell_surface_v1 zcr_notification_shell_surface_v1
* @section page_iface_zcr_notification_shell_surface_v1_desc Description
*
* An interface that may be implemented by a wl_surface to host
* notification contents.
* @section page_iface_zcr_notification_shell_surface_v1_api API
* See @ref iface_zcr_notification_shell_surface_v1.
*/
/**
* @defgroup iface_zcr_notification_shell_surface_v1 The zcr_notification_shell_surface_v1 interface
*
* An interface that may be implemented by a wl_surface to host
* notification contents.
*/
extern const struct wl_interface zcr_notification_shell_surface_v1_interface;
#ifndef ZCR_NOTIFICATION_SHELL_V1_ERROR_ENUM
#define ZCR_NOTIFICATION_SHELL_V1_ERROR_ENUM
enum zcr_notification_shell_v1_error {
/**
* invalid notification key
*/
ZCR_NOTIFICATION_SHELL_V1_ERROR_INVALID_NOTIFICATION_KEY = 1,
};
#endif /* ZCR_NOTIFICATION_SHELL_V1_ERROR_ENUM */
/**
* @ingroup iface_zcr_notification_shell_v1
* @struct zcr_notification_shell_v1_interface
*/
struct zcr_notification_shell_v1_interface {
/**
* create a desktop notification from plain text
*
* Creates a desktop notification from plain text information.
* @param display_source textual representation of who's shown the notification
*/
void (*create_notification)(struct wl_client *client,
struct wl_resource *resource,
const char *title,
const char *message,
const char *display_source,
const char *notification_key);
/**
* create a notification surface from a surface
*
* Creates a notification_surface for the given surface, gives it
* the notification_surface role and associated it with a
* notification id.
*/
void (*get_notification_surface)(struct wl_client *client,
struct wl_resource *resource,
uint32_t id,
struct wl_resource *surface,
const char *notification_key);
};
/**
* @ingroup iface_zcr_notification_shell_v1
*/
#define ZCR_NOTIFICATION_SHELL_V1_CREATE_NOTIFICATION_SINCE_VERSION 1
/**
* @ingroup iface_zcr_notification_shell_v1
*/
#define ZCR_NOTIFICATION_SHELL_V1_GET_NOTIFICATION_SURFACE_SINCE_VERSION 1
/**
* @ingroup iface_zcr_notification_shell_surface_v1
* @struct zcr_notification_shell_surface_v1_interface
*/
struct zcr_notification_shell_surface_v1_interface {
/**
* Destroy the notification_surface
*
* Unmap and destroy the notification surface.
*/
void (*destroy)(struct wl_client *client,
struct wl_resource *resource);
/**
* set application ID
*
* Set an application identifier for the notification surface.
*/
void (*set_app_id)(struct wl_client *client,
struct wl_resource *resource,
const char *app_id);
};
/**
* @ingroup iface_zcr_notification_shell_surface_v1
*/
#define ZCR_NOTIFICATION_SHELL_SURFACE_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zcr_notification_shell_surface_v1
*/
#define ZCR_NOTIFICATION_SHELL_SURFACE_V1_SET_APP_ID_SINCE_VERSION 1
#ifdef __cplusplus
}
#endif
#endif