From 5a055fafadbee61260649db3d482dcde798aaac4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 27 Aug 2022 22:15:40 +0200 Subject: Add more library functions With this commit, the following functions have been added to the library: - int luxinc(struct luxdisp *, int) | Increment brightness by a raw value - int luxdec(struct luxdisp *, int) | Decrement brightness by a raw value - double luxgetp(struct luxdisp *) | Get the current brightness as a percentage - double luxsetp(struct luxdisp *, double) | Set the current brightness with a percentage - double luxincp(struct luxdisp *, double) | Increment brightness by a percentage - double luxdecp(struct luxdisp *, double) | Decrement brightness by a percentage --- lux.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lux.h') diff --git a/lux.h b/lux.h index 12198f9..9b21450 100644 --- a/lux.h +++ b/lux.h @@ -27,10 +27,17 @@ struct luxdisp { FILE *__bstream; }; +void luxfree(struct luxdisp *); int luxinit(struct luxdisp *); +int luxmax(struct luxdisp *); int luxget(struct luxdisp *); int luxset(struct luxdisp *, int); -int luxmax(struct luxdisp *); -void luxfree(struct luxdisp *); +int luxinc(struct luxdisp *, int); +int luxdec(struct luxdisp *, int); + +double luxgetp(struct luxdisp *); +double luxsetp(struct luxdisp *, double); +double luxincp(struct luxdisp *, double); +double luxdecp(struct luxdisp *, double); #endif /* !LUX_H */ -- cgit v1.2.3