Function

Gtktest_widget_click

deprecated: 3.20 since: 2.14

Declaration [src]

gboolean
gtk_test_widget_click (
  GtkWidget* widget,
  guint button,
  GdkModifierType modifiers
)

Description [src]

This function will generate a button click (button press and button release event) in the middle of the first GdkWindow found that belongs to widget. For windowless widgets like GtkButton (which returns FALSE from gtk_widget_get_has_window()), this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the button click location, see gdk_test_simulate_button() for details.

Available since: 2.14

Deprecated since: 3.20

This testing infrastructure is phased out in favor of reftests.

Parameters

widget

Type: GtkWidget

Widget to generate a button click on.

The data is owned by the caller of the function.
button

Type: guint

Number of the pointer button for the event, usually 1, 2 or 3.

modifiers

Type: GdkModifierType

Keyboard modifiers the event is setup with.

Return value

Type: gboolean

Whether all actions neccessary for the button click simulation were carried out successfully.