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 gdk.DevicePadIF;
26 
27 private import gdk.c.functions;
28 public  import gdk.c.types;
29 public  import gtkc.gdktypes;
30 
31 
32 /**
33  * #GdkDevicePad is an interface implemented by devices of type
34  * %GDK_SOURCE_TABLET_PAD, it allows querying the features provided
35  * by the pad device.
36  * 
37  * Tablet pads may contain one or more groups, each containing a subset
38  * of the buttons/rings/strips available. gdk_device_pad_get_n_groups()
39  * can be used to obtain the number of groups, gdk_device_pad_get_n_features()
40  * and gdk_device_pad_get_feature_group() can be combined to find out the
41  * number of buttons/rings/strips the device has, and how are they grouped.
42  * 
43  * Each of those groups have different modes, which may be used to map
44  * each individual pad feature to multiple actions. Only one mode is
45  * effective (current) for each given group, different groups may have
46  * different current modes. The number of available modes in a group can
47  * be found out through gdk_device_pad_get_group_n_modes(), and the current
48  * mode for a given group will be notified through the #GdkEventPadGroupMode
49  * event.
50  */
51 public interface DevicePadIF{
52 	/** Get the main Gtk struct */
53 	public GdkDevicePad* getDevicePadStruct(bool transferOwnership = false);
54 
55 	/** the main Gtk struct as a void* */
56 	protected void* getStruct();
57 
58 
59 	/** */
60 	public static GType getType()
61 	{
62 		return gdk_device_pad_get_type();
63 	}
64 
65 	/**
66 	 * Returns the group the given @feature and @idx belong to,
67 	 * or -1 if feature/index do not exist in @pad.
68 	 *
69 	 * Params:
70 	 *     feature = the feature type to get the group from
71 	 *     featureIdx = the index of the feature to get the group from
72 	 *
73 	 * Returns: The group number of the queried pad feature.
74 	 *
75 	 * Since: 3.22
76 	 */
77 	public int getFeatureGroup(GdkDevicePadFeature feature, int featureIdx);
78 
79 	/**
80 	 * Returns the number of modes that @group may have.
81 	 *
82 	 * Params:
83 	 *     groupIdx = group to get the number of available modes from
84 	 *
85 	 * Returns: The number of modes available in @group.
86 	 *
87 	 * Since: 3.22
88 	 */
89 	public int getGroupNModes(int groupIdx);
90 
91 	/**
92 	 * Returns the number of features a tablet pad has.
93 	 *
94 	 * Params:
95 	 *     feature = a pad feature
96 	 *
97 	 * Returns: The amount of elements of type @feature that this pad has.
98 	 *
99 	 * Since: 3.22
100 	 */
101 	public int getNFeatures(GdkDevicePadFeature feature);
102 
103 	/**
104 	 * Returns the number of groups this pad device has. Pads have
105 	 * at least one group. A pad group is a subcollection of
106 	 * buttons/strip/rings that is affected collectively by a same
107 	 * current mode.
108 	 *
109 	 * Returns: The number of button/ring/strip groups in the pad.
110 	 *
111 	 * Since: 3.22
112 	 */
113 	public int getNGroups();
114 }