mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-24 13:30:08 +01:00
Reduce the number of functions that are exported by the layer. This helps resolve dynamic linking issues where multiple functions are named the same in different shared libraries. Also add function specifiers and calling conventions to all extern "C" functions. Change-Id: I07b33ff8d066e33c5dbdf0cbc13aa7835a78220b Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
46 lines
2.3 KiB
C++
46 lines
2.3 KiB
C++
/*
|
|
* Copyright (c) 2017-2019, 2021 Arm Limited.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* 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 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.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <wayland-client.h>
|
|
#include "util/custom_allocator.hpp"
|
|
|
|
/**
|
|
* @brief Dispatch events from a Wayland event queue
|
|
*
|
|
* Dispatch events from a given Wayland display event queue, including calling event handlers, and flush out any
|
|
* requests the event handlers may have written. Specification of a timeout allows the wait to be bounded. If any
|
|
* events are already pending dispatch (have been read from the display by another thread or event queue), they
|
|
* will be dispatched and the function will return immediately, without waiting for new events to arrive.
|
|
*
|
|
* @param display Wayland display to dispatch events from
|
|
* @param queue Event queue to dispatch events from; other event queues will not have their handlers called from
|
|
* within this function
|
|
* @param timeout Maximum time to wait for events to arrive, in milliseconds
|
|
* @return 1 if one or more events were dispatched on this queue, 0 if the timeout was reached without any
|
|
* events being dispatched, or -1 on error.
|
|
*/
|
|
int dispatch_queue(struct wl_display *display, struct wl_event_queue *queue, int timeout);
|