gnotification.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright © 2013 Lars Uebernickel
  3. *
  4. * SPDX-License-Identifier: LGPL-2.1-or-later
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General
  17. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  18. *
  19. * Authors: Lars Uebernickel <lars@uebernic.de>
  20. */
  21. #ifndef __G_NOTIFICATION_H__
  22. #define __G_NOTIFICATION_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. #include <gio/gioenums.h>
  28. G_BEGIN_DECLS
  29. #define G_TYPE_NOTIFICATION (g_notification_get_type ())
  30. #define G_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NOTIFICATION, GNotification))
  31. #define G_IS_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NOTIFICATION))
  32. GIO_AVAILABLE_IN_2_40
  33. GType g_notification_get_type (void) G_GNUC_CONST;
  34. GIO_AVAILABLE_IN_2_40
  35. GNotification * g_notification_new (const gchar *title);
  36. GIO_AVAILABLE_IN_2_40
  37. void g_notification_set_title (GNotification *notification,
  38. const gchar *title);
  39. GIO_AVAILABLE_IN_2_40
  40. void g_notification_set_body (GNotification *notification,
  41. const gchar *body);
  42. GIO_AVAILABLE_IN_2_40
  43. void g_notification_set_icon (GNotification *notification,
  44. GIcon *icon);
  45. GIO_DEPRECATED_IN_2_42_FOR(g_notification_set_priority)
  46. void g_notification_set_urgent (GNotification *notification,
  47. gboolean urgent);
  48. GIO_AVAILABLE_IN_2_42
  49. void g_notification_set_priority (GNotification *notification,
  50. GNotificationPriority priority);
  51. GIO_AVAILABLE_IN_2_70
  52. void g_notification_set_category (GNotification *notification,
  53. const gchar *category);
  54. GIO_AVAILABLE_IN_2_40
  55. void g_notification_add_button (GNotification *notification,
  56. const gchar *label,
  57. const gchar *detailed_action);
  58. GIO_AVAILABLE_IN_2_40
  59. void g_notification_add_button_with_target (GNotification *notification,
  60. const gchar *label,
  61. const gchar *action,
  62. const gchar *target_format,
  63. ...);
  64. GIO_AVAILABLE_IN_2_40
  65. void g_notification_add_button_with_target_value (GNotification *notification,
  66. const gchar *label,
  67. const gchar *action,
  68. GVariant *target);
  69. GIO_AVAILABLE_IN_2_40
  70. void g_notification_set_default_action (GNotification *notification,
  71. const gchar *detailed_action);
  72. GIO_AVAILABLE_IN_2_40
  73. void g_notification_set_default_action_and_target (GNotification *notification,
  74. const gchar *action,
  75. const gchar *target_format,
  76. ...);
  77. GIO_AVAILABLE_IN_2_40
  78. void g_notification_set_default_action_and_target_value (GNotification *notification,
  79. const gchar *action,
  80. GVariant *target);
  81. G_END_DECLS
  82. #endif