# lv_event.h (/api/misc/lv_event_h)



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

<ApiSummary functions="21" enums="1" structs="1" typedefs="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (1)&#x22;,&#x22;Getters (10)&#x22;,&#x22;Other (10)&#x22;]">
  <ApiTab value="Setters (1)">
    <ApiMember kind="function" name="lv_event_desc_set_external_data" file="misc/lv_event.h" line="262" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L262">
      lv_event_desc_set_external_data [#lv_event_desc_set_external_data]

      Set external data and its destructor for an event descriptor. This allows associating custom data with an event callback that will be automatically cleaned up when the event descriptor is removed or destroyed.

      ```c title=" " lineNumbers=1
      void lv_event_desc_set_external_data(lv_event_dsc_t *dsc, void *data, void(*free_cb)(void *data))
      ```

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

      | Name      | Type                                                         | Description                                                                                                                                        |
      | --------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `dsc`     | <ApiLink name="lv_event_dsc_t" display="lv_event_dsc_t *" /> | pointer to an event descriptor (from lv\_obj\_add\_event\_cb)                                                                                      |
      | `data`    | `void *`                                                     | pointer to the external data to associate with the event descriptor                                                                                |
      | `free_cb` | `void(*)(void *data)`                                        | function pointer to a destructor that will be called to clean up the external data. The destructor will receive the data pointer as its parameter. |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (10)">
    <ApiMember kind="function" name="lv_event_get_count" file="misc/lv_event.h" line="152" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L152">
      lv_event_get_count [#lv_event_get_count]

      ```c title=" " lineNumbers=1
      uint32_t lv_event_get_count(lv_event_list_t *list)
      ```

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

      | Name   | Type                                                           |
      | ------ | -------------------------------------------------------------- |
      | `list` | <ApiLink name="lv_event_list_t" display="lv_event_list_t *" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_get_dsc" file="misc/lv_event.h" line="154" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L154">
      lv_event_get_dsc [#lv_event_get_dsc]

      ```c title=" " lineNumbers=1
      lv_event_dsc_t * lv_event_get_dsc(lv_event_list_t *list, uint32_t index)
      ```

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

      | Name    | Type                                                           |
      | ------- | -------------------------------------------------------------- |
      | `list`  | <ApiLink name="lv_event_list_t" display="lv_event_list_t *" /> |
      | `index` | <ApiLink name="uint32_t" />                                    |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_dsc_get_cb" file="misc/lv_event.h" line="156" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L156">
      lv_event_dsc_get_cb [#lv_event_dsc_get_cb]

      ```c title=" " lineNumbers=1
      lv_event_cb_t lv_event_dsc_get_cb(lv_event_dsc_t *dsc)
      ```

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

      | Name  | Type                                                         |
      | ----- | ------------------------------------------------------------ |
      | `dsc` | <ApiLink name="lv_event_dsc_t" display="lv_event_dsc_t *" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_dsc_get_user_data" file="misc/lv_event.h" line="158" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L158">
      lv_event_dsc_get_user_data [#lv_event_dsc_get_user_data]

      ```c title=" " lineNumbers=1
      void * lv_event_dsc_get_user_data(lv_event_dsc_t *dsc)
      ```

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

      | Name  | Type                                                         |
      | ----- | ------------------------------------------------------------ |
      | `dsc` | <ApiLink name="lv_event_dsc_t" display="lv_event_dsc_t *" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_get_target" file="misc/lv_event.h" line="169" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L169">
      lv_event_get_target [#lv_event_get_target]

      Get Widget originally targeted by the event. It's the same even if event was bubbled.

      ```c title=" " lineNumbers=1
      void * lv_event_get_target(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |

      **Returns:** `void *` — the target of the event\_code
    </ApiMember>

    <ApiMember kind="function" name="lv_event_get_current_target" file="misc/lv_event.h" line="177" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L177">
      lv_event_get_current_target [#lv_event_get_current_target]

      Get current target of the event. It's the Widget for which the event handler being called. If the event is not bubbled it's the same as "normal" target.

      ```c title=" " lineNumbers=1
      void * lv_event_get_current_target(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |

      **Returns:** `void *` — pointer to the current target of the event\_code
    </ApiMember>

    <ApiMember kind="function" name="lv_event_get_code" file="misc/lv_event.h" line="184" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L184">
      lv_event_get_code [#lv_event_get_code]

      Get event code of an event.

      ```c title=" " lineNumbers=1
      lv_event_code_t lv_event_get_code(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |

      **Returns:** <ApiLink name="lv_event_code_t" /> — the event code. (E.g. `LV_EVENT_CLICKED`, `LV_EVENT_FOCUSED`, etc)
    </ApiMember>

    <ApiMember kind="function" name="lv_event_get_param" file="misc/lv_event.h" line="191" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L191">
      lv_event_get_param [#lv_event_get_param]

      Get parameter passed when event was sent.

      ```c title=" " lineNumbers=1
      void * lv_event_get_param(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |

      **Returns:** `void *` — pointer to the parameter
    </ApiMember>

    <ApiMember kind="function" name="lv_event_get_user_data" file="misc/lv_event.h" line="198" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L198">
      lv_event_get_user_data [#lv_event_get_user_data]

      Get user\_data passed when event was registered on Widget.

      ```c title=" " lineNumbers=1
      void * lv_event_get_user_data(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |

      **Returns:** `void *` — pointer to the user\_data
    </ApiMember>

    <ApiMember kind="function" name="lv_event_code_get_name" file="misc/lv_event.h" line="250" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L250">
      lv_event_code_get_name [#lv_event_code_get_name]

      Get the name of an event code.

      ```c title=" " lineNumbers=1
      const char * lv_event_code_get_name(lv_event_code_t code)
      ```

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

      | Name   | Type                               | Description    |
      | ------ | ---------------------------------- | -------------- |
      | `code` | <ApiLink name="lv_event_code_t" /> | the event code |

      **Returns:** `const char *` — the name of the event code as a string
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (10)">
    <ApiMember kind="function" name="lv_event_send" file="misc/lv_event.h" line="147" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L147">
      lv_event_send [#lv_event_send]

      Event callback. Events are used to notify the user of some action being taken on Widget. For details, see <ApiLink name="lv_event_t" />.

      ```c title=" " lineNumbers=1
      lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess)
      ```

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

      | Name         | Type                                                           |
      | ------------ | -------------------------------------------------------------- |
      | `list`       | <ApiLink name="lv_event_list_t" display="lv_event_list_t *" /> |
      | `e`          | <ApiLink name="lv_event_t" display="lv_event_t *" />           |
      | `preprocess` | <ApiLink name="bool" />                                        |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_add" file="misc/lv_event.h" line="149" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L149">
      lv_event_add [#lv_event_add]

      ```c title=" " lineNumbers=1
      lv_event_dsc_t * lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data)
      ```

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

      | Name        | Type                                                           |
      | ----------- | -------------------------------------------------------------- |
      | `list`      | <ApiLink name="lv_event_list_t" display="lv_event_list_t *" /> |
      | `cb`        | <ApiLink name="lv_event_cb_t" />                               |
      | `filter`    | <ApiLink name="lv_event_code_t" />                             |
      | `user_data` | `void *`                                                       |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_remove_dsc" file="misc/lv_event.h" line="150" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L150">
      lv_event_remove_dsc [#lv_event_remove_dsc]

      ```c title=" " lineNumbers=1
      bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc)
      ```

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

      | Name   | Type                                                           |
      | ------ | -------------------------------------------------------------- |
      | `list` | <ApiLink name="lv_event_list_t" display="lv_event_list_t *" /> |
      | `dsc`  | <ApiLink name="lv_event_dsc_t" display="lv_event_dsc_t *" />   |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_remove" file="misc/lv_event.h" line="160" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L160">
      lv_event_remove [#lv_event_remove]

      ```c title=" " lineNumbers=1
      bool lv_event_remove(lv_event_list_t *list, uint32_t index)
      ```

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

      | Name    | Type                                                           |
      | ------- | -------------------------------------------------------------- |
      | `list`  | <ApiLink name="lv_event_list_t" display="lv_event_list_t *" /> |
      | `index` | <ApiLink name="uint32_t" />                                    |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_remove_all" file="misc/lv_event.h" line="162" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L162">
      lv_event_remove_all [#lv_event_remove_all]

      ```c title=" " lineNumbers=1
      void lv_event_remove_all(lv_event_list_t *list)
      ```

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

      | Name   | Type                                                           |
      | ------ | -------------------------------------------------------------- |
      | `list` | <ApiLink name="lv_event_list_t" display="lv_event_list_t *" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_stop_bubbling" file="misc/lv_event.h" line="205" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L205">
      lv_event_stop_bubbling [#lv_event_stop_bubbling]

      Stop event from bubbling. This is only valid when called in the middle of an event processing chain.

      ```c title=" " lineNumbers=1
      void lv_event_stop_bubbling(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_stop_trickling" file="misc/lv_event.h" line="212" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L212">
      lv_event_stop_trickling [#lv_event_stop_trickling]

      Stop event from trickling down to children. This is only valid when called in the middle of an event processing chain.

      ```c title=" " lineNumbers=1
      void lv_event_stop_trickling(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_stop_processing" file="misc/lv_event.h" line="219" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L219">
      lv_event_stop_processing [#lv_event_stop_processing]

      Stop processing this event. This is only valid when called in the middle of an event processing chain.

      ```c title=" " lineNumbers=1
      void lv_event_stop_processing(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                     |
      | ---- | ---------------------------------------------------- | ------------------------------- |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to the event descriptor |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_free_user_data_cb" file="misc/lv_event.h" line="226" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L226">
      lv_event_free_user_data_cb [#lv_event_free_user_data_cb]

      Helper function typically used in LV\_EVENT\_DELETE to free the event's user\_data

      ```c title=" " lineNumbers=1
      void lv_event_free_user_data_cb(lv_event_t *e)
      ```

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

      | Name | Type                                                 | Description                    |
      | ---- | ---------------------------------------------------- | ------------------------------ |
      | `e`  | <ApiLink name="lv_event_t" display="lv_event_t *" /> | pointer to an event descriptor |
    </ApiMember>

    <ApiMember kind="function" name="lv_event_register_id" file="misc/lv_event.h" line="243" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L243">
      lv_event_register_id [#lv_event_register_id]

      Register a new, custom event ID. It can be used the same way as e.g. `LV_EVENT_CLICKED` to send custom events
      Example:

      ```c title=" " lineNumbers=1
      uint32_t LV_EVENT_MINE = 0;
      ...
      e = lv_event_register_id();
      ...
      lv_obj_send_event(obj, LV_EVENT_MINE, &some_data);
      ```

      ```c title=" " lineNumbers=1
      uint32_t lv_event_register_id(void)
      ```

      **Returns:** <ApiLink name="uint32_t" /> — the new event id
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_event_code_t" file="misc/lv_event.h" line="34" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L34">
  lv_event_code_t [#lv_event_code_t]

  Type of event being sent to Widget

  | Name                                    | Value     | Description                                                                                                                                                                                                                                                                                                                                                                                                   |
  | --------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `LV_EVENT_ALL`                          | `0`       |                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_PRESSED`                      |           | Input device events Widget has been pressed                                                                                                                                                                                                                                                                                                                                                                   |
  | `LV_EVENT_PRESSING`                     |           | Widget is being pressed (sent continuously while pressing)                                                                                                                                                                                                                                                                                                                                                    |
  | `LV_EVENT_PRESS_LOST`                   |           | Widget is still being pressed but slid cursor/finger off Widget                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_SHORT_CLICKED`                |           | Widget was pressed for a short period of time, then released. Not sent if scrolled.                                                                                                                                                                                                                                                                                                                           |
  | `LV_EVENT_SINGLE_CLICKED`               |           | Sent for first short click within a small distance and short time                                                                                                                                                                                                                                                                                                                                             |
  | `LV_EVENT_DOUBLE_CLICKED`               |           | Sent for second short click within small distance and short time                                                                                                                                                                                                                                                                                                                                              |
  | `LV_EVENT_TRIPLE_CLICKED`               |           | Sent for third short click within small distance and short time                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_LONG_PRESSED`                 |           | Object has been pressed for at least `long_press_time`. Not sent if scrolled.                                                                                                                                                                                                                                                                                                                                 |
  | `LV_EVENT_LONG_PRESSED_REPEAT`          |           | Sent after `long_press_time` in every `long_press_repeat_time` ms. Not sent if scrolled.                                                                                                                                                                                                                                                                                                                      |
  | `LV_EVENT_CLICKED`                      |           | Sent on release if not scrolled (regardless to long press)                                                                                                                                                                                                                                                                                                                                                    |
  | `LV_EVENT_RELEASED`                     |           | Sent in every cases when Widget has been released                                                                                                                                                                                                                                                                                                                                                             |
  | `LV_EVENT_SCROLL_BEGIN`                 |           | Scrolling begins. The event parameter is a pointer to the animation of the scroll. Can be modified                                                                                                                                                                                                                                                                                                            |
  | `LV_EVENT_SCROLL_THROW_BEGIN`           |           |                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_SCROLL_END`                   |           | Scrolling ends                                                                                                                                                                                                                                                                                                                                                                                                |
  | `LV_EVENT_SCROLL`                       |           | Scrolling                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `LV_EVENT_GESTURE`                      |           | A gesture is detected. Get gesture with `lv_indev_get_gesture_dir(lv_indev_active());`                                                                                                                                                                                                                                                                                                                        |
  | `LV_EVENT_KEY`                          |           | A key is sent to Widget. Get key with `lv_indev_get_key(lv_indev_active());`                                                                                                                                                                                                                                                                                                                                  |
  | `LV_EVENT_ROTARY`                       |           | An encoder or wheel was rotated. Get rotation count with `lv_event_get_rotary_diff(e);`                                                                                                                                                                                                                                                                                                                       |
  | `LV_EVENT_FOCUSED`                      |           | Widget received focus                                                                                                                                                                                                                                                                                                                                                                                         |
  | `LV_EVENT_DEFOCUSED`                    |           | Widget's focus has been lost                                                                                                                                                                                                                                                                                                                                                                                  |
  | `LV_EVENT_LEAVE`                        |           | Widget's focus has been lost but is still selected                                                                                                                                                                                                                                                                                                                                                            |
  | `LV_EVENT_HIT_TEST`                     |           | Perform advanced hit-testing                                                                                                                                                                                                                                                                                                                                                                                  |
  | `LV_EVENT_INDEV_RESET`                  |           | Indev has been reset                                                                                                                                                                                                                                                                                                                                                                                          |
  | `LV_EVENT_HOVER_OVER`                   |           | Indev hover over object                                                                                                                                                                                                                                                                                                                                                                                       |
  | `LV_EVENT_HOVER_LEAVE`                  |           | Indev hover leave object                                                                                                                                                                                                                                                                                                                                                                                      |
  | `LV_EVENT_COVER_CHECK`                  |           | Drawing events Check if Widget fully covers an area. The event parameter is `lv_cover_check_info_t *`.                                                                                                                                                                                                                                                                                                        |
  | `LV_EVENT_REFR_EXT_DRAW_SIZE`           |           | Get required extra draw area around Widget (e.g. for shadow). The event parameter is `int32_t *` to store the size.                                                                                                                                                                                                                                                                                           |
  | `LV_EVENT_DRAW_MAIN_BEGIN`              |           | Starting the main drawing phase                                                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_DRAW_MAIN`                    |           | Perform the main drawing                                                                                                                                                                                                                                                                                                                                                                                      |
  | `LV_EVENT_DRAW_MAIN_END`                |           | Finishing the main drawing phase                                                                                                                                                                                                                                                                                                                                                                              |
  | `LV_EVENT_DRAW_POST_BEGIN`              |           | Starting the post draw phase (when all children are drawn)                                                                                                                                                                                                                                                                                                                                                    |
  | `LV_EVENT_DRAW_POST`                    |           | Perform the post draw phase (when all children are drawn)                                                                                                                                                                                                                                                                                                                                                     |
  | `LV_EVENT_DRAW_POST_END`                |           | Finishing the post draw phase (when all children are drawn)                                                                                                                                                                                                                                                                                                                                                   |
  | `LV_EVENT_DRAW_TASK_ADDED`              |           | Adding a draw task. The `LV_OBJ_FLAG_SEND_DRAW_TASK_EVENTS` flag needs to be set                                                                                                                                                                                                                                                                                                                              |
  | `LV_EVENT_VALUE_CHANGED`                |           | Special events Widget's value has changed (i.e. slider moved)                                                                                                                                                                                                                                                                                                                                                 |
  | `LV_EVENT_INSERT`                       |           | Text has been inserted into Widget. The event data is `char *` being inserted.                                                                                                                                                                                                                                                                                                                                |
  | `LV_EVENT_REFRESH`                      |           | Notify Widget to refresh something on it (for user)                                                                                                                                                                                                                                                                                                                                                           |
  | `LV_EVENT_READY`                        |           | A process has finished                                                                                                                                                                                                                                                                                                                                                                                        |
  | `LV_EVENT_CANCEL`                       |           | A process has been cancelled                                                                                                                                                                                                                                                                                                                                                                                  |
  | `LV_EVENT_STATE_CHANGED`                |           | The state of the widget changed                                                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_CREATE`                       |           | Other events Object is being created                                                                                                                                                                                                                                                                                                                                                                          |
  | `LV_EVENT_DELETE`                       |           | Object is being deleted                                                                                                                                                                                                                                                                                                                                                                                       |
  | `LV_EVENT_CHILD_CHANGED`                |           | Child was removed, added, or its size, position were changed                                                                                                                                                                                                                                                                                                                                                  |
  | `LV_EVENT_CHILD_CREATED`                |           | Child was created, always bubbles up to all parents                                                                                                                                                                                                                                                                                                                                                           |
  | `LV_EVENT_CHILD_DELETED`                |           | Child was deleted, always bubbles up to all parents                                                                                                                                                                                                                                                                                                                                                           |
  | `LV_EVENT_SCREEN_UNLOAD_START`          |           | A screen unload started, fired immediately when scr\_load is called                                                                                                                                                                                                                                                                                                                                           |
  | `LV_EVENT_SCREEN_LOAD_START`            |           | A screen load started, fired when the screen change delay is expired                                                                                                                                                                                                                                                                                                                                          |
  | `LV_EVENT_SCREEN_LOADED`                |           | A screen was loaded                                                                                                                                                                                                                                                                                                                                                                                           |
  | `LV_EVENT_SCREEN_UNLOADED`              |           | A screen was unloaded                                                                                                                                                                                                                                                                                                                                                                                         |
  | `LV_EVENT_SIZE_CHANGED`                 |           | Object coordinates/size have changed                                                                                                                                                                                                                                                                                                                                                                          |
  | `LV_EVENT_STYLE_CHANGED`                |           | Object's style has changed                                                                                                                                                                                                                                                                                                                                                                                    |
  | `LV_EVENT_LAYOUT_CHANGED`               |           | A child's position position has changed due to a layout recalculation                                                                                                                                                                                                                                                                                                                                         |
  | `LV_EVENT_GET_SELF_SIZE`                |           | Get internal size of a widget                                                                                                                                                                                                                                                                                                                                                                                 |
  | `LV_EVENT_INVALIDATE_AREA`              |           | Events of optional LVGL components An area is invalidated (marked for redraw). `lv_event_get_param(e)` returns a pointer to an <ApiLink name="lv_area_t" /> object with the coordinates of the area to be invalidated. The area can be freely modified if needed to adapt it a special requirement of the display. Usually needed with monochrome displays to invalidate `N x 8` rows or columns in one pass. |
  | `LV_EVENT_RESOLUTION_CHANGED`           |           | Sent when the resolution changes due to <ApiLink name="lv_display_set_resolution" display="lv_display_set_resolution()" /> or <ApiLink name="lv_display_set_rotation" display="lv_display_set_rotation()" />.                                                                                                                                                                                                 |
  | `LV_EVENT_COLOR_FORMAT_CHANGED`         |           | Sent as a result of any call to <ApiLink name="lv_display_set_color_format" display="lv_display_set_color_format()" />.                                                                                                                                                                                                                                                                                       |
  | `LV_EVENT_REFR_REQUEST`                 |           | Sent when something happened that requires redraw.                                                                                                                                                                                                                                                                                                                                                            |
  | `LV_EVENT_REFR_START`                   |           | Sent before a refreshing cycle starts. Sent even if there is nothing to redraw.                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_REFR_READY`                   |           | Sent when refreshing has been completed (after rendering and calling flush callback). Sent even if no redraw happened.                                                                                                                                                                                                                                                                                        |
  | `LV_EVENT_RENDER_START`                 |           | Sent just before rendering begins.                                                                                                                                                                                                                                                                                                                                                                            |
  | `LV_EVENT_RENDER_READY`                 |           | Sent after rendering has been completed.                                                                                                                                                                                                                                                                                                                                                                      |
  | `LV_EVENT_FLUSH_START`                  |           | Sent before flush callback is called.                                                                                                                                                                                                                                                                                                                                                                         |
  | `LV_EVENT_FLUSH_FINISH`                 |           | Sent after flush callback call has returned.                                                                                                                                                                                                                                                                                                                                                                  |
  | `LV_EVENT_FLUSH_WAIT_START`             |           | Sent before flush wait callback is called.                                                                                                                                                                                                                                                                                                                                                                    |
  | `LV_EVENT_FLUSH_WAIT_FINISH`            |           | Sent after flush wait callback call has returned.                                                                                                                                                                                                                                                                                                                                                             |
  | `LV_EVENT_SYNC_START`                   |           | Sent before sync callback is called.                                                                                                                                                                                                                                                                                                                                                                          |
  | `LV_EVENT_SYNC_FINISH`                  |           | Sent after sync callback call has returned.                                                                                                                                                                                                                                                                                                                                                                   |
  | `LV_EVENT_SYNC_WAIT_START`              |           | Sent before sync wait callback is called.                                                                                                                                                                                                                                                                                                                                                                     |
  | `LV_EVENT_SYNC_WAIT_FINISH`             |           | Sent after sync wait callback call has returned.                                                                                                                                                                                                                                                                                                                                                              |
  | `LV_EVENT_UPDATE_LAYOUT_COMPLETED`      |           | Sent after layout update completes                                                                                                                                                                                                                                                                                                                                                                            |
  | `LV_EVENT_VSYNC`                        |           |                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_VSYNC_REQUEST`                |           |                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_TRANSLATION_LANGUAGE_CHANGED` |           | Sent when the translation language changed.                                                                                                                                                                                                                                                                                                                                                                   |
  | `LV_EVENT_LAST`                         |           |                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `LV_EVENT_PREPROCESS`                   | `0x8000`  | Number of default events                                                                                                                                                                                                                                                                                                                                                                                      |
  | `LV_EVENT_MARKED_DELETING`              | `0x10000` | This is a flag that can be set with an event so it's processed before the class default event processing                                                                                                                                                                                                                                                                                                      |
</ApiMember>

<TypeUsedBy name="lv_event_code_t" count="21">
  * `lv_obj_add_screen_load_event` — param `trigger`
  * `lv_obj_add_screen_create_event` — param `trigger`
  * `lv_obj_add_play_timeline_event` — param `trigger`
  * `lv_obj_send_event` — param `event_code`
  * `lv_obj_add_event_cb` — param `filter`
  * `lv_obj_add_subject_increment_event` — param `trigger`
  * `lv_obj_add_subject_toggle_event` — param `trigger`
  * `lv_obj_add_subject_set_int_event` — param `trigger`
  * `lv_obj_add_subject_set_float_event` — param `trigger`
  * `lv_obj_add_subject_set_string_event` — param `trigger`
  * `lv_display_add_event_cb` — param `filter`
  * `lv_display_send_event` — param `code`
  * `lv_draw_unit_send_event` — param `code`
  * `lv_indev_add_event_cb` — param `filter`
  * `lv_indev_send_event` — param `code`
  * `lv_freetype_outline_add_event` — param `filter`
  * `lv_gltf_model_node_add_event_cb` — param `filter_list`
  * `lv_gltf_model_node_add_event_cb_with_world_position` — param `filter_list`
  * `lv_event_add` — param `filter`
  * `lv_event_code_get_name` — param `code`
  * `lv_event_push_and_send` — param `code`
</TypeUsedBy>

Structs [#structs]

<ApiMember kind="struct" name="lv_event_list_t">
  lv_event_list_t [#lv_event_list_t]

  | Member                | Type                          | Description                                                                           |
  | --------------------- | ----------------------------- | ------------------------------------------------------------------------------------- |
  | `array`               | <ApiLink name="lv_array_t" /> |                                                                                       |
  | `is_traversing`       | <ApiLink name="uint8_t" />    | True: the list is being nested traversed                                              |
  | `has_marked_deleting` | <ApiLink name="uint8_t" />    | True: the list has marked deleting objects when some of events are marked as deleting |
</ApiMember>

<TypeUsedBy name="lv_event_list_t" count="8">
  * `lv_event_send` — param `list`
  * `lv_event_add` — param `list`
  * `lv_event_remove_dsc` — param `list`
  * `lv_event_get_count` — param `list`
  * `lv_event_get_dsc` — param `list`
  * `lv_event_remove` — param `list`
  * `lv_event_remove_all` — param `list`
  * `lv_event_push_and_send` — param `event_list`
</TypeUsedBy>

Typedefs [#typedefs]

<ApiMember kind="typedef" name="lv_event_cb_t" file="misc/lv_event.h" line="29" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/misc/lv_event.h#L29">
  lv_event_cb_t [#lv_event_cb_t]

  ```c title=" " lineNumbers=1
  typedef void(* lv_event_cb_t) (lv_event_t *e)
  ```
</ApiMember>

<TypeUsedBy name="lv_event_cb_t" count="13">
  * `lv_obj_add_event_cb` — param `event_cb`
  * `lv_obj_remove_event_cb` — param `event_cb`
  * `lv_obj_remove_event_cb_with_user_data` — param `event_cb`
  * `lv_display_add_event_cb` — param `event_cb`
  * `lv_display_remove_event_cb_with_user_data` — param `event_cb`
  * `lv_display_register_vsync_event` — param `event_cb`
  * `lv_display_unregister_vsync_event` — param `event_cb`
  * `lv_indev_add_event_cb` — param `event_cb`
  * `lv_indev_remove_event_cb_with_user_data` — param `event_cb`
  * `lv_freetype_outline_add_event` — param `event_cb`
  * `lv_gltf_model_node_add_event_cb` — param `cb`
  * `lv_gltf_model_node_add_event_cb_with_world_position` — param `cb`
  * `lv_event_add` — param `cb`
</TypeUsedBy>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_types.h&#x22;, &#x22;lv_conf_internal.h&#x22;, &#x22;lv_array.h&#x22;]" includedBy="[&#x22;lv_obj_event.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_freetype.h&#x22;, &#x22;lv_gltf_data_internal.hpp&#x22;, &#x22;lv_gltf_model.h&#x22;, &#x22;lv_gltf_model_node.h&#x22;, &#x22;lv_event_private.h&#x22;]" transitiveIncludes="[&#x22;lv_conf_kconfig.h&#x22;]" />
