### Method

# Gimp Image set_selected_layers

unstable since: 3.0.0

#### Declaration [src]

    gboolean
    gimp_image_set_selected_layers (
      GimpImage* image,
      gint num_layers,
      const GimpLayer** layers
    )

#### Description [src]

Sets the specified image’s selected layers.

The layers are set as the selected layers in the image. Any previous selected layers or channels are unselected. An exception is a previously existing floating selection, in which case this procedure will return an execution error.

Available since: 3.0.0

#### Parameters

`num_layers`

  Type: `gint`

  The number of layers to select.

`layers`

  Type: An array of `GimpLayer*`

  The list of layers to select.

  The length of the array is specified in the `num_layers` argument.
  The data is owned by the caller of the function.

#### Return value

Type: `gboolean`

TRUE on success.