were carried out successfully
testSimulateButton
fn
bool testSimulateButton(gdk.window.Window window, int x, int y, uint button, gdk.types.ModifierType modifiers, gdk.types.EventType buttonPressrelease)This function is intended to be used in GTK+ test programs. It will warp the mouse pointer to the given (x,y) coordinates within window and simulate a button press or release event. Because the mouse pointer needs to be warped to the target location, use of this function outside of test programs that run in their own virtual windowing system (e.g. Xvfb) is not recommended.
Also, [gdk.global.testSimulateButton] is a fairly low level function, for most testing purposes, [gtk.global.testWidgetClick] is the right function to call which will generate a button press event followed by its accompanying button release event.
Parameters
window | a #GdkWindow to simulate a button event for |
x | x coordinate within window for the button event |
y | y coordinate within window for the button event |
button | Number of the pointer button for the event, usually 1, 2 or 3 |
modifiers | Keyboard modifiers the event is setup with |
buttonPressrelease | either [gdk.types.EventType.ButtonPress] or [gdk.types.EventType.ButtonRelease] |
Returns
whether all actions necessary for a button event simulation