-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbacklight.h
32 lines (24 loc) · 985 Bytes
/
backlight.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef XBACKLIGHT_XBACKLIGHT_H
#define XBACKLIGHT_XBACKLIGHT_H
typedef enum {
BACKLIGHT_INTERNAL_ERROR = -1,
BACKLIGHT_OK = 0,
BACKLIGHT_OPEN_ERROR = 1,
BACKLIGHT_READ_ERROR = 2,
BACKLIGHT_WRITE_ERROR = 3,
BACKLIGHT_XRANDR_ERROR = 4,
BACKLIGHT_ATOM_ERROR = 5,
BACKLIGHT_PROPERTY_ERROR = 6,
} backlight_error_t;
// dpy_name is the display to be used, If set to NULL, will use DISPLAY env variable
// If using alt_backlight dpy_name is the filename of the brightness file
backlight_error_t bright_setup(char const *dpy_name, int step_conf, int time_conf);
// Backlight values go from 0 to 100
// Increment brightness of the backlight
backlight_error_t bright_inc_(double value);
// Decrement brightness of the backlight
backlight_error_t bright_dec_(double value);
// Set brightness of the backlight to a certain number
backlight_error_t bright_set_(double value);
backlight_error_t bright_get_(double *value);
#endif // XBACKLIGHT_XBACKLIGHT_H