From 04498e56aeef5a3e1b89b07745ebc226bd059707 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 13 Jul 2016 00:22:34 +0200 Subject: Work on handling requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/output.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/output.h') diff --git a/src/output.h b/src/output.h index 3c56de5..8d59eec 100644 --- a/src/output.h +++ b/src/output.h @@ -175,3 +175,35 @@ __attribute__((pure)) #endif int output_cmp_by_name(const void* a, const void* b); +/** + * Find an output by its name + * + * @param key The name of the output + * @param base The array of outputs + * @param n The number of elements in `base` + * @return Output find in `base`, `NULL` if not found + */ +#if defined(__GNUC__) +__attribute__((pure)) +#endif +struct output* output_find_by_name(const char* key, struct output* base, size_t n); + +/** + * Add a filter to an output + * + * @param output The output + * @param filter The filter + * @return The index given to the filter, -1 on error + */ +ssize_t add_filter(struct output* output, struct filter* filter); + +/** + * Recalculate the resulting gamma and + * update push the new gamam ramps to the CRTC + * + * @param output The output + * @param first_updated The index of the first added or removed filter + * @return Zero on success, -1 on error + */ +int flush_filters(struct output* output, size_t first_updated); + -- cgit v1.2.3-70-g09d2