gmenuexporter.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright © 2011 Canonical Ltd.
  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, but
  12. * 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 Public
  17. * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  18. *
  19. * Author: Ryan Lortie <desrt@desrt.ca>
  20. */
  21. #ifndef __G_MENU_EXPORTER_H__
  22. #define __G_MENU_EXPORTER_H__
  23. #include <gio/gdbusconnection.h>
  24. #include <gio/gmenumodel.h>
  25. G_BEGIN_DECLS
  26. /**
  27. * G_MENU_EXPORTER_MAX_SECTION_SIZE:
  28. *
  29. * The maximum number of entries in a menu section supported by
  30. * g_dbus_connection_export_menu_model().
  31. *
  32. * The exact value of the limit may change in future GLib versions.
  33. *
  34. * Since: 2.76
  35. */
  36. #define G_MENU_EXPORTER_MAX_SECTION_SIZE 1000 \
  37. GIO_AVAILABLE_MACRO_IN_2_76
  38. GIO_AVAILABLE_IN_2_32
  39. guint g_dbus_connection_export_menu_model (GDBusConnection *connection,
  40. const gchar *object_path,
  41. GMenuModel *menu,
  42. GError **error);
  43. GIO_AVAILABLE_IN_2_32
  44. void g_dbus_connection_unexport_menu_model (GDBusConnection *connection,
  45. guint export_id);
  46. G_END_DECLS
  47. #endif /* __G_MENU_EXPORTER_H__ */