aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-11-20 15:45:17 +0100
committerMattias Andrée <m@maandree.se>2026-11-20 15:45:17 +0100
commit6421c8217b38d7b5605c652b89793b2de0192d91 (patch)
tree5234e86fc5d223be29e0751b0e6165d26ba12f55 /libgamma.h
parentfix typo (diff)
downloadlibgamma-master.tar.gz
libgamma-master.tar.bz2
libgamma-master.tar.xz
Add libgamma_get_fd and fix some minor issuesHEAD0.9master
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--libgamma.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/libgamma.h b/libgamma.h
index ab66afc..93af622 100644
--- a/libgamma.h
+++ b/libgamma.h
@@ -1849,7 +1849,7 @@ int libgamma_value_of_error(const char *);
* @return The group that the user needs to be a member of
* if `LIBGAMMA_DEVICE_REQUIRE_GROUP` is returned
*/
-LIBGAMMA_GCC_ONLY__(__attribute__((__warn_unused_result__)))
+LIBGAMMA_GCC_ONLY__(__attribute__((__warn_unused_result__, __pure__)))
#ifndef __WIN32__
gid_t libgamma_group_gid_get(void);
#else
@@ -1878,7 +1878,7 @@ void libgamma_group_gid_set(short);
* if the name of the group `libgamma_group_gid` cannot
* be determined
*/
-LIBGAMMA_GCC_ONLY__(__attribute__((__warn_unused_result__)))
+LIBGAMMA_GCC_ONLY__(__attribute__((__warn_unused_result__, __pure__)))
const char *libgamma_group_name_get(void);
/**
@@ -2320,6 +2320,18 @@ LIBGAMMA_GCC_ONLY__(__attribute__((__nonnull__)))
void libgamma_site_destroy(struct libgamma_site_state *restrict);
/**
+ * Get the file descriptor used to communicate with the display server
+ *
+ * @param this The site state
+ * @return The file descriptor, or -1 if the adjustment method does not
+ * use a file descriptor to communicate with the display server;
+ * the file descriptor is owned by the site state and must not be
+ * closed by the caller
+ */
+LIBGAMMA_GCC_ONLY__(__attribute__((__nonnull__, __warn_unused_result__)))
+int libgamma_get_fd(struct libgamma_site_state *restrict);
+
+/**
* Release all resources held by a site state
* and free the site state pointer
*