# lv_wayland.h (/api/public/drivers/wayland/lv_wayland_h)



<RelatedHeaders name="lv_wayland_private.h" isPrivate="false" />

<ApiSummary functions="5" />

Functions [#functions]

<ApiMember kind="function" name="lv_wayland_get_fd" file="public/drivers/wayland/lv_wayland.h" line="41" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/wayland/lv_wayland.h#L41">
  lv_wayland_get_fd [#lv_wayland_get_fd]

  Retrieves the file descriptor of the wayland socket

  ```c title=" " lineNumbers=1
  int lv_wayland_get_fd(void)
  ```
</ApiMember>

<ApiMember kind="function" name="lv_wayland_get_output_count" file="public/drivers/wayland/lv_wayland.h" line="47" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/wayland/lv_wayland.h#L47">
  lv_wayland_get_output_count [#lv_wayland_get_output_count]

  Get the number of physical outputs (screens) advertised by the compositor

  ```c title=" " lineNumbers=1
  uint8_t lv_wayland_get_output_count(void)
  ```

  **Returns:** `uint8_t` — the number of outputs, 0 if the driver isn't initialized yet
</ApiMember>

<ApiMember kind="function" name="lv_wayland_get_output_name" file="public/drivers/wayland/lv_wayland.h" line="55" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/wayland/lv_wayland.h#L55">
  lv_wayland_get_output_name [#lv_wayland_get_output_name]

  Get the name of a physical output

  ```c title=" " lineNumbers=1
  const char * lv_wayland_get_output_name(uint8_t output)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name     | Type      | Description                                                                                                            |
  | -------- | --------- | ---------------------------------------------------------------------------------------------------------------------- |
  | `output` | `uint8_t` | index of the output, `0`..<ApiLink name="lv_wayland_get_output_count" display="lv_wayland_get_output_count()" />` - 1` |

  **Returns:** `const char *` — the connector name, e.g. "HDMI-A-1", or NULL if `output` is out of range. The string is owned by the driver and stays valid until `lv_wayland_deinit`
</ApiMember>

<ApiMember kind="function" name="lv_wayland_get_output_size" file="public/drivers/wayland/lv_wayland.h" line="65" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/wayland/lv_wayland.h#L65">
  lv_wayland_get_output_size [#lv_wayland_get_output_size]

  Get the size of a physical output

  ```c title=" " lineNumbers=1
  bool lv_wayland_get_output_size(uint8_t output, int32_t *width, int32_t *height)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name     | Type        | Description                                                                                                            |
  | -------- | ----------- | ---------------------------------------------------------------------------------------------------------------------- |
  | `output` | `uint8_t`   | index of the output, `0`..<ApiLink name="lv_wayland_get_output_count" display="lv_wayland_get_output_count()" />` - 1` |
  | `width`  | `int32_t *` | pointer to store the width in pixels **May** be `NULL`.                                                                |
  | `height` | `int32_t *` | pointer to store the height in pixels **May** be `NULL`.                                                               |

  **Returns:** `bool` — true if the size is known, false if `output` is out of range or the compositor hasn't reported a size yet
</ApiMember>

<ApiMember kind="function" name="lv_wayland_get_display_size" file="public/drivers/wayland/lv_wayland.h" line="75" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/wayland/lv_wayland.h#L75">
  lv_wayland_get_display_size [#lv_wayland_get_display_size]

  Look up a physical output by name and get its size

  ```c title=" " lineNumbers=1
  int32_t lv_wayland_get_display_size(const char *name, int32_t *width, int32_t *height)
  ```

  <span className="sr-only">
    Parameters
  </span>

  | Name     | Type           | Description                                              |
  | -------- | -------------- | -------------------------------------------------------- |
  | `name`   | `const char *` | connector name of the output, e.g. "DSI-1" or "HDMI-A-1" |
  | `width`  | `int32_t *`    | pointer to store the width in pixels **May** be `NULL`.  |
  | `height` | `int32_t *`    | pointer to store the height in pixels **May** be `NULL`. |

  **Returns:** `int32_t` — the index of the output, to be passed to `lv_wayland_window_set_physical_display`, or -1 if no output goes by that name
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_wayland_keyboard.h&#x22;, &#x22;lv_wayland_pointer.h&#x22;, &#x22;lv_wayland_touch.h&#x22;, &#x22;lv_wayland_window.h&#x22;, &#x22;lv_wayland_pointer_axis.h&#x22;]" includedBy="[&#x22;lvgl.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_draw_arc.h&#x22;, &#x22;lv_draw_blur.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.h&#x22;, &#x22;lv_draw_label.h&#x22;, &#x22;lv_draw_line.h&#x22;, &#x22;lv_draw_rect.h&#x22;, &#x22;lv_draw_triangle.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_indev_gesture.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_obj.h&#x22;, &#x22;lv_obj_class.h&#x22;, &#x22;lv_obj_draw.h&#x22;, &#x22;lv_obj_event.h&#x22;, &#x22;lv_obj_pos.h&#x22;, &#x22;lv_obj_property.h&#x22;, &#x22;lv_obj_scroll.h&#x22;, &#x22;lv_obj_style.h&#x22;, &#x22;lv_obj_style_gen.h&#x22;, &#x22;lv_obj_tree.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
