diff options
Diffstat (limited to 'src/drmgamma.h')
-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 |