screen_discard_window_regions()

Updated: April 19, 2023

Discard the specified window regions

Synopsis:

#include <screen/screen.h>
int screen_discard_window_regions(screen_window_t win,
                                  int count,
                                  const int *rects)

Arguments:

win
The handle of the window in which you want to specify regions to discard.
count
The number of rectangles (rectangular regions) you want to discard, specified in the rects argument. The value of count can be 0.
rects
An array of integers containing the x, y, width, and height coordinates of rectangles that bound areas in the window you want to discard. The rects argument must provide at least 4 times count integers (quadruples of x, y, width and height).

Library:

libscreen

Description:

Function Type: Delayed Execution

This function is a hole-punching API. Use this function to specify window regions you want to discard. The regions behave as if they were transparent, or as if there was no transparency on the window. When you call this function, it invalidates any regions you might have defined previously. You can call this function with count set to 0 to remove discarded regions.

Returns:

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