diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-08-06 23:14:12 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-08-06 23:14:12 +0200 |
commit | d600c356023d123d77311897210acec661e2a386 (patch) | |
tree | 03b0edc40579c10f7bc59bd55cc7d8299b55d320 /src/drmgamma.h | |
parent | work on drm utilisation (diff) | |
download | crt-calibrator-d600c356023d123d77311897210acec661e2a386.tar.gz crt-calibrator-d600c356023d123d77311897210acec661e2a386.tar.bz2 crt-calibrator-d600c356023d123d77311897210acec661e2a386.tar.xz |
reading and apply gamma ramps
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/drmgamma.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/src/drmgamma.h b/src/drmgamma.h index efc7ec2..e82159d 100644 --- a/src/drmgamma.h +++ b/src/drmgamma.h @@ -61,6 +61,7 @@ typedef struct drm_card } drm_card_t; + /** * CRT controller information */ @@ -94,11 +95,32 @@ typedef struct drm_crtc /** * The CRT's EDID, hexadecimally encoded */ - char* edid; + char* restrict edid; + + /** + * The number of stops on the gamma ramps + */ + size_t gamma_stops; + + /** + * The gamma ramp for the red channel + */ + uint16_t* restrict red; + + /** + * The gamma ramp for the green channel + */ + uint16_t* restrict green; + + /** + * The gamma ramp for the blue channel + */ + uint16_t* restrict blue; } drm_crtc_t; + /** * Figure out how many graphics cards there are on the system * @@ -139,6 +161,22 @@ int drm_crtc_open(size_t index, drm_card_t* restrict card, drm_crtc_t* restrict */ void drm_crtc_close(drm_crtc_t* restrict crtc); +/** + * Read the gamma ramps for a CRT controller + * + * @param crtc CRT controller information + * @return Zero on success, -1 on error + */ +int drm_get_gamma(drm_crtc_t* restrict crtc); + +/** + * Apply gamma ramps for a CRT controller + * + * @param crtc CRT controller information + * @return Zero on success, -1 on error + */ +int drm_set_gamma(drm_crtc_t* restrict crtc); + #endif |