2 * This file is part of duit.
4 * duit 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 * duit 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 duit; 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
49 module gtk
.InputDialog
;
51 private import gtk
.gtktypes
;
53 private import lib
.gtk
;
58 * NOTE this widget is considered too specialized/little-used for
59 * GTK+, and will in the future be moved to some other package. If
60 * your application needs this widget, feel free to use it, as the
61 * widget does work and is useful in some applications; it's just not
62 * of general interest. However, we are not accepting new features for
63 * the widget, and it will eventually move out of the GTK+
65 * GtkInputDialog displays a dialog which allows the user
66 * to configure XInput extension devices. For each
67 * device, they can control the mode of the device
68 * (disabled, screen-relative, or window-relative),
69 * the mapping of axes to coordinates, and the
70 * mapping of the devices macro keys to key press
72 * GtkInputDialog contains two buttons to which
73 * the application can connect; one for closing
74 * the dialog, and one for saving the changes.
75 * No actions are bound to these by default.
76 * The changes that the user makes take effect
79 private import gtk
.Dialog
;
80 public class InputDialog
: Dialog
83 /** the main Gtk struct */
84 protected GtkInputDialog
* gtkInputDialog
;
87 public GtkInputDialog
* getInputDialogStruct()
89 return gtkInputDialog
;
93 /** the main Gtk struct as a void* */
94 protected void* getStruct()
96 return cast(void*)gtkInputDialog
;
100 * Sets our main struct and passes it to the parent class
102 public this (GtkInputDialog
* gtkInputDialog
)
104 super(cast(GtkDialog
*)gtkInputDialog
);
105 this.gtkInputDialog
= gtkInputDialog
;
111 // imports for the signal processing
112 private import gobject
.Signals
;
113 private import gdk
.gdktypes
;
114 int[char[]] connectedSignals
;
116 void delegate(GdkDevice
*, InputDialog
)[] onDisableDeviceListeners
;
117 void addOnDisableDevice(void delegate(GdkDevice
*, InputDialog
) dlg
)
119 if ( !("disable-device" in connectedSignals
) )
124 cast(GCallback
)&callBackDisableDevice
,
127 cast(ConnectFlags
)0);
128 connectedSignals
["disable-device"] = 1;
130 onDisableDeviceListeners
~= dlg
;
132 extern(C
) static void callBackDisableDevice(GtkInputDialog
* inputdialogStruct
, GdkDevice
* deviceid
, InputDialog inputDialog
)
134 bit consumed
= false;
136 foreach ( void delegate(GdkDevice
*, InputDialog
) dlg
; inputDialog
.onDisableDeviceListeners
)
138 dlg(deviceid
, inputDialog
);
144 void delegate(GdkDevice
*, InputDialog
)[] onEnableDeviceListeners
;
145 void addOnEnableDevice(void delegate(GdkDevice
*, InputDialog
) dlg
)
147 if ( !("enable-device" in connectedSignals
) )
152 cast(GCallback
)&callBackEnableDevice
,
155 cast(ConnectFlags
)0);
156 connectedSignals
["enable-device"] = 1;
158 onEnableDeviceListeners
~= dlg
;
160 extern(C
) static void callBackEnableDevice(GtkInputDialog
* inputdialogStruct
, GdkDevice
* deviceid
, InputDialog inputDialog
)
162 bit consumed
= false;
164 foreach ( void delegate(GdkDevice
*, InputDialog
) dlg
; inputDialog
.onEnableDeviceListeners
)
166 dlg(deviceid
, inputDialog
);
175 * Creates a new GtkInputDialog.
177 * the new GtkInputDialog.
179 * The "disable-device" signal
180 * void user_function (GtkInputDialog *inputdialog,
181 * GdkDevice *deviceid,
182 * gpointer user_data) : Run last
183 * This signal is emitted when the user changes the
184 * mode of a device from a GDK_MODE_SCREEN or GDK_MODE_WINDOW
185 * to GDK_MODE_ENABLED.
187 * the object which received the signal.
189 * The ID of the newly disabled device.
191 * user data set when the signal handler was connected.
195 // GtkWidget* gtk_input_dialog_new (void);
196 this(cast(GtkInputDialog
*)gtk_input_dialog_new() );