# lv_sdl_window.h (/api/public/drivers/sdl/lv_sdl_window_h)



<ApiSummary functions="10" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (5)&#x22;,&#x22;Getters (3)&#x22;,&#x22;Other (2)&#x22;]">
  <ApiTab value="Setters (5)">
    <ApiMember kind="function" name="lv_sdl_window_set_resizeable" file="public/drivers/sdl/lv_sdl_window.h" line="47" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L47">
      lv_sdl_window_set_resizeable [#lv_sdl_window_set_resizeable]

      Allow or forbid resizing the window

      ```c title=" " lineNumbers=1
      void lv_sdl_window_set_resizeable(lv_display_t *disp, bool value)
      ```

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

      | Name    | Type                                                     | Description                         |
      | ------- | -------------------------------------------------------- | ----------------------------------- |
      | `disp`  | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display           |
      | `value` | `bool`                                                   | true: resizeable, false: fixed size |
    </ApiMember>

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

      Set the size of the window

      ```c title=" " lineNumbers=1
      void lv_sdl_window_set_size(lv_display_t *disp, int32_t hor_res, int32_t ver_res)
      ```

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

      | Name      | Type                                                     | Description               |
      | --------- | -------------------------------------------------------- | ------------------------- |
      | `disp`    | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display |
      | `hor_res` | `int32_t`                                                | the new width in pixels   |
      | `ver_res` | `int32_t`                                                | the new height in pixels  |
    </ApiMember>

    <ApiMember kind="function" name="lv_sdl_window_set_zoom" file="public/drivers/sdl/lv_sdl_window.h" line="62" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L62">
      lv_sdl_window_set_zoom [#lv_sdl_window_set_zoom]

      Set the zoom factor of the window

      ```c title=" " lineNumbers=1
      void lv_sdl_window_set_zoom(lv_display_t *disp, float zoom)
      ```

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

      | Name   | Type                                                     | Description               |
      | ------ | -------------------------------------------------------- | ------------------------- |
      | `disp` | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display |
      | `zoom` | `float`                                                  | the new zoom factor       |
    </ApiMember>

    <ApiMember kind="function" name="lv_sdl_window_set_title" file="public/drivers/sdl/lv_sdl_window.h" line="76" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L76">
      lv_sdl_window_set_title [#lv_sdl_window_set_title]

      Set the title of the window

      ```c title=" " lineNumbers=1
      void lv_sdl_window_set_title(lv_display_t *disp, const char *title)
      ```

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

      | Name    | Type                                                     | Description               |
      | ------- | -------------------------------------------------------- | ------------------------- |
      | `disp`  | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display |
      | `title` | `const char *`                                           | the new title             |
    </ApiMember>

    <ApiMember kind="function" name="lv_sdl_window_set_icon" file="public/drivers/sdl/lv_sdl_window.h" line="85" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L85">
      lv_sdl_window_set_icon [#lv_sdl_window_set_icon]

      Set the icon of the window

      ```c title=" " lineNumbers=1
      void lv_sdl_window_set_icon(lv_display_t *disp, void *icon, int32_t width, int32_t height)
      ```

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

      | Name     | Type                                                     | Description                                |
      | -------- | -------------------------------------------------------- | ------------------------------------------ |
      | `disp`   | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display                  |
      | `icon`   | `void *`                                                 | pointer to the ARGB8888 pixels of the icon |
      | `width`  | `int32_t`                                                | the icon width in pixels                   |
      | `height` | `int32_t`                                                | the icon height in pixels                  |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (3)">
    <ApiMember kind="function" name="lv_sdl_window_get_zoom" file="public/drivers/sdl/lv_sdl_window.h" line="69" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L69">
      lv_sdl_window_get_zoom [#lv_sdl_window_get_zoom]

      Get the zoom factor of the window

      ```c title=" " lineNumbers=1
      float lv_sdl_window_get_zoom(lv_display_t *disp)
      ```

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

      | Name   | Type                                                     | Description               |
      | ------ | -------------------------------------------------------- | ------------------------- |
      | `disp` | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display |

      **Returns:** `float` — the current zoom factor
    </ApiMember>

    <ApiMember kind="function" name="lv_sdl_window_get_renderer" file="public/drivers/sdl/lv_sdl_window.h" line="92" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L92">
      lv_sdl_window_get_renderer [#lv_sdl_window_get_renderer]

      Get the SDL renderer of the window

      ```c title=" " lineNumbers=1
      void * lv_sdl_window_get_renderer(lv_display_t *disp)
      ```

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

      | Name   | Type                                                     | Description               |
      | ------ | -------------------------------------------------------- | ------------------------- |
      | `disp` | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display |

      **Returns:** `void *` — pointer to the SDL\_Renderer, or NULL on error
    </ApiMember>

    <ApiMember kind="function" name="lv_sdl_window_get_window" file="public/drivers/sdl/lv_sdl_window.h" line="101" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L101">
      lv_sdl_window_get_window [#lv_sdl_window_get_window]

      Get the SDL window

      ```c title=" " lineNumbers=1
      struct SDL_Window * lv_sdl_window_get_window(lv_display_t *disp)
      ```

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

      | Name   | Type                                                     | Description               |
      | ------ | -------------------------------------------------------- | ------------------------- |
      | `disp` | <ApiLink name="lv_display_t" display="lv_display_t *" /> | pointer to an SDL display |

      **Returns:** `struct SDL_Window *` — pointer to the SDL\_Window, or NULL on error
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (2)">
    <ApiMember kind="function" name="lv_sdl_window_create" file="public/drivers/sdl/lv_sdl_window.h" line="40" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L40">
      lv_sdl_window_create [#lv_sdl_window_create]

      ```c title=" " lineNumbers=1
      lv_display_t * lv_sdl_window_create(int32_t hor_res, int32_t ver_res)
      ```

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

      | Name      | Type      |
      | --------- | --------- |
      | `hor_res` | `int32_t` |
      | `ver_res` | `int32_t` |
    </ApiMember>

    <ApiMember kind="function" name="lv_sdl_quit" file="public/drivers/sdl/lv_sdl_window.h" line="94" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/drivers/sdl/lv_sdl_window.h#L94">
      lv_sdl_quit [#lv_sdl_quit]

      ```c title=" " lineNumbers=1
      void lv_sdl_quit(void)
      ```
    </ApiMember>
  </ApiTab>
</ApiTabs>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_display.h&#x22;, &#x22;lv_indev.h&#x22;]" includedBy="[&#x22;lv_sdl_keyboard.h&#x22;, &#x22;lv_sdl_mouse.h&#x22;, &#x22;lv_sdl_mousewheel.h&#x22;, &#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;]" />
