chromium/out/Default/gen/third_party/wayland-protocols/unstable/stylus/stylus-unstable-v2-server-protocol.h

/* Generated by wayland-scanner 1.23.0 */

#ifndef STYLUS_UNSTABLE_V2_SERVER_PROTOCOL_H
#define STYLUS_UNSTABLE_V2_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_stylus_unstable_v2 The stylus_unstable_v2 protocol
 * @section page_ifaces_stylus_unstable_v2 Interfaces
 * - @subpage page_iface_zcr_stylus_v2 - extends wl_touch and wl_pointer for styli
 * - @subpage page_iface_zcr_touch_stylus_v2 - stylus extension for touch
 * - @subpage page_iface_zcr_pointer_stylus_v2 - stylus extension for touch
 * @section page_copyright_stylus_unstable_v2 Copyright
 * <pre>
 *
 * Copyright 2016 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_pointer;
struct wl_touch;
struct zcr_pointer_stylus_v2;
struct zcr_stylus_v2;
struct zcr_touch_stylus_v2;

#ifndef ZCR_STYLUS_V2_INTERFACE
#define ZCR_STYLUS_V2_INTERFACE
/**
 * @page page_iface_zcr_stylus_v2 zcr_stylus_v2
 * @section page_iface_zcr_stylus_v2_desc Description
 *
 * Allows a wl_touch or a wl_pointer to report stylus specific information.
 * The client can use this protocol to obtain detail information about the
 * type of stylus, as well as the force and tilt of the tool.
 *
 * 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 uinterface version bump.
 * Backward incompatible changes are done by bumping the version number in
 * the protocol and uinterface 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_iface_zcr_stylus_v2_api API
 * See @ref iface_zcr_stylus_v2.
 */
/**
 * @defgroup iface_zcr_stylus_v2 The zcr_stylus_v2 interface
 *
 * Allows a wl_touch or a wl_pointer to report stylus specific information.
 * The client can use this protocol to obtain detail information about the
 * type of stylus, as well as the force and tilt of the tool.
 *
 * 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 uinterface version bump.
 * Backward incompatible changes are done by bumping the version number in
 * the protocol and uinterface 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.
 */
extern const struct wl_interface zcr_stylus_v2_interface;
#endif
#ifndef ZCR_TOUCH_STYLUS_V2_INTERFACE
#define ZCR_TOUCH_STYLUS_V2_INTERFACE
/**
 * @page page_iface_zcr_touch_stylus_v2 zcr_touch_stylus_v2
 * @section page_iface_zcr_touch_stylus_v2_desc Description
 *
 * The zcr_touch_stylus_v2 interface extends the wl_touch interface with
 * events to describe details about a stylus. A stylus that reports events
 * through this interface is likely an on-screen stylus, where the user
 * interacts with the stylus directly on a display.
 *
 * These events are to be fired by the server within the same frame as other
 * wl_touch events.
 * @section page_iface_zcr_touch_stylus_v2_api API
 * See @ref iface_zcr_touch_stylus_v2.
 */
/**
 * @defgroup iface_zcr_touch_stylus_v2 The zcr_touch_stylus_v2 interface
 *
 * The zcr_touch_stylus_v2 interface extends the wl_touch interface with
 * events to describe details about a stylus. A stylus that reports events
 * through this interface is likely an on-screen stylus, where the user
 * interacts with the stylus directly on a display.
 *
 * These events are to be fired by the server within the same frame as other
 * wl_touch events.
 */
extern const struct wl_interface zcr_touch_stylus_v2_interface;
#endif
#ifndef ZCR_POINTER_STYLUS_V2_INTERFACE
#define ZCR_POINTER_STYLUS_V2_INTERFACE
/**
 * @page page_iface_zcr_pointer_stylus_v2 zcr_pointer_stylus_v2
 * @section page_iface_zcr_pointer_stylus_v2_desc Description
 *
 * The zcr_pointer_stylus_v2 interface extends the wl_pointer interface with
 * events to describe details about a stylus. A stylus that reports events
 * through this interface also moves the mouse cursor. The type of the
 * device reporting values through this interface is described by the
 * tool_type. When the tool changes, the values previously reported through
 * this interface are assumed to be reset.
 *
 * These events are to be fired by the server within the same frame as other
 * wl_pointer events.
 * @section page_iface_zcr_pointer_stylus_v2_api API
 * See @ref iface_zcr_pointer_stylus_v2.
 */
/**
 * @defgroup iface_zcr_pointer_stylus_v2 The zcr_pointer_stylus_v2 interface
 *
 * The zcr_pointer_stylus_v2 interface extends the wl_pointer interface with
 * events to describe details about a stylus. A stylus that reports events
 * through this interface also moves the mouse cursor. The type of the
 * device reporting values through this interface is described by the
 * tool_type. When the tool changes, the values previously reported through
 * this interface are assumed to be reset.
 *
 * These events are to be fired by the server within the same frame as other
 * wl_pointer events.
 */
extern const struct wl_interface zcr_pointer_stylus_v2_interface;
#endif

#ifndef ZCR_STYLUS_V2_ERROR_ENUM
#define ZCR_STYLUS_V2_ERROR_ENUM
enum zcr_stylus_v2_error {};
/**
 * @ingroup iface_zcr_stylus_v2
 */
#define ZCR_STYLUS_V2_ERROR_POINTER_STYLUS_EXISTS_SINCE_VERSION
/**
 * @ingroup iface_zcr_stylus_v2
 * Validate a zcr_stylus_v2 error value.
 *
 * @return true on success, false on error.
 * @ref zcr_stylus_v2_error
 */
static inline bool
zcr_stylus_v2_error_is_valid(uint32_t value, uint32_t version) {}
#endif /* ZCR_STYLUS_V2_ERROR_ENUM */

/**
 * @ingroup iface_zcr_stylus_v2
 * @struct zcr_stylus_v2_interface
 */
struct zcr_stylus_v2_interface {};


/**
 * @ingroup iface_zcr_stylus_v2
 */
#define ZCR_STYLUS_V2_GET_TOUCH_STYLUS_SINCE_VERSION
/**
 * @ingroup iface_zcr_stylus_v2
 */
#define ZCR_STYLUS_V2_GET_POINTER_STYLUS_SINCE_VERSION

#ifndef ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM
#define ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM
/**
 * @ingroup iface_zcr_touch_stylus_v2
 * tool type of device.
 */
enum zcr_touch_stylus_v2_tool_type {};
/**
 * @ingroup iface_zcr_touch_stylus_v2
 * Validate a zcr_touch_stylus_v2 tool_type value.
 *
 * @return true on success, false on error.
 * @ref zcr_touch_stylus_v2_tool_type
 */
static inline bool
zcr_touch_stylus_v2_tool_type_is_valid(uint32_t value, uint32_t version) {}
#endif /* ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM */

/**
 * @ingroup iface_zcr_touch_stylus_v2
 * @struct zcr_touch_stylus_v2_interface
 */
struct zcr_touch_stylus_v2_interface {};

#define ZCR_TOUCH_STYLUS_V2_TOOL
#define ZCR_TOUCH_STYLUS_V2_FORCE
#define ZCR_TOUCH_STYLUS_V2_TILT

/**
 * @ingroup iface_zcr_touch_stylus_v2
 */
#define ZCR_TOUCH_STYLUS_V2_TOOL_SINCE_VERSION
/**
 * @ingroup iface_zcr_touch_stylus_v2
 */
#define ZCR_TOUCH_STYLUS_V2_FORCE_SINCE_VERSION
/**
 * @ingroup iface_zcr_touch_stylus_v2
 */
#define ZCR_TOUCH_STYLUS_V2_TILT_SINCE_VERSION

/**
 * @ingroup iface_zcr_touch_stylus_v2
 */
#define ZCR_TOUCH_STYLUS_V2_DESTROY_SINCE_VERSION

/**
 * @ingroup iface_zcr_touch_stylus_v2
 * Sends an tool event to the client owning the resource.
 * @param resource_ The client's resource
 * @param id touch id
 * @param type type of tool in use
 */
static inline void
zcr_touch_stylus_v2_send_tool(struct wl_resource *resource_, uint32_t id, uint32_t type)
{}

/**
 * @ingroup iface_zcr_touch_stylus_v2
 * Sends an force event to the client owning the resource.
 * @param resource_ The client's resource
 * @param time timestamp with millisecond granularity
 * @param id touch id
 * @param force new value of force
 */
static inline void
zcr_touch_stylus_v2_send_force(struct wl_resource *resource_, uint32_t time, uint32_t id, wl_fixed_t force)
{}

/**
 * @ingroup iface_zcr_touch_stylus_v2
 * Sends an tilt event to the client owning the resource.
 * @param resource_ The client's resource
 * @param time timestamp with millisecond granularity
 * @param id touch id
 * @param tilt_x tilt in x direction
 * @param tilt_y tilt in y direction
 */
static inline void
zcr_touch_stylus_v2_send_tilt(struct wl_resource *resource_, uint32_t time, uint32_t id, wl_fixed_t tilt_x, wl_fixed_t tilt_y)
{}

#ifndef ZCR_POINTER_STYLUS_V2_TOOL_TYPE_ENUM
#define ZCR_POINTER_STYLUS_V2_TOOL_TYPE_ENUM
/**
 * @ingroup iface_zcr_pointer_stylus_v2
 * the tool type of the device
 */
enum zcr_pointer_stylus_v2_tool_type {};
/**
 * @ingroup iface_zcr_pointer_stylus_v2
 * Validate a zcr_pointer_stylus_v2 tool_type value.
 *
 * @return true on success, false on error.
 * @ref zcr_pointer_stylus_v2_tool_type
 */
static inline bool
zcr_pointer_stylus_v2_tool_type_is_valid(uint32_t value, uint32_t version) {}
#endif /* ZCR_POINTER_STYLUS_V2_TOOL_TYPE_ENUM */

/**
 * @ingroup iface_zcr_pointer_stylus_v2
 * @struct zcr_pointer_stylus_v2_interface
 */
struct zcr_pointer_stylus_v2_interface {};

#define ZCR_POINTER_STYLUS_V2_TOOL
#define ZCR_POINTER_STYLUS_V2_FORCE
#define ZCR_POINTER_STYLUS_V2_TILT

/**
 * @ingroup iface_zcr_pointer_stylus_v2
 */
#define ZCR_POINTER_STYLUS_V2_TOOL_SINCE_VERSION
/**
 * @ingroup iface_zcr_pointer_stylus_v2
 */
#define ZCR_POINTER_STYLUS_V2_FORCE_SINCE_VERSION
/**
 * @ingroup iface_zcr_pointer_stylus_v2
 */
#define ZCR_POINTER_STYLUS_V2_TILT_SINCE_VERSION

/**
 * @ingroup iface_zcr_pointer_stylus_v2
 */
#define ZCR_POINTER_STYLUS_V2_DESTROY_SINCE_VERSION

/**
 * @ingroup iface_zcr_pointer_stylus_v2
 * Sends an tool event to the client owning the resource.
 * @param resource_ The client's resource
 * @param type type of tool in use
 */
static inline void
zcr_pointer_stylus_v2_send_tool(struct wl_resource *resource_, uint32_t type)
{}

/**
 * @ingroup iface_zcr_pointer_stylus_v2
 * Sends an force event to the client owning the resource.
 * @param resource_ The client's resource
 * @param time timestamp with millisecond granularity
 * @param force new value of force
 */
static inline void
zcr_pointer_stylus_v2_send_force(struct wl_resource *resource_, uint32_t time, wl_fixed_t force)
{}

/**
 * @ingroup iface_zcr_pointer_stylus_v2
 * Sends an tilt event to the client owning the resource.
 * @param resource_ The client's resource
 * @param time timestamp with millisecond granularity
 * @param tilt_x tilt in x direction
 * @param tilt_y tilt in y direction
 */
static inline void
zcr_pointer_stylus_v2_send_tilt(struct wl_resource *resource_, uint32_t time, wl_fixed_t tilt_x, wl_fixed_t tilt_y)
{}

#ifdef  __cplusplus
}
#endif

#endif