/* Copyright (C) 2020 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

_CONFIGINCLUDE(gtkmmconfig.h)

#include <glibmm/interface.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/interface_p.h)
_PINCLUDE(gtk/gtk.h)

#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
typedef struct _GtkShortcutManagerInterface GtkShortcutManagerInterface;
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

namespace Gtk
{
class GTKMM_API ShortcutController;

/** Interface for managing shortcuts.
 *
 * The %Gtk::ShortcutManager interface is used to implement
 * shortcut scopes.
 *
 * This is important for Gtk::Native widgets that have their own surface,
 * since the event controllers that are used to implement managed and
 * global scopes are limited to the same native.
 *
 * Examples of widgets implementing %Gtk::ShortcutManager are Gtk::Window
 * and Gtk::Popover.
 *
 * @newin{3,98}
 */
class GTKMM_API ShortcutManager : public Glib::Interface
{
  _CLASS_INTERFACE(ShortcutManager, GtkShortcutManager, GTK_SHORTCUT_MANAGER, GtkShortcutManagerInterface, , , GTKMM_API)

public:

protected:
#m4 _CONVERSION(`GtkShortcutController*',`const Glib::RefPtr<ShortcutController>&',`Glib::wrap($3, true)')
  _WRAP_VFUNC(void add_controller(const Glib::RefPtr<ShortcutController>& controller), "add_controller")
  _WRAP_VFUNC(void remove_controller(const Glib::RefPtr<ShortcutController>& controller), "remove_controller")
};

} // namespace Gtk
