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 
30 
31 /**
32  * `GdkDevicePad` is an interface implemented by devices of type
33  * %GDK_SOURCE_TABLET_PAD
34  * 
35  * It allows querying the features provided 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. [method@Gdk.DevicePad.get_n_groups]
39  * can be used to obtain the number of groups, [method@Gdk.DevicePad.get_n_features]
40  * and [method@Gdk.DevicePad.get_feature_group] can be combined to find out
41  * the 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 each
44  * individual pad feature to multiple actions. Only one mode is effective
45  * (current) for each given group, different groups may have different
46  * current modes. The number of available modes in a group can be found
47  * out through [method@Gdk.DevicePad.get_group_n_modes], and the current mode
48  * for a given group will be notified through events of type #GDK_PAD_GROUP_MODE.
49  */
50 public interface DevicePadIF{
51 	/** Get the main Gtk struct */
52 	public GdkDevicePad* getDevicePadStruct(bool transferOwnership = false);
53 
54 	/** the main Gtk struct as a void* */
55 	protected void* getStruct();
56 
57 
58 	/** */
59 	public static GType getType()
60 	{
61 		return gdk_device_pad_get_type();
62 	}
63 
64 	/**
65 	 * Returns the group the given @feature and @idx belong to.
66 	 *
67 	 * f the feature or index do not exist in @pad, -1 is returned.
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 	public int getFeatureGroup(GdkDevicePadFeature feature, int featureIdx);
76 
77 	/**
78 	 * Returns the number of modes that @group may have.
79 	 *
80 	 * Params:
81 	 *     groupIdx = group to get the number of available modes from
82 	 *
83 	 * Returns: The number of modes available in @group.
84 	 */
85 	public int getGroupNModes(int groupIdx);
86 
87 	/**
88 	 * Returns the number of features a tablet pad has.
89 	 *
90 	 * Params:
91 	 *     feature = a pad feature
92 	 *
93 	 * Returns: The amount of elements of type @feature that this pad has.
94 	 */
95 	public int getNFeatures(GdkDevicePadFeature feature);
96 
97 	/**
98 	 * Returns the number of groups this pad device has.
99 	 *
100 	 * Pads have at least one group. A pad group is a subcollection of
101 	 * buttons/strip/rings that is affected collectively by a same
102 	 * current mode.
103 	 *
104 	 * Returns: The number of button/ring/strip groups in the pad.
105 	 */
106 	public int getNGroups();
107 }