From bf4020471356938b9181a33984f511ffdd7ff25b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 22 Oct 2019 18:59:27 +0200 Subject: Change license, change style, clean up, flat file hier, clean valgrind output in test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcoopgamma_get_gamma_info_recv.3 | 150 +++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 libcoopgamma_get_gamma_info_recv.3 (limited to 'libcoopgamma_get_gamma_info_recv.3') diff --git a/libcoopgamma_get_gamma_info_recv.3 b/libcoopgamma_get_gamma_info_recv.3 new file mode 100644 index 0000000..1307fe5 --- /dev/null +++ b/libcoopgamma_get_gamma_info_recv.3 @@ -0,0 +1,150 @@ +.TH LIBCOOPGAMMA_GET_GAMMA_INFO_RECV 3 LIBCOOPGAMMA +.SH "NAME" +libcoopgamma_get_gamma_info_recv - Receive metainformation about a CRTC's gamma ramps +.SH "SYNOPSIS" +.nf +#include + +int libcoopgamma_get_gamma_info_recv(libcoopgamma_crtc_info_t *restrict \fIinfo\fP, + libcoopgamma_context_t *restrict \fIctx\fP, + libcoopgamma_async_context_t *restrict \fIasync\fP); +.fi +.P +Link with +.IR -lcoopgamma . +.SH "DESCRIPTION" +The +.BR libcoopgamma_get_gamma_info_recv () +function parses the response for the requests +sent using the +.BR libcoopgamma_get_gamma_info_send () +function with the same +.I ctx +and +.I async +arguments. The +.I async +must have been selected by the last call to the +.BR libcoopgamma_synchronise (3) +function. +.P +The information about the CRTC's gamma ramps +will be stored in +.IR *info . +In particular, +.I info->cooperative +will be set to nonzero (actually 1) if there is +a coopgamma server running, +.I info->supported +will be set to +.IR LIBCOOPGAMMA_NO , +.IR LIBCOOPGAMMA_MAYBE , +or +.IR LIBCOOPGAMMA_YES , +which ever describes the state of gamma ramp +support on the CRTC. Unless +.I info->supported +is +.IR LIBCOOPGAMMA_NO , +the following will also be set: +.TP +.I info->red_size +The number of stops on the red gamma ramp. +.TP +.I info->green_size +The number of stops on the green gamma ramp. +.TP +.I info->blue_size +The number of stops on the blue gamma ramp. +.TP +.I info->depth +Describes the gamma ramp types used for the CRTC. +.P +The +.BR libcoopgamma_get_gamma_info_recv () +will also store monitor's colourspace information in +.IR *info . +In particular, +.I info->colourspace +will be set to +.IR LIBCOOPGAMMA_SRGB , +.IR LIBCOOPGAMMA_RGB , +.IR LIBCOOPGAMMA_NON_RGB , +.IR LIBCOOPGAMMA_GREY , +or +.IR LIBCOOPGAMMA_UNKNOWN , +and +.I info->have_gamut +will be set to 1 or 0. +.I info->have_gamut +should be set to 0 unless +.I info->colourspace +is set to +.I LIBCOOPGAMMA_SRGB +or +.IR LIBCOOPGAMMA_RGB , +and it should be set to 1 if +.I info->colourspace +is set to +.I LIBCOOPGAMMA_SRGB , +however there are no guarantees that +this is true. If +.I info->have_gamut +is non-zero, the following will also be set: +.TP +.I info->red_x +The x-value (CIE xyY) of the monitor's +red colour, multiplied by 1024. +.TP +.I info->red_y +The y-value (CIE xyY) of the monitor's +red colour, multiplied by 1024. +.TP +.I info->green_x +The x-value (CIE xyY) of the monitor's +green colour, multiplied by 1024. +.TP +.I info->green_y +The y-value (CIE xyY) of the monitor's +green colour, multiplied by 1024. +.TP +.I info->blue_x +The x-value (CIE xyY) of the monitor's +blue colour, multiplied by 1024. +.TP +.I info->blue_y +The y-value (CIE xyY) of the monitor's +blue colour, multiplied by 1024. +.TP +.I info->white_x +The x-value (CIE xyY) of the monitor's +default white point, multiplied by 1024. +.TP +.I info->white_y +The y-value (CIE xyY) of the monitor's +default white point, multiplied by 1024. +.SH "RETURN VALUES" +Upon successful completion, the +.BR libcoopgamma_get_gamma_info_recv () +function returns 0. On error, -1 is returned and +.I errno +is set appropriately. +.SH "ERRORS" +The +.BR libcoopgamma_get_gamma_info_recv () +function may fail for any reason specified for +.BR malloc (3). +The function may also fail for the following reasons: +.TP +.B EBADMSG +The received message was corrupt. +.SH "SEE ALSO" +.BR libcoopgamma.h (0), +.BR libcoopgamma_crtc_info_initialise (3), +.BR libcoopgamma_async_context_destroy (3), +.BR libcoopgamma_synchronise (3), +.BR libcoopgamma_get_gamma_info_send (3), +.BR libcoopgamma_get_gamma_info_sync (3), +.BR libcoopgamma_get_crtcs_recv (3), +.BR libcoopgamma_get_gamma_recv (3), +.BR libcoopgamma_set_gamma_recv (3) -- cgit v1.2.3-70-g09d2