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 = GtkInputDialog.html
27 * outFile = InputDialog
28 * strct = GtkInputDialog
50 module gtk
.InputDialog
;
56 import tango
.io
.Stdout
; // use the tango loging?
60 private import gtkc
.gtktypes
;
62 private import gtkc
.gtk
;
71 * NOTE this widget is considered too specialized/little-used for
72 * GTK+, and will in the future be moved to some other package. If
73 * your application needs this widget, feel free to use it, as the
74 * widget does work and is useful in some applications; it's just not
75 * of general interest. However, we are not accepting new features for
76 * the widget, and it will eventually move out of the GTK+
78 * GtkInputDialog displays a dialog which allows the user
79 * to configure XInput extension devices. For each
80 * device, they can control the mode of the device
81 * (disabled, screen-relative, or window-relative),
82 * the mapping of axes to coordinates, and the
83 * mapping of the devices macro keys to key press
85 * GtkInputDialog contains two buttons to which
86 * the application can connect; one for closing
87 * the dialog, and one for saving the changes.
88 * No actions are bound to these by default.
89 * The changes that the user makes take effect
92 private import gtk
.Dialog
;
93 public class InputDialog
: Dialog
96 /** the main Gtk struct */
97 protected GtkInputDialog
* gtkInputDialog
;
100 public GtkInputDialog
* getInputDialogStruct()
102 return gtkInputDialog
;
106 /** the main Gtk struct as a void* */
107 protected void* getStruct()
109 return cast(void*)gtkInputDialog
;
113 * Sets our main struct and passes it to the parent class
115 public this (GtkInputDialog
* gtkInputDialog
)
119 if ( gtkInputDialog
is null )
124 Stdout("struct gtkInputDialog is null on constructor").newline
;
128 printf("struct gtkInputDialog is null on constructor");
135 assert(gtkInputDialog
!is null, "struct gtkInputDialog is null on constructor");
137 super(cast(GtkDialog
*)gtkInputDialog
);
138 this.gtkInputDialog
= gtkInputDialog
;
144 // imports for the signal processing
145 private import gobject
.Signals
;
146 private import gtkc
.gdktypes
;
147 int[char[]] connectedSignals
;
149 void delegate(GdkDevice
*, InputDialog
)[] onDisableDeviceListeners
;
150 void addOnDisableDevice(void delegate(GdkDevice
*, InputDialog
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
152 if ( !("disable-device" in connectedSignals
) )
157 cast(GCallback
)&callBackDisableDevice
,
161 connectedSignals
["disable-device"] = 1;
163 onDisableDeviceListeners
~= dlg
;
165 extern(C
) static void callBackDisableDevice(GtkInputDialog
* inputdialogStruct
, GdkDevice
* deviceid
, InputDialog inputDialog
)
167 bool consumed
= false;
169 foreach ( void delegate(GdkDevice
*, InputDialog
) dlg
; inputDialog
.onDisableDeviceListeners
)
171 dlg(deviceid
, inputDialog
);
177 void delegate(GdkDevice
*, InputDialog
)[] onEnableDeviceListeners
;
178 void addOnEnableDevice(void delegate(GdkDevice
*, InputDialog
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
180 if ( !("enable-device" in connectedSignals
) )
185 cast(GCallback
)&callBackEnableDevice
,
189 connectedSignals
["enable-device"] = 1;
191 onEnableDeviceListeners
~= dlg
;
193 extern(C
) static void callBackEnableDevice(GtkInputDialog
* inputdialogStruct
, GdkDevice
* deviceid
, InputDialog inputDialog
)
195 bool consumed
= false;
197 foreach ( void delegate(GdkDevice
*, InputDialog
) dlg
; inputDialog
.onEnableDeviceListeners
)
199 dlg(deviceid
, inputDialog
);
208 * Creates a new GtkInputDialog.
210 * the new GtkInputDialog.
212 * The "disable-device" signal
213 * void user_function (GtkInputDialog *inputdialog,
214 * GdkDevice *deviceid,
215 * gpointer user_data) : Run Last
216 * This signal is emitted when the user changes the
217 * mode of a device from a GDK_MODE_SCREEN or GDK_MODE_WINDOW
218 * to GDK_MODE_ENABLED.
220 * the object which received the signal.
222 * The ID of the newly disabled device.
224 * user data set when the signal handler was connected.
228 // GtkWidget* gtk_input_dialog_new (void);
229 this(cast(GtkInputDialog
*)gtk_input_dialog_new() );