Ardour  9.0-pre0-384-ga76afae0e9
gtkbindings.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * GtkBindingSet: Keybinding manager for GtkObjects.
5  * Copyright (C) 1998 Tim Janik
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22 
23 /*
24  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
25  * file for a list of people on the GTK+ Team. See the ChangeLog
26  * files for a list of changes. These files are distributed with
27  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
28  */
29 
30 #ifndef __GTK_BINDINGS_H__
31 #define __GTK_BINDINGS_H__
32 
33 
34 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
35 #error "Only <gtk/gtk.h> can be included directly."
36 #endif
37 
38 #include <gdk/gdk.h>
39 #include <gtk/gtkobject.h>
40 
41 
42 G_BEGIN_DECLS
43 
44 
45 /* Binding sets
46  */
47 
48 typedef struct _GtkBindingSet GtkBindingSet;
49 typedef struct _GtkBindingEntry GtkBindingEntry;
50 typedef struct _GtkBindingSignal GtkBindingSignal;
51 typedef struct _GtkBindingArg GtkBindingArg;
52 
54 {
55  gchar *set_name;
56  gint priority;
62  guint parsed : 1; /* From RC content */
63 };
64 
66 {
67  /* key portion
68  */
69  guint keyval;
71 
73  guint destroyed : 1;
74  guint in_emission : 1;
75  guint marks_unbound : 1;
79 };
80 
82 {
83  GType arg_type;
84  union {
85  glong long_data;
86  gdouble double_data;
87  gchar *string_data;
88  } d;
89 };
90 
92 {
94  gchar *signal_name;
95  guint n_args;
97 };
98 
99 /* Application-level methods */
100 
101 GtkBindingSet* gtk_binding_set_new (const gchar *set_name);
102 GtkBindingSet* gtk_binding_set_by_class(gpointer object_class);
103 GtkBindingSet* gtk_binding_set_find (const gchar *set_name);
105  guint keyval,
106  GdkModifierType modifiers);
108  GdkEventKey *event);
110  guint keyval,
111  GdkModifierType modifiers,
112  GtkObject *object);
113 
114 #ifndef GTK_DISABLE_DEPRECATED
115 #define gtk_binding_entry_add gtk_binding_entry_clear
117  guint keyval,
118  GdkModifierType modifiers);
119 guint gtk_binding_parse_binding (GScanner *scanner);
120 #endif /* GTK_DISABLE_DEPRECATED */
121 
123  guint keyval,
124  GdkModifierType modifiers);
126  guint keyval,
127  GdkModifierType modifiers,
128  const gchar *signal_name,
129  guint n_args,
130  ...);
132  guint keyval,
133  GdkModifierType modifiers,
134  const gchar *signal_name,
135  GSList *binding_args);
137  guint keyval,
138  GdkModifierType modifiers);
139 
141  GtkPathType path_type,
142  const gchar *path_pattern,
143  GtkPathPriorityType priority);
144 
145 
146 /* Non-public methods */
147 
148 guint _gtk_binding_parse_binding (GScanner *scanner);
151  guint keyval,
152  GdkModifierType modifiers,
153  const gchar *signal_name,
154  GSList *binding_args);
155 
156 G_END_DECLS
157 
158 #endif /* __GTK_BINDINGS_H__ */
GdkModifierType
Definition: gdktypes.h:127
void _gtk_binding_reset_parsed(void)
void gtk_binding_entry_add_signal(GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, const gchar *signal_name, guint n_args,...)
gboolean gtk_binding_set_activate(GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, GtkObject *object)
guint _gtk_binding_parse_binding(GScanner *scanner)
void gtk_binding_entry_add_signall(GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, const gchar *signal_name, GSList *binding_args)
void gtk_binding_set_add_path(GtkBindingSet *binding_set, GtkPathType path_type, const gchar *path_pattern, GtkPathPriorityType priority)
typedefG_BEGIN_DECLS struct _GtkBindingSet GtkBindingSet
Definition: gtkbindings.h:48
guint gtk_binding_parse_binding(GScanner *scanner)
void gtk_binding_entry_skip(GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers)
gboolean gtk_bindings_activate_event(GtkObject *object, GdkEventKey *event)
GtkBindingSet * gtk_binding_set_find(const gchar *set_name)
GtkBindingSet * gtk_binding_set_by_class(gpointer object_class)
GtkBindingSet * gtk_binding_set_new(const gchar *set_name)
gboolean gtk_bindings_activate(GtkObject *object, guint keyval, GdkModifierType modifiers)
void gtk_binding_entry_clear(GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers)
void gtk_binding_entry_remove(GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers)
void _gtk_binding_entry_add_signall(GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, const gchar *signal_name, GSList *binding_args)
GtkPathType
Definition: gtkenums.h:298
GtkPathPriorityType
Definition: gtkenums.h:286
gdouble double_data
Definition: gtkbindings.h:86
gchar * string_data
Definition: gtkbindings.h:87
union _GtkBindingArg::@50 d
GtkBindingEntry * hash_next
Definition: gtkbindings.h:77
GtkBindingSet * binding_set
Definition: gtkbindings.h:72
GtkBindingSignal * signals
Definition: gtkbindings.h:78
GtkBindingEntry * set_next
Definition: gtkbindings.h:76
GdkModifierType modifiers
Definition: gtkbindings.h:70
GSList * class_branch_pspecs
Definition: gtkbindings.h:59
GSList * widget_path_pspecs
Definition: gtkbindings.h:57
gchar * set_name
Definition: gtkbindings.h:55
GtkBindingEntry * entries
Definition: gtkbindings.h:60
GSList * widget_class_pspecs
Definition: gtkbindings.h:58
GtkBindingEntry * current
Definition: gtkbindings.h:61
GtkBindingArg * args
Definition: gtkbindings.h:96
gchar * signal_name
Definition: gtkbindings.h:94
GtkBindingSignal * next
Definition: gtkbindings.h:93