# lv_ime_pinyin.h (/api/widgets/ime/lv_ime_pinyin_h)



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

<ApiSummary functions="7" enums="1" structs="2" macros="1" variables="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (3)&#x22;,&#x22;Getters (3)&#x22;,&#x22;Other (1)&#x22;]">
  <ApiTab value="Setters (3)">
    <ApiMember kind="function" name="lv_ime_pinyin_set_keyboard" file="widgets/ime/lv_ime_pinyin.h" line="66" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L66">
      lv_ime_pinyin_set_keyboard [#lv_ime_pinyin_set_keyboard]

      Set the keyboard of Pinyin input method.

      ```c title=" " lineNumbers=1
      void lv_ime_pinyin_set_keyboard(lv_obj_t *obj, lv_obj_t *kb)
      ```

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

      | Name  | Type                                             | Description                               |
      | ----- | ------------------------------------------------ | ----------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a Pinyin input method object   |
      | `kb`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a Pinyin input method keyboard |
    </ApiMember>

    <ApiMember kind="function" name="lv_ime_pinyin_set_dict" file="widgets/ime/lv_ime_pinyin.h" line="73" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L73">
      lv_ime_pinyin_set_dict [#lv_ime_pinyin_set_dict]

      Set the dictionary of Pinyin input method.

      ```c title=" " lineNumbers=1
      void lv_ime_pinyin_set_dict(lv_obj_t *obj, lv_pinyin_dict_t *dict)
      ```

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

      | Name   | Type                                                             | Description                                 |
      | ------ | ---------------------------------------------------------------- | ------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                 | pointer to a Pinyin input method object     |
      | `dict` | <ApiLink name="lv_pinyin_dict_t" display="lv_pinyin_dict_t *" /> | pointer to a Pinyin input method dictionary |
    </ApiMember>

    <ApiMember kind="function" name="lv_ime_pinyin_set_mode" file="widgets/ime/lv_ime_pinyin.h" line="80" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L80">
      lv_ime_pinyin_set_mode [#lv_ime_pinyin_set_mode]

      Set mode, 26-key input(k26) or 9-key input(k9).

      ```c title=" " lineNumbers=1
      void lv_ime_pinyin_set_mode(lv_obj_t *obj, lv_ime_pinyin_mode_t mode)
      ```

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

      | Name   | Type                                             | Description                              |
      | ------ | ------------------------------------------------ | ---------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a Pinyin input method object  |
      | `mode` | <ApiLink name="lv_ime_pinyin_mode_t" />          | the mode from 'lv\_ime\_pinyin\_mode\_t' |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (3)">
    <ApiMember kind="function" name="lv_ime_pinyin_get_kb" file="widgets/ime/lv_ime_pinyin.h" line="91" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L91">
      lv_ime_pinyin_get_kb [#lv_ime_pinyin_get_kb]

      Set the dictionary of Pinyin input method.

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_ime_pinyin_get_kb(lv_obj_t *obj)
      ```

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

      | Name  | Type                                             | Description                    |
      | ----- | ------------------------------------------------ | ------------------------------ |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a Pinyin IME object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the Pinyin IME keyboard
    </ApiMember>

    <ApiMember kind="function" name="lv_ime_pinyin_get_cand_panel" file="widgets/ime/lv_ime_pinyin.h" line="98" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L98">
      lv_ime_pinyin_get_cand_panel [#lv_ime_pinyin_get_cand_panel]

      Set the dictionary of Pinyin input method.

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_ime_pinyin_get_cand_panel(lv_obj_t *obj)
      ```

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

      | Name  | Type                                             | Description                             |
      | ----- | ------------------------------------------------ | --------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a Pinyin input method object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the Pinyin input method candidate panel
    </ApiMember>

    <ApiMember kind="function" name="lv_ime_pinyin_get_dict" file="widgets/ime/lv_ime_pinyin.h" line="105" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L105">
      lv_ime_pinyin_get_dict [#lv_ime_pinyin_get_dict]

      Set the dictionary of Pinyin input method.

      ```c title=" " lineNumbers=1
      const lv_pinyin_dict_t * lv_ime_pinyin_get_dict(lv_obj_t *obj)
      ```

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

      | Name  | Type                                             | Description                             |
      | ----- | ------------------------------------------------ | --------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a Pinyin input method object |

      **Returns:** <ApiLink name="lv_pinyin_dict_t" display="const lv_pinyin_dict_t *" /> — pointer to the Pinyin input method dictionary
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (1)">
    <ApiMember kind="function" name="lv_ime_pinyin_create" file="widgets/ime/lv_ime_pinyin.h" line="55" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L55">
      lv_ime_pinyin_create [#lv_ime_pinyin_create]

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_ime_pinyin_create(lv_obj_t *parent)
      ```

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

      | Name     | Type                                             |
      | -------- | ------------------------------------------------ |
      | `parent` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_ime_pinyin_mode_t" file="widgets/ime/lv_ime_pinyin.h" line="29" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L29">
  lv_ime_pinyin_mode_t [#lv_ime_pinyin_mode_t]

  | Name                           |
  | ------------------------------ |
  | `LV_IME_PINYIN_MODE_K26`       |
  | `LV_IME_PINYIN_MODE_K9`        |
  | `LV_IME_PINYIN_MODE_K9_NUMBER` |
</ApiMember>

<TypeUsedBy name="lv_ime_pinyin_mode_t" count="1">
  * `lv_ime_pinyin_set_mode` — param `mode`
</TypeUsedBy>

Structs [#structs]

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

  | Member  | Type                | Description |
  | ------- | ------------------- | ----------- |
  | `py`    | `const char *const` |             |
  | `py_mb` | `const char *const` |             |
</ApiMember>

<TypeUsedBy name="lv_pinyin_dict_t" count="1">
  * `lv_ime_pinyin_set_dict` — param `dict`
</TypeUsedBy>

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

  | Member   | Type      | Description |
  | -------- | --------- | ----------- |
  | `py_str` | `char[7]` |             |
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="LV_IME_PINYIN_K9_MAX_INPUT" file="widgets/ime/lv_ime_pinyin.h" line="23" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L23">
  LV_IME_PINYIN_K9_MAX_INPUT [#lv_ime_pinyin_k9_max_input]

  ```c title=" " lineNumbers=1
  #define LV_IME_PINYIN_K9_MAX_INPUT 7
  ```
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="lv_ime_pinyin_class" file="widgets/ime/lv_ime_pinyin.h" line="50" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/ime/lv_ime_pinyin.h#L50">
  lv_ime_pinyin_class [#lv_ime_pinyin_class]

  ```c title=" " lineNumbers=1
  const lv_obj_class_t lv_ime_pinyin_class
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_obj.h&#x22;]" includedBy="[&#x22;lv_ime_pinyin_private.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.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_conf_kconfig.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_layout.h&#x22;, &#x22;lv_ll.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_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_property_names.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_style_properties.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
