diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-05-22 01:00:24 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-05-22 01:00:24 +0200 |
commit | ffc354a0fd1c497b50176b63a6da6cbf6be90534 (patch) | |
tree | c9e55138a17d7fc01535131960cadda091befaef /src/libgamma-method.h | |
parent | doc (diff) | |
download | libgamma-ffc354a0fd1c497b50176b63a6da6cbf6be90534.tar.gz libgamma-ffc354a0fd1c497b50176b63a6da6cbf6be90534.tar.bz2 libgamma-ffc354a0fd1c497b50176b63a6da6cbf6be90534.tar.xz |
add initialise, destroy and free for gamma ramps
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/libgamma-method.h')
-rw-r--r-- | src/libgamma-method.h | 162 |
1 files changed, 162 insertions, 0 deletions
diff --git a/src/libgamma-method.h b/src/libgamma-method.h index ec15f86..c3fb36a 100644 --- a/src/libgamma-method.h +++ b/src/libgamma-method.h @@ -840,5 +840,167 @@ typedef struct libgamma_gamma_rampsd } libgamma_gamma_rampsd_t; + +/** + * Initialise a gamma ramp in the proper way that allows all adjustment + * methods to read from and write to it without causing segmentation violation + * + * The input must have `red_size`, `green_size` and `blue_size` set to the + * sizes of the gamma ramps that should be allocated + * + * @param this The gamma ramps + * @return Zero on success, -1 on allocation error, `errno` will be set accordingly + */ +int libgamma_gamma_ramps_initialise(libgamma_gamma_ramps_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_ramps_initialise` or otherwise + * initialises in the proper manner + * + * @param this The gamma ramps + */ +void libgamma_gamma_ramps_destroy(libgamma_gamma_ramps_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_ramps_initialise` or otherwise + * initialises in the proper manner, as well as release the pointer + * to the structure + * + * @param this The gamma ramps + */ +void libgamma_gamma_ramps_free(libgamma_gamma_ramps_t* restrict this); + + +/** + * Initialise a gamma ramp in the proper way that allows all adjustment + * methods to read from and write to it without causing segmentation violation + * + * The input must have `red_size`, `green_size` and `blue_size` set to the + * sizes of the gamma ramps that should be allocated + * + * @param this The gamma ramps + * @return Zero on success, -1 on allocation error, `errno` will be set accordingly + */ +int libgamma_gamma_ramps32_initialise(libgamma_gamma_ramps32_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_ramps32_initialise` or otherwise + * initialises in the proper manner + * + * @param this The gamma ramps + */ +void libgamma_gamma_ramps32_destroy(libgamma_gamma_ramps32_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_ramps32_initialise` or otherwise + * initialises in the proper manner, as well as release the pointer + * to the structure + * + * @param this The gamma ramps + */ +void libgamma_gamma_ramps32_free(libgamma_gamma_ramps32_t* restrict this); + + +/** + * Initialise a gamma ramp in the proper way that allows all adjustment + * methods to read from and write to it without causing segmentation violation + * + * The input must have `red_size`, `green_size` and `blue_size` set to the + * sizes of the gamma ramps that should be allocated + * + * @param this The gamma ramps + * @return Zero on success, -1 on allocation error, `errno` will be set accordingly + */ +int libgamma_gamma_ramps64_initialise(libgamma_gamma_ramps64_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_ramps64_initialise` or otherwise + * initialises in the proper manner + * + * @param this The gamma ramps + */ +void libgamma_gamma_ramps64_destroy(libgamma_gamma_ramps64_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_ramps64_initialise` or otherwise + * initialises in the proper manner, as well as release the pointer + * to the structure + * + * @param this The gamma ramps + */ +void libgamma_gamma_ramps64_free(libgamma_gamma_ramps64_t* restrict this); + + +/** + * Initialise a gamma ramp in the proper way that allows all adjustment + * methods to read from and write to it without causing segmentation violation + * + * The input must have `red_size`, `green_size` and `blue_size` set to the + * sizes of the gamma ramps that should be allocated + * + * @param this The gamma ramps + * @return Zero on success, -1 on allocation error, `errno` will be set accordingly + */ +int libgamma_gamma_rampsf_initialise(libgamma_gamma_rampsf_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_rampsf_initialise` or otherwise + * initialises in the proper manner + * + * @param this The gamma ramps + */ +void libgamma_gamma_rampsf_destroy(libgamma_gamma_rampsf_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_rampsf_initialise` or otherwise + * initialises in the proper manner, as well as release the pointer + * to the structure + * + * @param this The gamma ramps + */ +void libgamma_gamma_rampsf_free(libgamma_gamma_rampsf_t* restrict this); + + +/** + * Initialise a gamma ramp in the proper way that allows all adjustment + * methods to read from and write to it without causing segmentation violation + * + * The input must have `red_size`, `green_size` and `blue_size` set to the + * sizes of the gamma ramps that should be allocated + * + * @param this The gamma ramps + * @return Zero on success, -1 on allocation error, `errno` will be set accordingly + */ +int libgamma_gamma_rampsd_initialise(libgamma_gamma_rampsd_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_rampsd_initialise` or otherwise + * initialises in the proper manner + * + * @param this The gamma ramps + */ +void libgamma_gamma_rampsd_destroy(libgamma_gamma_rampsd_t* restrict this); + +/** + * Release resources that are held by a gamma ramp strcuture that + * has been allocated by `libgamma_gamma_rampsd_initialise` or otherwise + * initialises in the proper manner, as well as release the pointer + * to the structure + * + * @param this The gamma ramps + */ +void libgamma_gamma_rampsd_free(libgamma_gamma_rampsd_t* restrict this); + + + #endif |