File indexing completed on 2024-11-10 04:56:46

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2020 <davidedmundson@kde.org>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #pragma once
0011 
0012 #ifdef __cplusplus
0013 extern "C" {
0014 #endif
0015 
0016 /**
0017  * Allocate and create a socket
0018  * It is bound and accepted
0019  */
0020 struct wl_socket *wl_socket_create();
0021 
0022 /**
0023  * Returns the file descriptor for the socket
0024  */
0025 int wl_socket_get_fd(struct wl_socket *);
0026 
0027 /**
0028  * Returns the name of the socket, i.e "wayland-0"
0029  */
0030 char *wl_socket_get_display_name(struct wl_socket *);
0031 
0032 /**
0033  * Cleanup resources and close the FD
0034  */
0035 void wl_socket_destroy(struct wl_socket *socket);
0036 
0037 #ifdef __cplusplus
0038 }
0039 #endif