zwlr_gamma_control_v1¤
wayland.zwlr_gamma_control_v1 ¤
Adjust gamma tables for an output
This interface allows a client to adjust gamma tables for a particular output.
The client will receive the gamma size, and will then be able to set gamma tables. At any time the compositor can send a failed event indicating that this object is no longer valid.
There can only be at most one gamma control object per output, which has exclusive access to this particular output. When the gamma control object is destroyed, the gamma table is restored to its original value.
Methods:
-
set_gamma
–Set the gamma table
-
destroy
–Destroy this control
-
on_gamma_size
–Size of gamma ramps.
-
on_failed
–Object no longer valid.
error ¤
-
invalid_gamma
–Invalid gamma tables
events
gamma_size ¤
failed ¤
failed() -> None
Object no longer valid
This event indicates that the gamma control is no longer valid. This can happen for a number of reasons, including: - The output doesn't support gamma tables - Setting the gamma tables failed - Another client already has exclusive gamma control for this output - The compositor has transferred gamma control to another client
Upon receiving this event, the client should destroy this object.
set_gamma ¤
set_gamma(fd: fd) -> None
Set the gamma table
Set the gamma table. The file descriptor can be memory-mapped to provide the raw gamma table, which contains successive gamma ramps for the red, green and blue channels. Each gamma ramp is an array of 16-byte unsigned integers which has the same length as the gamma size.
The file descriptor data must have the same length as three times the gamma size.
Parameters:
-
fd
¤fd
) –Gamma table file descriptor
destroy ¤
destroy() -> None
Destroy this control
Destroys the gamma control object. If the object is still valid, this restores the original gamma tables.
on_gamma_size ¤
on_gamma_size(size: int) -> None
Size of gamma ramps.
Override to handle wayland.zwlr_gamma_control_v1.events.gamma_size
.
on_failed ¤
on_failed() -> None
Object no longer valid.
Override to handle wayland.zwlr_gamma_control_v1.events.failed
.