alternative to assert
[gtkD.git] / gtkD / src / gdk / Input.d
blob77b71c0c238f30827f49afd5d60ea664369dde2a
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gdk-Input.html
26 * outPack = gdk
27 * outFile = Input
28 * strct =
29 * realStrct=
30 * ctorStrct=
31 * clss = Input
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gdk_input_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * structWrap:
45 * module aliases:
46 * local aliases:
49 module gdk.Input;
51 version(noAssert)
53 version(Tango)
55 import tango.io.Stdout; // use the tango loging?
59 private import gtkc.gdktypes;
61 private import gtkc.gdk;
68 /**
69 * Description
70 * The functions in this section are used to establish
71 * callbacks when some condition becomes true for
72 * a file descriptor. They are currently just wrappers around
73 * the IO Channel
74 * facility.
76 public class Input
79 /**
82 /**
83 * Warning
84 * gdk_input_add_full is deprecated and should not be used in newly-written code.
85 * Establish a callback when a condition becomes true on
86 * a file descriptor.
87 * source:
88 * a file descriptor.
89 * condition:
90 * the condition.
91 * function:
92 * the callback function.
93 * data:
94 * callback data passed to function.
95 * destroy:
96 * callback function to call with data when the input
97 * handler is removed.
98 * Returns:
99 * a tag that can later be used as an argument to
100 * gdk_input_remove().
102 public static int addFull(int source, GdkInputCondition condition, GdkInputFunction funct, void* data, GdkDestroyNotify destroy)
104 // gint gdk_input_add_full (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data, GdkDestroyNotify destroy);
105 return gdk_input_add_full(source, condition, funct, data, destroy);
112 * Warning
113 * gdk_input_add is deprecated and should not be used in newly-written code.
114 * Establish a callback when a condition becomes true on
115 * a file descriptor.
116 * source:
117 * a file descriptor.
118 * condition:
119 * the condition.
120 * function:
121 * the callback function.
122 * data:
123 * callback data passed to function.
124 * Returns:
125 * a tag that can later be used as an argument to
126 * gdk_input_remove().
128 public static int add(int source, GdkInputCondition condition, GdkInputFunction funct, void* data)
130 // gint gdk_input_add (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data);
131 return gdk_input_add(source, condition, funct, data);
135 * Warning
136 * gdk_input_remove is deprecated and should not be used in newly-written code.
137 * Remove a callback added with gdk_input_add() or
138 * gdk_input_add_full().
139 * tag:
140 * the tag returned when the callback was set up.
141 * See Also
142 * GLib Main Loop
143 * The main loop in which input callbacks run.
144 * IO Channels
145 * A newer and more flexible way of doing IO
146 * callbacks.
148 public static void remove(int tag)
150 // void gdk_input_remove (gint tag);
151 gdk_input_remove(tag);