1*61046927SAndroid Build Coastguard Worker /* 2*61046927SAndroid Build Coastguard Worker * Copyright © 2022 Red Hat, Inc. 3*61046927SAndroid Build Coastguard Worker * 4*61046927SAndroid Build Coastguard Worker * Permission to use, copy, modify, distribute, and sell this software and its 5*61046927SAndroid Build Coastguard Worker * documentation for any purpose is hereby granted without fee, provided that 6*61046927SAndroid Build Coastguard Worker * the above copyright notice appear in all copies and that both that copyright 7*61046927SAndroid Build Coastguard Worker * notice and this permission notice appear in supporting documentation, and 8*61046927SAndroid Build Coastguard Worker * that the name of the copyright holders not be used in advertising or 9*61046927SAndroid Build Coastguard Worker * publicity pertaining to distribution of the software without specific, 10*61046927SAndroid Build Coastguard Worker * written prior permission. The copyright holders make no representations 11*61046927SAndroid Build Coastguard Worker * about the suitability of this software for any purpose. It is provided "as 12*61046927SAndroid Build Coastguard Worker * is" without express or implied warranty. 13*61046927SAndroid Build Coastguard Worker * 14*61046927SAndroid Build Coastguard Worker * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15*61046927SAndroid Build Coastguard Worker * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16*61046927SAndroid Build Coastguard Worker * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17*61046927SAndroid Build Coastguard Worker * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18*61046927SAndroid Build Coastguard Worker * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19*61046927SAndroid Build Coastguard Worker * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 20*61046927SAndroid Build Coastguard Worker * OF THIS SOFTWARE. 21*61046927SAndroid Build Coastguard Worker */ 22*61046927SAndroid Build Coastguard Worker 23*61046927SAndroid Build Coastguard Worker #ifndef LOADER_WAYLAND_HELPER_HEADER_H 24*61046927SAndroid Build Coastguard Worker #define LOADER_WAYLAND_HELPER_HEADER_H 25*61046927SAndroid Build Coastguard Worker 26*61046927SAndroid Build Coastguard Worker #include <wayland-client.h> 27*61046927SAndroid Build Coastguard Worker 28*61046927SAndroid Build Coastguard Worker #ifndef HAVE_WL_DISPATCH_QUEUE_TIMEOUT 29*61046927SAndroid Build Coastguard Worker 30*61046927SAndroid Build Coastguard Worker #include <util/timespec.h> 31*61046927SAndroid Build Coastguard Worker int 32*61046927SAndroid Build Coastguard Worker wl_display_dispatch_queue_timeout(struct wl_display *display, 33*61046927SAndroid Build Coastguard Worker struct wl_event_queue *queue, 34*61046927SAndroid Build Coastguard Worker const struct timespec *deadline); 35*61046927SAndroid Build Coastguard Worker #endif 36*61046927SAndroid Build Coastguard Worker 37*61046927SAndroid Build Coastguard Worker #ifndef HAVE_WL_CREATE_QUEUE_WITH_NAME 38*61046927SAndroid Build Coastguard Worker struct wl_event_queue * 39*61046927SAndroid Build Coastguard Worker wl_display_create_queue_with_name(struct wl_display *display, 40*61046927SAndroid Build Coastguard Worker const char *name); 41*61046927SAndroid Build Coastguard Worker #endif 42*61046927SAndroid Build Coastguard Worker 43*61046927SAndroid Build Coastguard Worker int 44*61046927SAndroid Build Coastguard Worker loader_wayland_dispatch(struct wl_display *display, 45*61046927SAndroid Build Coastguard Worker struct wl_event_queue *queue, 46*61046927SAndroid Build Coastguard Worker struct timespec *end_time); 47*61046927SAndroid Build Coastguard Worker 48*61046927SAndroid Build Coastguard Worker #endif 49