1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtk.BindingEntry;
26 
27 private import glib.ListSG;
28 private import glib.Str;
29 private import gtk.BindingSet;
30 private import gtkc.gtk;
31 public  import gtkc.gtktypes;
32 
33 
34 /**
35  * Each key binding element of a binding sets binding list is
36  * represented by a GtkBindingEntry.
37  */
38 public struct BindingEntry
39 {
40 	/**
41 	 */
42 
43 	/**
44 	 * Parses a signal description from @signal_desc and incorporates
45 	 * it into @binding_set.
46 	 *
47 	 * Signal descriptions may either bind a key combination to
48 	 * one or more signals:
49 	 * |[
50 	 * bind "key" {
51 	 * "signalname" (param, ...)
52 	 * ...
53 	 * }
54 	 * ]|
55 	 *
56 	 * Or they may also unbind a key combination:
57 	 * |[
58 	 * unbind "key"
59 	 * ]|
60 	 *
61 	 * Key combinations must be in a format that can be parsed by
62 	 * gtk_accelerator_parse().
63 	 *
64 	 * Params:
65 	 *     bindingSet = a #GtkBindingSet
66 	 *     signalDesc = a signal description
67 	 *
68 	 * Return: %G_TOKEN_NONE if the signal was successfully parsed and added,
69 	 *     the expected token otherwise
70 	 *
71 	 * Since: 3.0
72 	 */
73 	public static GTokenType addSignalFromString(BindingSet bindingSet, string signalDesc)
74 	{
75 		return gtk_binding_entry_add_signal_from_string((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), Str.toStringz(signalDesc));
76 	}
77 
78 	/**
79 	 * Override or install a new key binding for @keyval with @modifiers on
80 	 * @binding_set.
81 	 *
82 	 * Params:
83 	 *     bindingSet = a #GtkBindingSet to add a signal to
84 	 *     keyval = key value
85 	 *     modifiers = key modifier
86 	 *     signalName = signal name to be bound
87 	 *     bindingArgs = list of #GtkBindingArg signal arguments
88 	 */
89 	public static void addSignall(BindingSet bindingSet, uint keyval, GdkModifierType modifiers, string signalName, ListSG bindingArgs)
90 	{
91 		gtk_binding_entry_add_signall((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), keyval, modifiers, Str.toStringz(signalName), (bindingArgs is null) ? null : bindingArgs.getListSGStruct());
92 	}
93 
94 	/**
95 	 * Remove a binding previously installed via
96 	 * gtk_binding_entry_add_signal() on @binding_set.
97 	 *
98 	 * Params:
99 	 *     bindingSet = a #GtkBindingSet to remove an entry of
100 	 *     keyval = key value of binding to remove
101 	 *     modifiers = key modifier of binding to remove
102 	 */
103 	public static void remove(BindingSet bindingSet, uint keyval, GdkModifierType modifiers)
104 	{
105 		gtk_binding_entry_remove((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), keyval, modifiers);
106 	}
107 
108 	/**
109 	 * Install a binding on @binding_set which causes key lookups
110 	 * to be aborted, to prevent bindings from lower priority sets
111 	 * to be activated.
112 	 *
113 	 * Params:
114 	 *     bindingSet = a #GtkBindingSet to skip an entry of
115 	 *     keyval = key value of binding to skip
116 	 *     modifiers = key modifier of binding to skip
117 	 *
118 	 * Since: 2.12
119 	 */
120 	public static void skip(BindingSet bindingSet, uint keyval, GdkModifierType modifiers)
121 	{
122 		gtk_binding_entry_skip((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), keyval, modifiers);
123 	}
124 }