wl_client (3) - Linux Manuals

NAME

wl_client -

SYNOPSIS


Public Member Functions


void wl_client_flush (struct wl_client *client)

struct wl_display * wl_client_get_display (struct wl_client *client)

void wl_client_get_credentials (struct wl_client *client, pid_t *pid, uid_t *uid, gid_t *gid)

struct wl_resource * wl_client_get_object (struct wl_client *client, uint32_t id)

Public Attributes


struct wl_connection * connection

struct wl_event_source * source

struct wl_display * display

struct wl_resource * display_resource

uint32_t id_count

uint32_t mask

struct wl_list link

struct wl_map objects

struct wl_signal destroy_signal

struct ucred ucred

int error

Member Function Documentation

void wl_client_flush (struct wl_client *client)

Flush pending events to the client

Parameters:

client The client object

Events sent to clients are queued in a buffer and written to the socket later - typically when the compositor has handled all requests and goes back to block in the event loop. This function flushes all queued up events for a client immediately.

void wl_client_get_credentials (struct wl_client *client, pid_t *pid, uid_t *uid, gid_t *gid)

Return Unix credentials for the client

Parameters:

client The display object
pid Returns the process ID
uid Returns the user ID
gid Returns the group ID

This function returns the process ID, the user ID and the group ID for the given client. The credentials come from getsockopt() with SO_PEERCRED, on the client socket fd. All the pointers can be NULL, if the caller is not interested in a particular ID.

Be aware that for clients that a compositor forks and execs and then connects using socketpair(), this function will return the credentials for the compositor. The credentials for the socketpair are set at creation time in the compositor.

struct wl_display * wl_client_get_display (struct wl_client *client)

Get the display object for the given client

Parameters:

client The client object

Returns:

The display object the client is associated with.

struct wl_resource * wl_client_get_object (struct wl_client *client, uint32_tid)

Look up an object in the client name space

Parameters:

client The client object
id The object id

Returns:

The object or NULL if there is not object for the given ID

This looks up an object in the client object name space by its object ID.

Author

Generated automatically by Doxygen for Wayland from the source code.