WPEPlatform.Display
Description: Reference for WPEPlatform.Display

### Class

# WPEPlatformDisplay

#### Description

    abstract class WPEPlatform.Display : GObject.Object
    {
      WPEDisplayPrivate* priv
    }

No description available.

#### Hierarchy

#### Ancestors

- GObject

#### Functions

###### wpe_display_get_default

Get the default display.

###### wpe_display_get_primary

Get the primary display. By default, the first `WPEDisplay` that is created is set as primary display. This is the desired behavior in most of the cases, but you can set any `WPEDisplay` as primary calling `wpe_display_set_primary()` if needed.

#### Instance methods

###### wpe_display_connect

Connect the display to the native system.

###### wpe_display_create_gamepad_manager

Create a `WPEGamepadManager` to handle gamepads.

###### wpe_display_create_toplevel

Create a new `WPEToplevel` on `display` with `max_views` allowed. The parameter `max_views` will be ignored if `display` doesn’t support multiple views per toplevel. This function returns `NULL` if the platform implementation doesn’t support explicit creation of `WPEToplevel`.

###### wpe_display_disconnected

Emit the signal `WPEDisplay::disconnected` with the given `error`.

###### wpe_display_get_available_input_devices

Get the available input devices of `display` that can be used by creators to adjust their UI based on the available interactions.

###### wpe_display_get_clipboard

Get the `WPEClipboard` of `display`. If the platform doesn’t support clipboard, a local `WPEClipboard` is created.

###### wpe_display_get_drm_device

Get the DRM device of `display`. This is the main device that will be used to initialize the EGL display and allocate GBM buffers by default. The DRM device required to allocate GBM buffers for direct scanout will be set as main or group device in `WPEBufferFormats`.

###### wpe_display_get_egl_display

Get the `EGLDisplay` of `display`.

###### wpe_display_get_keymap

Get the `WPEKeymap` of `display`.

###### wpe_display_get_n_screens

Get the number of screens of `display`.

###### wpe_display_get_preferred_buffer_formats

Get the list of preferred buffer formats for `display`.

###### wpe_display_get_screen

Get the screen of `display` at `index`.

###### wpe_display_get_settings

Get the `WPESettings` of `display`.

###### wpe_display_screen_added

Emit the signal `WPEDisplay::screen-added`.

###### wpe_display_screen_removed

Emit the signal `WPEDisplay::screen-removed`. Note that `wpe_screen_invalidate()` is called before the signal is emitted.

###### wpe_display_set_available_input_devices

Sets the available input devices for a `display`.

###### wpe_display_set_primary

Set `display` as the primary display.

###### wpe_display_use_explicit_sync

Get whether explicit sync should be used with `display` for supported buffers.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### WPEPlatform.Display:available-input-devices

The input devices (e.g. mouse, keyboard or touchscreen) available to use for this display.

#### Signals

###### WPEPlatform.Display::disconnected

Emitted when the `display` is disconnected from the platform display.

###### WPEPlatform.Display::screen-added

Emitted when a screen is added.

###### WPEPlatform.Display::screen-removed

Emitted after a screen is removed. Note that the screen is always invalidated before this signal is emitted.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct WPEPlatformDisplayClass {
      GObjectClass parent_class;
      gboolean (* connect) (
        WPEDisplay* display,
        GError** error
      );
      WPEView* (* create_view) (
        WPEDisplay* display
      );
      gpointer (* get_egl_display) (
        WPEDisplay* display,
        GError** error
      );
      WPEKeymap* (* get_keymap) (
        WPEDisplay* display
      );
      WPEClipboard* (* get_clipboard) (
        WPEDisplay* display
      );
      WPEBufferFormats* (* get_preferred_buffer_formats) (
        WPEDisplay* display
      );
      guint (* get_n_screens) (
        WPEDisplay* display
      );
      WPEScreen* (* get_screen) (
        WPEDisplay* display,
        guint index
      );
      WPEDRMDevice* (* get_drm_device) (
        WPEDisplay* display
      );
      gboolean (* use_explicit_sync) (
        WPEDisplay* display
      );
      WPEInputMethodContext* (* create_input_method_context) (
        WPEDisplay* display,
        WPEView* view
      );
      WPEToplevel* (* create_toplevel) (
        WPEDisplay* display,
        guint max_views
      );
      WPEGamepadManager* (* create_gamepad_manager) (
        WPEDisplay* display
      );
      gpointer padding;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.

`connect: gboolean (* connect) ( WPEDisplay* display, GError** error )`

  No description available.

`create_view: WPEView* (* create_view) ( WPEDisplay* display )`

  No description available.

`get_egl_display: gpointer (* get_egl_display) ( WPEDisplay* display, GError** error )`

  No description available.

`get_keymap: WPEKeymap* (* get_keymap) ( WPEDisplay* display )`

  No description available.

`get_clipboard: WPEClipboard* (* get_clipboard) ( WPEDisplay* display )`

  No description available.

`get_preferred_buffer_formats: WPEBufferFormats* (* get_preferred_buffer_formats) ( WPEDisplay* display )`

  No description available.

`get_n_screens: guint (* get_n_screens) ( WPEDisplay* display )`

  No description available.

`get_screen: WPEScreen* (* get_screen) ( WPEDisplay* display, guint index )`

  No description available.

`get_drm_device: WPEDRMDevice* (* get_drm_device) ( WPEDisplay* display )`

  No description available.

`use_explicit_sync: gboolean (* use_explicit_sync) ( WPEDisplay* display )`

  No description available.

`create_input_method_context: WPEInputMethodContext* (* create_input_method_context) ( WPEDisplay* display, WPEView* view )`

  No description available.

`create_toplevel: WPEToplevel* (* create_toplevel) ( WPEDisplay* display, guint max_views )`

  No description available.

`create_gamepad_manager: WPEGamepadManager* (* create_gamepad_manager) ( WPEDisplay* display )`

  No description available.

`padding: gpointer`

  No description available.

#### Virtual methods

###### WPEPlatform.DisplayClass.connect

Connect the display to the native system.

###### WPEPlatform.DisplayClass.create_gamepad_manager

Create a `WPEGamepadManager` to handle gamepads.

###### WPEPlatform.DisplayClass.create_input_method_context

No description available.

###### WPEPlatform.DisplayClass.create_toplevel

Create a new `WPEToplevel` on `display` with `max_views` allowed. The parameter `max_views` will be ignored if `display` doesn’t support multiple views per toplevel. This function returns `NULL` if the platform implementation doesn’t support explicit creation of `WPEToplevel`.

###### WPEPlatform.DisplayClass.create_view

No description available.

###### WPEPlatform.DisplayClass.get_clipboard

Get the `WPEClipboard` of `display`. If the platform doesn’t support clipboard, a local `WPEClipboard` is created.

###### WPEPlatform.DisplayClass.get_drm_device

Get the DRM device of `display`. This is the main device that will be used to initialize the EGL display and allocate GBM buffers by default. The DRM device required to allocate GBM buffers for direct scanout will be set as main or group device in `WPEBufferFormats`.

###### WPEPlatform.DisplayClass.get_egl_display

Get the `EGLDisplay` of `display`.

###### WPEPlatform.DisplayClass.get_keymap

Get the `WPEKeymap` of `display`.

###### WPEPlatform.DisplayClass.get_n_screens

Get the number of screens of `display`.

###### WPEPlatform.DisplayClass.get_preferred_buffer_formats

Get the list of preferred buffer formats for `display`.

###### WPEPlatform.DisplayClass.get_screen

Get the screen of `display` at `index`.

###### WPEPlatform.DisplayClass.use_explicit_sync

Get whether explicit sync should be used with `display` for supported buffers.