gtk2/gtk/gtkshortcut.h
Benjamin Otte d8603864a9 gtk: Add GtkShortcut
This is the base class for what is about to take over all sorts of
keyboard shortcuts. The initial version barely deals with keybindings.
2020-03-25 22:36:03 -04:00

61 lines
2.5 KiB
C

/*
* Copyright © 2018 Benjamin Otte
*
* 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/>.
*
* Authors: Benjamin Otte <otte@gnome.org>
*/
#ifndef __GTK_SHORTCUT_H__
#define __GTK_SHORTCUT_H__
#include <gtk/gtktypes.h>
G_BEGIN_DECLS
#define GTK_TYPE_SHORTCUT (gtk_shortcut_get_type ())
GDK_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (GtkShortcut, gtk_shortcut, GTK, SHORTCUT, GObject)
GDK_AVAILABLE_IN_ALL
GtkShortcut * gtk_shortcut_new (void);
GDK_AVAILABLE_IN_ALL
void gtk_shortcut_set_keyval (GtkShortcut *self,
guint keyval,
GdkModifierType mods);
GDK_AVAILABLE_IN_ALL
gboolean gtk_shortcut_trigger (GtkShortcut *self,
GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gtk_shortcut_activate (GtkShortcut *self,
GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
GVariant * gtk_shortcut_get_arguments (GtkShortcut *self);
GDK_AVAILABLE_IN_ALL
void gtk_shortcut_set_arguments (GtkShortcut *self,
GVariant *args);
GDK_AVAILABLE_IN_ALL
const char * gtk_shortcut_get_signal (GtkShortcut *self);
GDK_AVAILABLE_IN_ALL
void gtk_shortcut_set_signal (GtkShortcut *self,
const gchar *signal);
G_END_DECLS
#endif /* __GTK_SHORTCUT_H__ */