(root)/
glib-2.79.0/
gio/
gmenuexporter.h
       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  
      22  #ifndef __G_MENU_EXPORTER_H__
      23  #define __G_MENU_EXPORTER_H__
      24  
      25  #include <gio/gdbusconnection.h>
      26  #include <gio/gmenumodel.h>
      27  
      28  G_BEGIN_DECLS
      29  
      30  /**
      31   * G_MENU_EXPORTER_MAX_SECTION_SIZE:
      32   *
      33   * The maximum number of entries in a menu section supported by
      34   * g_dbus_connection_export_menu_model().
      35   *
      36   * The exact value of the limit may change in future GLib versions.
      37   *
      38   * Since: 2.76
      39   */
      40  #define G_MENU_EXPORTER_MAX_SECTION_SIZE 1000 \
      41    GIO_AVAILABLE_MACRO_IN_2_76
      42  
      43  GIO_AVAILABLE_IN_2_32
      44  guint                   g_dbus_connection_export_menu_model             (GDBusConnection  *connection,
      45                                                                           const gchar      *object_path,
      46                                                                           GMenuModel       *menu,
      47                                                                           GError          **error);
      48  
      49  GIO_AVAILABLE_IN_2_32
      50  void                    g_dbus_connection_unexport_menu_model           (GDBusConnection  *connection,
      51                                                                           guint             export_id);
      52  
      53  G_END_DECLS
      54  
      55  #endif /* __G_MENU_EXPORTER_H__ */