Function
Gdktest_simulate_button
since: 2.14
Declaration [src]
gboolean
gdk_test_simulate_button (
GdkWindow* window,
gint x,
gint y,
guint button,
GdkModifierType modifiers,
GdkEventType button_pressrelease
)
Description [src]
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_test_simulate_button() is a fairly low level function,
for most testing purposes, gtk_test_widget_click() is the right
function to call which will generate a button press event followed
by its accompanying button release event.
Available since: 2.14
Parameters
window-
Type:
GdkWindowA
GdkWindowto simulate a button event for.The data is owned by the caller of the function. x-
Type:
gintX coordinate within
windowfor the button event. y-
Type:
gintY coordinate within
windowfor the button event. button-
Type:
guintNumber of the pointer button for the event, usually 1, 2 or 3.
modifiers-
Type:
GdkModifierTypeKeyboard modifiers the event is setup with.
button_pressrelease-
Type:
GdkEventTypeEither
GDK_BUTTON_PRESSorGDK_BUTTON_RELEASE.