コード例 #1
0
ファイル: connection.c プロジェクト: giucam/wayland
int
wl_closure_queue(struct wl_closure *closure, struct wl_connection *connection)
{
	int size;
	uint32_t buffer_size;
	uint32_t *buffer;
	int result;

	if (copy_fds_to_connection(closure, connection))
		return -1;

	buffer_size = buffer_size_for_closure(closure);
	buffer = malloc(buffer_size * sizeof buffer[0]);
	if (buffer == NULL)
		return -1;

	size = serialize_closure(closure, buffer, buffer_size);
	if (size < 0) {
		free(buffer);
		return -1;
	}

	result = wl_connection_queue(connection, buffer, size);
	free(buffer);

	return result;
}
コード例 #2
0
ファイル: connection.c プロジェクト: Godmen/wayland-rpi
int
wl_closure_queue(struct wl_closure *closure, struct wl_connection *connection)
{
	uint32_t size;

	if (copy_fds_to_connection(closure, connection))
		return -1;

	size = closure->start[1] >> 16;

	return wl_connection_queue(connection, closure->start, size);
}
コード例 #3
0
ファイル: connection.c プロジェクト: antognolli/wayland
int
wl_closure_queue(struct wl_closure *closure, struct wl_connection *connection)
{
	uint32_t buffer[256];
	int size;

	if (copy_fds_to_connection(closure, connection))
		return -1;

	size = serialize_closure(closure, buffer, 256);
	if (size < 0)
		return -1;

	return wl_connection_queue(connection, buffer, size);
}