Declaration [src]

gtk_test_create_widget (
  GType widget_type,
  const gchar* first_property_name,

Description [src]

This function wraps g_object_new() for widget types. It’ll automatically show all created non window widgets, also g_object_ref_sink() them (to keep them alive across a running test) and set them up for destruction during the next test teardown phase.

Available since:2.14
Deprecated since:3.20

This testing infrastructure is phased out in favor of reftests.

This function is not directly available to language bindings


widget_type GType

A valid widget type.

first_property_name const gchar*

Name of first property to set or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

Value to set the first property to, followed by more name-value pairs, terminated by NULL.

Return value

Returns: GtkWidget

A newly created widget.

 The data is owned by the called function.