### Function

# Gdk set_allowed_backends

since: 4.0

#### Declaration [src]

    void
    gdk_set_allowed_backends (
      const char* backends
    )

#### Description [src]

Sets a list of backends that GDK should try to use.

This can be useful if your application does not work with certain GDK backends.

By default, GDK tries all included backends.

For example:

    gdk_set_allowed_backends ("wayland,macos,*");

instructs GDK to try the Wayland backend first, followed by the MacOs backend, and then all others.

If the `GDK_BACKEND` environment variable is set, it determines what backends are tried in what order, while still respecting the set of allowed backends that are specified by this function.

The possible backend names are:

- `broadway`
- `macos`
- `wayland`.
- `win32`
- `x11`

You can also include a `*` in the list to try all remaining backends.

This call must happen prior to functions that open a display, such as `gdk_display_open()`, `gtk_init()`, or `gtk_init_check()` in order to take effect.

Available since: 4.0

#### Parameters

`backends`

  Type: `const char*`

  A comma-separated list of backends.

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