summaryrefslogtreecommitdiff
path: root/common/xfpm-brightness.h
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2011-01-04 12:50:41 +0100
committerAli Abdallah <aliov@xfce.org>2011-01-04 12:50:41 +0100
commitbda605a30808def8b66f144deae800eb9a985f59 (patch)
treec40db3a5e6469c0bcce7ac7f38dd1a7da93a3417 /common/xfpm-brightness.h
parent887bbe6922a6a8ebb894d75456ecffab6ce2c0d7 (diff)
downloadixfce4-power-manager-bda605a30808def8b66f144deae800eb9a985f59.tar.gz
HAL has been deprecated and unmaintained for a long time now, and isn't being
installed by newer distros any more, so it's time to get rid of the HAL brightness backend entirely, so drop it. Since there are still X.org drivers which do not support brightness setting through XRandR, add a xfpm-power-backlight-helper program which reads/writes brightness setting in /sys/class/backlight/, and use it as a fallback if XRandR brightness isn't available. Reading doesn't require any privileges, but for writing the helper needs to be run as root through pkexec, so add a default policy which allows running that without a password for the local foreground console. This was inspired from gnome-power-manager: http://git.gnome.org/browse/gnome-power-manager/commit/?id=4886023c and the helper code comes from gpm, with slight adaptions.
Diffstat (limited to 'common/xfpm-brightness.h')
-rw-r--r--common/xfpm-brightness.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/common/xfpm-brightness.h b/common/xfpm-brightness.h
index 4fa37d7c..e6873711 100644
--- a/common/xfpm-brightness.h
+++ b/common/xfpm-brightness.h
@@ -29,14 +29,6 @@ G_BEGIN_DECLS
#define XFPM_BRIGHTNESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XFPM_TYPE_BRIGHTNESS, XfpmBrightness))
#define XFPM_IS_BRIGHTNESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFPM_TYPE_BRIGHTNESS))
-typedef enum
-{
- XFPM_BRIGHTNESS_CONTROL_UNKNOWN,
- XFPM_BRIGHTNESS_CONTROL_XRANDR,
- XFPM_BRIGHTNESS_CONTROL_HAL
-
-} XfpmBrightnessControl;
-
typedef struct XfpmBrightnessPrivate XfpmBrightnessPrivate;
typedef struct
@@ -76,10 +68,6 @@ gboolean xfpm_brightness_set_level (XfpmBrightness *brightness,
gboolean xfpm_brightness_dim_down (XfpmBrightness *brightness);
-XfpmBrightnessControl xfpm_brightness_get_control (XfpmBrightness *brightness);
-
-gboolean xfpm_brightness_in_hw (XfpmBrightness *brightness);
-
G_END_DECLS
#endif /* __XFPM_BRIGHTNESS_H */