gpowerprofilemonitor.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* GIO - GLib Input, Output and Streaming Library
  2. *
  3. * Copyright 2019 Red Hat, Inc.
  4. * Copyright 2021 Igalia S.L.
  5. *
  6. * SPDX-License-Identifier: LGPL-2.1-or-later
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2.1 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General
  19. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #ifndef __G_POWER_PROFILE_MONITOR_H__
  22. #define __G_POWER_PROFILE_MONITOR_H__
  23. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  24. #error "Only <gio/gio.h> can be included directly."
  25. #endif
  26. #include <gio/giotypes.h>
  27. G_BEGIN_DECLS
  28. /**
  29. * G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME:
  30. *
  31. * Extension point for power profile usage monitoring functionality.
  32. * See [Extending GIO][extending-gio].
  33. *
  34. * Since: 2.70
  35. */
  36. #define G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME "gio-power-profile-monitor"
  37. #define G_TYPE_POWER_PROFILE_MONITOR (g_power_profile_monitor_get_type ())
  38. GIO_AVAILABLE_IN_2_70
  39. G_DECLARE_INTERFACE (GPowerProfileMonitor, g_power_profile_monitor, g, power_profile_monitor, GObject)
  40. #define G_POWER_PROFILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_POWER_PROFILE_MONITOR, GPowerProfileMonitor))
  41. #define G_IS_POWER_PROFILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_POWER_PROFILE_MONITOR))
  42. #define G_POWER_PROFILE_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_POWER_PROFILE_MONITOR, GPowerProfileMonitorInterface))
  43. struct _GPowerProfileMonitorInterface
  44. {
  45. /*< private >*/
  46. GTypeInterface g_iface;
  47. };
  48. GIO_AVAILABLE_IN_2_70
  49. GPowerProfileMonitor *g_power_profile_monitor_dup_default (void);
  50. GIO_AVAILABLE_IN_2_70
  51. gboolean g_power_profile_monitor_get_power_saver_enabled (GPowerProfileMonitor *monitor);
  52. G_END_DECLS
  53. #endif /* __G_POWER_PROFILE_MONITOR_H__ */