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.DeviceTool; 26 27 private import gobject.ObjectG; 28 private import gtkc.gdk; 29 public import gtkc.gdktypes; 30 31 32 /** */ 33 public class DeviceTool : ObjectG 34 { 35 /** the main Gtk struct */ 36 protected GdkDeviceTool* gdkDeviceTool; 37 38 /** Get the main Gtk struct */ 39 public GdkDeviceTool* getDeviceToolStruct() 40 { 41 return gdkDeviceTool; 42 } 43 44 /** the main Gtk struct as a void* */ 45 protected override void* getStruct() 46 { 47 return cast(void*)gdkDeviceTool; 48 } 49 50 protected override void setStruct(GObject* obj) 51 { 52 gdkDeviceTool = cast(GdkDeviceTool*)obj; 53 super.setStruct(obj); 54 } 55 56 /** 57 * Sets our main struct and passes it to the parent class. 58 */ 59 public this (GdkDeviceTool* gdkDeviceTool, bool ownedRef = false) 60 { 61 this.gdkDeviceTool = gdkDeviceTool; 62 super(cast(GObject*)gdkDeviceTool, ownedRef); 63 } 64 65 66 /** */ 67 public static GType getType() 68 { 69 return gdk_device_tool_get_type(); 70 } 71 72 /** 73 * Gets the hardware ID of this tool, or 0 if it's not known. When 74 * non-zero, the identificator is unique for the given tool model, 75 * meaning that two identical tools will share the same @hardware_id, 76 * but will have different serial numbers (see gdk_device_tool_get_serial()). 77 * 78 * This is a more concrete (and device specific) method to identify 79 * a #GdkDeviceTool than gdk_device_tool_get_tool_type(), as a tablet 80 * may support multiple devices with the same #GdkDeviceToolType, 81 * but having different hardware identificators. 82 * 83 * Returns: The hardware identificator of this tool. 84 * 85 * Since: 3.22 86 */ 87 public ulong getHardwareId() 88 { 89 return gdk_device_tool_get_hardware_id(gdkDeviceTool); 90 } 91 92 /** 93 * Gets the serial of this tool, this value can be used to identify a 94 * physical tool (eg. a tablet pen) across program executions. 95 * 96 * Returns: The serial ID for this tool 97 * 98 * Since: 3.22 99 */ 100 public ulong getSerial() 101 { 102 return gdk_device_tool_get_serial(gdkDeviceTool); 103 } 104 105 /** 106 * Gets the #GdkDeviceToolType of the tool. 107 * 108 * Returns: The physical type for this tool. This can be used to figure out what 109 * sort of pen is being used, such as an airbrush or a pencil. 110 * 111 * Since: 3.22 112 */ 113 public GdkDeviceToolType getToolType() 114 { 115 return gdk_device_tool_get_tool_type(gdkDeviceTool); 116 } 117 }