Constructor

GtkWidgetnew

Declaration [src]

GtkWidget*
gtk_widget_new (
  GType type,
  const gchar* first_property_name,
  ...
)

Description [src]

This is a convenience function for creating a widget and setting its properties in one go. For example you might write: gtk_widget_new (GTK_TYPE_LABEL, "label", "Hello World", "xalign", 0.0, NULL) to create a left-aligned label. Equivalent to g_object_new(), but returns a widget so you don’t have to cast the object yourself.

This constructor is not directly available to language bindings.

Parameters

type

Type: GType

Type ID of the widget to create.

first_property_name

Type: const gchar*

Name of first property to set.

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

Type: 

Value of first property, followed by more properties, NULL-terminated.

Return value

Type: GtkWidget

A new GtkWidget of type widget_type.

The data is owned by the called function.