From b0e30ceba2288eab10c6ff7be0ac0cb05a9ed0b7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:51:51 +0200 Subject: Adding upstream version 43.0. Signed-off-by: Daniel Baumann --- plugins/power/gsd-backlight.h | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 plugins/power/gsd-backlight.h (limited to 'plugins/power/gsd-backlight.h') diff --git a/plugins/power/gsd-backlight.h b/plugins/power/gsd-backlight.h new file mode 100644 index 0000000..e4fac6b --- /dev/null +++ b/plugins/power/gsd-backlight.h @@ -0,0 +1,81 @@ +/* -*- mode: c; style: linux -*- + * + * Copyright (C) 2017 Red Hat, Inc. + * + * Written by: Benjamin Berg + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef _GSD_BACKLIGHT_H +#define _GSD_BACKLIGHT_H + +#include +#include + +#define GNOME_DESKTOP_USE_UNSTABLE_API +#include + + +G_BEGIN_DECLS + +#define GSD_TYPE_BACKLIGHT gsd_backlight_get_type () +G_DECLARE_FINAL_TYPE (GsdBacklight, gsd_backlight, GSD, BACKLIGHT, GObject); + +gint gsd_backlight_get_brightness (GsdBacklight *backlight, + gint *target); + +void gsd_backlight_set_brightness_async (GsdBacklight *backlight, + gint percentage, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +void gsd_backlight_step_up_async (GsdBacklight *backlight, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +void gsd_backlight_step_down_async (GsdBacklight *backlight, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +void gsd_backlight_cycle_up_async (GsdBacklight *backlight, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gint gsd_backlight_set_brightness_finish (GsdBacklight *backlight, + GAsyncResult *res, + GError **error); + +gint gsd_backlight_step_up_finish (GsdBacklight *backlight, + GAsyncResult *res, + GError **error); + +gint gsd_backlight_step_down_finish (GsdBacklight *backlight, + GAsyncResult *res, + GError **error); + +gint gsd_backlight_cycle_up_finish (GsdBacklight *backlight, + GAsyncResult *res, + GError **error); + +const char* gsd_backlight_get_connector (GsdBacklight *backlight); + +GsdBacklight* gsd_backlight_new (GnomeRRScreen *screen, + GError **error); + + +G_END_DECLS + +#endif /* _GSD_BACKLIGHT_H */ -- cgit v1.2.3