aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/lux.h.028
-rw-r--r--man/luxget.314
-rw-r--r--man/luxinit.320
-rw-r--r--man/luxset.316
4 files changed, 39 insertions, 39 deletions
diff --git a/man/lux.h.0 b/man/lux.h.0
index 458c3c7..f877cf2 100644
--- a/man/lux.h.0
+++ b/man/lux.h.0
@@ -15,7 +15,7 @@
.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 1 2022 $
+.Dd $Mdocdate: October 12 2022 $
.Dt lux.h 0
.Os
.Sh NAME
@@ -31,7 +31,7 @@ library is a C library
that allows you to query information about and modify the state of the systems
display brightness.
The library defines a
-.Vt struct luxdisp
+.Vt lux_t
type which is used as an argument to all the library functions.
This struct contains relevant file descriptors and other cacheable information;
it’s fields are not intended to be accessed directly by the library user but
@@ -41,7 +41,7 @@ The
.Nm liblux
library offers three sets of functions, each with their own manual.
These sets of functions are used to allocate and free the
-.Vt struct luxdisp
+.Vt lux_t
structure, to query brightness information, and to modify brightness
information.
.Pp
@@ -49,10 +49,10 @@ The following functions deal with the allocation of library structures:
.Bl -bullet
.It
.Ft int
-.Fn luxinit "struct luxdisp *"
+.Fn luxinit "lux_t *"
.It
.Ft void
-.Fn luxfree "struct luxdisp *"
+.Fn luxfree "lux_t *"
.El
.Pp
The following functions deal with querying information regarding display
@@ -60,35 +60,35 @@ brightness:
.Bl -bullet
.It
.Ft int
-.Fn luxget "struct luxdisp *"
+.Fn luxget "lux_t *"
.It
.Ft int
-.Fn luxmax "struct luxdisp *"
+.Fn luxmax "lux_t *"
.It
.Ft double
-.Fn luxgetp "struct luxdisp *"
+.Fn luxgetp "lux_t *"
.El
.Pp
The following functions deal with modifying display brightness:
.Bl -bullet
.It
.Ft int
-.Fn luxset "struct luxdisp *" int
+.Fn luxset "lux_t *" int
.It
.Ft int
-.Fn luxinc "struct luxdisp *" int
+.Fn luxinc "lux_t *" int
.It
.Ft int
-.Fn luxdec "struct luxdisp *" int
+.Fn luxdec "lux_t *" int
.It
.Ft double
-.Fn luxsetp "struct luxdisp *" double
+.Fn luxsetp "lux_t *" double
.It
.Ft double
-.Fn luxincp "struct luxdisp *" double
+.Fn luxincp "lux_t *" double
.It
.Ft double
-.Fn luxdecp "struct luxdisp *" double
+.Fn luxdecp "lux_t *" double
.El
.Sh SEE ALSO
.Xr luxdec 3 ,
diff --git a/man/luxget.3 b/man/luxget.3
index cb4b00f..1f72e1f 100644
--- a/man/luxget.3
+++ b/man/luxget.3
@@ -15,7 +15,7 @@
.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 1 2022 $
+.Dd $Mdocdate: October 12 2022 $
.Dt LUXGET 3
.Os
.Sh NAME
@@ -28,16 +28,16 @@
.Sh SYNOPSIS
.In lux.h
.Ft int
-.Fn luxget "struct luxdisp *disp"
+.Fn luxget "lux_t *disp"
.Ft int
-.Fn luxmax "struct luxdisp *disp"
+.Fn luxmax "lux_t *disp"
.Ft double
-.Fn luxgetp "struct luxdisp *disp"
+.Fn luxgetp "lux_t *disp"
.Sh DESCRIPTION
The
.Fn luxget
function takes a pointer to a
-.Vt "struct luxdisp"
+.Vt lux_t
structure and returns the raw brightness value of the associated display.
If the function returns \-1 it means that an error has occurred, however this is
only possible if
@@ -64,7 +64,7 @@ functions.
The
.Fn luxgetp
function takes a pointer to a
-.Vt "struct luxdisp"
+.Vt lux_t
structure and returns the brightness of the associated display as a percentage.
A return value of 100.0 means the display is at 100% brightness.
If the function returns \-1 it means that an error has occurred.
@@ -106,7 +106,7 @@ main(void)
{
int cur, max;
double curp;
- struct luxdisp disp;
+ lux_t disp;
luxinit(&disp);
diff --git a/man/luxinit.3 b/man/luxinit.3
index 95a05c5..14bca55 100644
--- a/man/luxinit.3
+++ b/man/luxinit.3
@@ -15,33 +15,33 @@
.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 1 2022 $
+.Dd $Mdocdate: October 12 2022 $
.Dt LUXINIT 3
.Os
.Sh NAME
.Nm luxinit ,
.Nm luxfree
-.Nd initialise and destroy a luxdisp struct
+.Nd initialise and destroy a lux_t object
.Sh LIBRARY
.Lb liblux
.Sh SYNOPSIS
.In lux.h
.Ft int
-.Fn luxinit "struct luxdisp *disp"
+.Fn luxinit "lux_t *disp"
.Ft void
-.Fn luxfree "struct luxdisp *disp"
+.Fn luxfree "lux_t *disp"
.Sh DESCRIPTION
The
.Fn luxinit
function initialises the values of the
-.Vt "struct luxdisp"
+.Vt lux_t
structure pointed to by
.Va disp .
Allocation of
.Va disp
is left up to the user.
All
-.Vt "struct luxdisp"
+.Vt lux_t
structures should be initialised with the
.Fn luxinit
function before being used with any other library functions.
@@ -51,11 +51,11 @@ The
function does the opposite of the
.Fn luxinit
function, cleaning up all the resources used by the
-.Vt "struct luxdisp"
+.Vt lux_t
structure pointed to by
.Va disp .
This function should be called for all
-.Vt "struct luxdisp"
+.Vt lux_t
structures that have been initialised by
.Fn luxinit
after they are no longer required.
@@ -75,7 +75,7 @@ The
function returns no value.
.Sh EXAMPLES
The following program initialises a new
-.Vt "struct luxdisp"
+.Vt lux_t
structure, uses it to set the display brightness to 100%, and then frees the
resources used by the structure.
.Bd -literal -offset indent
@@ -87,7 +87,7 @@ resources used by the structure.
int
main(void)
{
- struct luxdisp disp;
+ lux_t disp;
if (luxinit(&disp) == -1)
err(EXIT_FAILURE, "luxinit");
diff --git a/man/luxset.3 b/man/luxset.3
index 9ee7592..22824f3 100644
--- a/man/luxset.3
+++ b/man/luxset.3
@@ -15,7 +15,7 @@
.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 1 2022 $
+.Dd $Mdocdate: October 12 2022 $
.Dt LUXSET 3
.Os
.Sh NAME
@@ -31,17 +31,17 @@
.Sh SYNOPSIS
.In lux.h
.Ft int
-.Fn luxset "struct luxdisp *disp" "int n"
+.Fn luxset "lux_t *disp" "int n"
.Ft int
-.Fn luxinc "struct luxdisp *disp" "int n"
+.Fn luxinc "lux_t *disp" "int n"
.Ft int
-.Fn luxdec "struct luxdisp *disp" "int n"
+.Fn luxdec "lux_t *disp" "int n"
.Ft double
-.Fn luxsetp "struct luxdisp *disp" "double p"
+.Fn luxsetp "lux_t *disp" "double p"
.Ft double
-.Fn luxincp "struct luxdisp *disp" "double p"
+.Fn luxincp "lux_t *disp" "double p"
.Ft double
-.Fn luxdecp "struct luxdisp *disp" "double p"
+.Fn luxdecp "lux_t *disp" "double p"
.Sh DESCRIPTION
The
.Fn luxset
@@ -126,7 +126,7 @@ int
main(int argc, char **argv)
{
int opt;
- struct luxdisp disp;
+ lux_t disp;
luxinit(&disp);
while ((opt = getopt(argc, argv, ":i:d:")) != -1) {