mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-04 13:29:51 -05:00
doc: Added API documentation for wl_display_destroy and wl_display_add_socket functions.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> [Pekka Paalanen: minor re-wording.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
94f1718c50
commit
754ce18135
1 changed files with 38 additions and 0 deletions
|
|
@ -861,6 +861,20 @@ wl_socket_alloc(void)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Destroy Wayland display object.
|
||||||
|
*
|
||||||
|
* \param display The Wayland display object which should be destroyed.
|
||||||
|
* \return None.
|
||||||
|
*
|
||||||
|
* This function emits the wl_display destroy signal, releases
|
||||||
|
* all the sockets added to this display, free's all the globals associated
|
||||||
|
* with this display, free's memory of additional shared memory formats and
|
||||||
|
* destroy the display object.
|
||||||
|
*
|
||||||
|
* \sa wl_display_add_destroy_listener
|
||||||
|
*
|
||||||
|
* \memberof wl_display
|
||||||
|
*/
|
||||||
WL_EXPORT void
|
WL_EXPORT void
|
||||||
wl_display_destroy(struct wl_display *display)
|
wl_display_destroy(struct wl_display *display)
|
||||||
{
|
{
|
||||||
|
|
@ -1180,6 +1194,30 @@ wl_display_add_socket_auto(struct wl_display *display)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Add a socket to Wayland display for the clients to connect.
|
||||||
|
*
|
||||||
|
* \param display Wayland display to which the socket should be added.
|
||||||
|
* \param name Name of the Unix socket.
|
||||||
|
* \return 0 if success. -1 if failed.
|
||||||
|
*
|
||||||
|
* This adds a Unix socket to Wayland display which can be used by clients to
|
||||||
|
* connect to Wayland display.
|
||||||
|
*
|
||||||
|
* If NULL is passed as name, then it would look for WAYLAND_DISPLAY env
|
||||||
|
* variable for the socket name. If WAYLAND_DISPLAY is not set, then default
|
||||||
|
* wayland-0 is used.
|
||||||
|
*
|
||||||
|
* The Unix socket will be created in the directory pointed to by environment
|
||||||
|
* variable XDG_RUNTIME_DIR. If XDG_RUNTIME_DIR is not set, then this function
|
||||||
|
* fails and returns -1.
|
||||||
|
*
|
||||||
|
* The length of socket path, i.e., the path set in XDG_RUNTIME_DIR and the
|
||||||
|
* socket name, must not exceed the maxium length of a Unix socket path.
|
||||||
|
* The function also fails if the user do not have write permission in the
|
||||||
|
* XDG_RUNTIME_DIR path or if the socket name is already in use.
|
||||||
|
*
|
||||||
|
* \memberof wl_display
|
||||||
|
*/
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
wl_display_add_socket(struct wl_display *display, const char *name)
|
wl_display_add_socket(struct wl_display *display, const char *name)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue