# lv_x11.h (/api/public/drivers/x11/lv_x11_h)



<ApiSummary functions="2" structs="1" typedefs="1" />

Functions [#functions]

<ApiMember kind="function" name="lv_x11_inputs_create" file="public/drivers/x11/lv_x11.h" line="52" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/x11/lv_x11.h#L52">
  lv_x11_inputs_create [#lv_x11_inputs_create]

  create and add keyboard, mouse and scrollwheel objects and connect them to x11 display.

  This is a convenience method handling the typical input initialisation of an X11 window:

  * create keyboard (lv\_x11\_keyboard\_create)
  * create mouse (with scrollwheel, lv\_x11\_mouse\_create lv\_x11\_mousewheel\_create)

  ```c title=" " lineNumbers=1
  void lv_x11_inputs_create(lv_display_t *disp, lv_image_dsc_t const *mouse_img)
  ```

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

  | Name                  | Type                                                               | Description                                                                                                |
  | --------------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
  | **\[in]** `disp`      | <ApiLink name="lv_display_t" display="lv_display_t *" />           | the created X11 display object from <ApiLink name="lv_x11_window_create" />                                |
  | **\[in]** `mouse_img` | <ApiLink name="lv_image_dsc_t" display="lv_image_dsc_t const *" /> | optional image description for the mouse cursor **May** be `NULL`.. Use NULL for no/invisible mouse cursor |
</ApiMember>

<ApiMember kind="function" name="lv_x11_window_create" file="public/drivers/x11/lv_x11.h" line="74" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/x11/lv_x11.h#L74">
  lv_x11_window_create [#lv_x11_window_create]

  create the X11 display

  The minimal initialisation for initializing the X11 display driver with keyboard/mouse support:

  ```c title=" " lineNumbers=1
  lv_display_t* disp = lv_x11_window_create("My Window Title", window_width, window_width);
  lv_x11_inputs_create(disp, NULL);
  ```

  or with mouse cursor icon:

  ```c title=" " lineNumbers=1
  lv_image_dsc_t mouse_symbol = {.....};
  lv_display_t* disp = lv_x11_window_create("My Window Title", window_width, window_width);
  lv_x11_inputs_create(disp, &mouse_symbol);
  ```

  ```c title=" " lineNumbers=1
  lv_display_t * lv_x11_window_create(char const *title, int32_t hor_res, int32_t ver_res)
  ```

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

  | Name                | Type           | Description                                      |
  | ------------------- | -------------- | ------------------------------------------------ |
  | **\[in]** `title`   | `char const *` | title of the created X11 window                  |
  | **\[in]** `hor_res` | `int32_t`      | horizontal resolution (=width) of the X11 window |
  | **\[in]** `ver_res` | `int32_t`      | vertical resolution (=height) of the X11 window  |

  **Returns:** <ApiLink name="lv_display_t" display="lv_display_t *" /> — pointer to the display object
</ApiMember>

Structs [#structs]

<ApiMember kind="struct" name="_x11_user_hdr_t">
  \_x11_user_hdr_t [#_x11_user_hdr_t]

  Header of private display driver user data - for internal use only

  | Member     | Type                     | Description               |
  | ---------- | ------------------------ | ------------------------- |
  | `display`  | `struct _XDisplay *`     | X11 display object \<br/> |
  | `inp_data` | `struct _x11_inp_data *` | input user data object    |
</ApiMember>

Typedefs [#typedefs]

<ApiMember kind="typedef" name="lv_x11_close_cb" file="public/drivers/x11/lv_x11.h" line="36" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/x11/lv_x11.h#L36">
  lv_x11_close_cb [#lv_x11_close_cb]

  ```c title=" " lineNumbers=1
  typedef void(* lv_x11_close_cb) (void *user_data)
  ```

  optional window close callback function type
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_display.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_image_dsc.h&#x22;]" includedBy="[&#x22;lvgl.h&#x22;]" transitiveIncludes="[&#x22;lv_area.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_internal.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
