screen_share_display_buffers()

Cause a window to display content visible on another display

Synopsis:

#include <screen/screen.h>
int screen_share_display_buffers(screen_window_t win,
                                 screen_display_t share,
                                 int count)

Arguments:

win
The handle of the window who is sharing its buffer(s).
share
The handle of the display who is sharing buffer(s).
count
The number of buffers that is shared by the window to the display. A value of 0 will default to Screen selecting the appropriate values for properties such as SCREEN_PROPERTY_FORMAT, SCREEN_PROPERTY_USAGE, and SCREEN_PROPERTY_BUFFER_SIZE.

Library:

libscreen

Description:

Function Type: Flushing Execution

This function creates a count number of buffers with the size defined by the SCREEN_PROPERTY_BUFFER_SIZE window property of win. These buffers are rendered by Screen. The display is used to generate content for the (window) buffers. Once there is a post for the window win, the content of the buffers is displayed on the display share. To share display buffers, you need to be working within a privileged context. Therefore, a context that was created with the type SCREEN_DISPLAY_MANAGER_CONTEXT must be used.

If the display has a framebuffer, then screen_share_display_buffers() is similar to screen_share_window_buffers().

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).