diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-13 00:22:34 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-13 00:22:34 +0200 |
commit | 04498e56aeef5a3e1b89b07745ebc226bd059707 (patch) | |
tree | f4b0927cd64dcd6c6f4a64e574d9078bfe3fc6b9 /src/output.h | |
parent | Implement main loop and handling of inbound connections + remove server_message (though like this was an mds server and not a stand-alone server) (diff) | |
download | coopgammad-04498e56aeef5a3e1b89b07745ebc226bd059707.tar.gz coopgammad-04498e56aeef5a3e1b89b07745ebc226bd059707.tar.bz2 coopgammad-04498e56aeef5a3e1b89b07745ebc226bd059707.tar.xz |
Work on handling requests
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/output.h | 32 |
1 files changed, 32 insertions, 0 deletions
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); + |