aboutsummaryrefslogtreecommitdiffstats
path: root/libcoopgamma_get_gamma_info_sync.3
blob: 31872311d635983e846902f2d941d9f079d291fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.TH LIBCOOPGAMMA_GET_GAMMA_INFO_SYNC 3 LIBCOOPGAMMA
.SH "NAME"
libcoopgamma_get_gamma_info_sync - Synchronously retrieve metainformation about a CRTC's gamma ramps
.SH "SYNOPSIS"
.nf
#include <libcoopgamma.h>

int libcoopgamma_get_gamma_info_sync(const char* restrict \fIcrtc\fP,
                                     libcoopgamma_crtc_info_t* restrict \fIinfo\fP,
                                     libcoopgamma_context_t *restrict \fIctx\fP);
.fi
.P
Link with
.IR -lcoopgamma .
.SH "DESCRIPTION"
The
.BR libcoopgamma_get_gamma_info_sync ()
function synchronously retrieves metainformation
about the CRTC's, whose name is
.IR crtc ,
gamma ramps over the connection of
.I ctx
to the server.
.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_sync ()
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_send ()
function may fail for any reason specified for
.BR libcoopgamma_get_gamma_info_send (3),
.BR libcoopgamma_get_gamma_info_recv (3),
.BR libcoopgamma_flush (3),
or
.BR libcoopgamma_synchronise (3).
.SH "SEE ALSO"
.BR libcoopgamma.h (0),
.BR libcoopgamma_crtc_info_initialise (3),
.BR libcoopgamma_get_gamma_info_send (3),
.BR libcoopgamma_get_gamma_info_recv (3),
.BR libcoopgamma_get_crtcs_sync (3),
.BR libcoopgamma_get_gamma_sync (3),
.BR libcoopgamma_set_gamma_sync (3)