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 * Conversion parameters: 26 * inFile = gdk-Input.html 27 * outPack = gdk 28 * outFile = Input 29 * strct = 30 * realStrct= 31 * ctorStrct= 32 * clss = Input 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gdk_input_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * structWrap: 47 * module aliases: 48 * local aliases: 49 * overrides: 50 */ 51 52 module gdk.Input; 53 54 public import gtkc.gdktypes; 55 56 private import gtkc.gdk; 57 private import glib.ConstructionException; 58 private import gobject.ObjectG; 59 60 61 62 63 64 65 /** 66 * Description 67 * The functions in this section are used to establish 68 * callbacks when some condition becomes true for 69 * a file descriptor. They are currently just wrappers around 70 * the IO Channel 71 * facility. 72 */ 73 public class Input 74 { 75 76 /** 77 */ 78 79 /** 80 * Warning 81 * gdk_input_add_full has been deprecated since version 2.14 and should not be used in newly-written code. Use g_io_add_watch_full() on a GIOChannel 82 * Establish a callback when a condition becomes true on 83 * a file descriptor. 84 * Params: 85 * source = a file descriptor. 86 * condition = the condition. 87 * data = callback data passed to function. 88 * destroy = callback function to call with data when the input 89 * handler is removed. 90 * Returns: a tag that can later be used as an argument to gdk_input_remove(). 91 */ 92 public static int addFull(int source, GdkInputCondition condition, GdkInputFunction funct, void* data, GDestroyNotify destroy) 93 { 94 // gint gdk_input_add_full (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data, GDestroyNotify destroy); 95 return gdk_input_add_full(source, condition, funct, data, destroy); 96 } 97 98 /** 99 * Warning 100 * gdk_input_add has been deprecated since version 2.14 and should not be used in newly-written code. Use g_io_add_watch() on a GIOChannel 101 * Establish a callback when a condition becomes true on 102 * a file descriptor. 103 * Params: 104 * source = a file descriptor. 105 * condition = the condition. 106 * data = callback data passed to function. 107 * Returns: a tag that can later be used as an argument to gdk_input_remove(). 108 */ 109 public static int add(int source, GdkInputCondition condition, GdkInputFunction funct, void* data) 110 { 111 // gint gdk_input_add (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data); 112 return gdk_input_add(source, condition, funct, data); 113 } 114 115 /** 116 * Warning 117 * gdk_input_remove is deprecated and should not be used in newly-written code. 118 * Remove a callback added with gdk_input_add() or 119 * gdk_input_add_full(). 120 * Params: 121 * tag = the tag returned when the callback was set up. 122 */ 123 public static void remove(int tag) 124 { 125 // void gdk_input_remove (gint tag); 126 gdk_input_remove(tag); 127 } 128 }