Changes between Version 3 and Version 4 of WK2-EFLTextCheckerApiTutorial


Ignore:
Timestamp:
May 10, 2013 2:29:25 AM (8 years ago)
Author:
a.badowski@samsung.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WK2-EFLTextCheckerApiTutorial

    v3 v4  
    1717== Enabling text checker feature ==
    1818
    19 If an application wants to use this feature, the following API from ewk_settings.h should be used:
     19If an application wants to use this feature, the following API from ewk_text_checker.h should be used:
    2020{{{
    21 void ewk_settings_continuous_spell_checking_enabled_set(Eina_Bool enable);
     21void ewk_text_checker_continuous_spell_checking_enabled_set(Eina_Bool enable);
    2222}}}
    2323Here is an example how an application can enable this feature:
    2424{{{
    25 ewk_settings_continuous_spell_checking_enabled_set(EINA_TRUE);
     25ewk_text_checker_continuous_spell_checking_enabled_set(EINA_TRUE);
    2626}}}
    2727As a result, the text checker feature is enabled and the spell checking related functionalities are available for the user.
     
    2929
    3030
    31 The user is able to query whether spellchecker continuous spell checking is enabled, the following API from ewk_settings.h should be used:
     31The user is able to query whether spellchecker continuous spell checking is enabled, the following API from ewk_text_checker.h should be used:
    3232{{{
    33 Eina_Bool ewk_settings_continuous_spell_checking_enabled_get(void);
     33Eina_Bool ewk_text_checker_continuous_spell_checking_enabled_get(void);
    3434}}}
    3535Here is an example of its usage:
    3636{{{
    37 Eina_Bool enabled = ewk_settings_continuous_spell_checking_enabled_get();
     37Eina_Bool enabled = ewk_text_checker_continuous_spell_checking_enabled_get();
    3838}}}
    3939   
    4040== Languages support ==
    41 By default, WebKit2-EFL performs spell checking based on the default OS language. An arbitrary language can be set by using the following API from the ewk_settings.h:
     41By default, WebKit2-EFL performs spell checking based on the default OS language. An arbitrary language can be set by using the following API from the ewk_text_checker.h:
    4242{{{
    43 void ewk_settings_spell_checking_languages_set(const char *languages);
     43void ewk_text_checker_spell_checking_languages_set(const char *languages);
    4444}}}
    4545
     
    4747{{{
    4848const char lang[] = "en_US";
    49 ewk_settings_spell_checking_languages_set(lang);
     49ewk_text_checker_spell_checking_languages_set(lang);
    5050}}}
    5151
     
    5353{{{
    5454const char langs[] = "en_US,ko,pl";
    55 ewk_settings_spell_checking_languages_set(langs);
     55ewk_text_checker_spell_checking_languages_set(langs);
    5656}}}
    5757The presented example sets three languages (English, Korean and Polish) to be used in spell checking. The number of the languages is not limited. However, be aware that loading multiple dictionaries may slow down your application.[[BR]]
    5858
    59 There is a possibility to retrieve a list of dictionaries that are supported/installed by OS. The following API from ewk_settings.h should be used:
     59There is a possibility to retrieve a list of dictionaries that are supported/installed by OS. The following API from ewk_text_checker.h should be used:
    6060{{{
    6161Eina_List *ewk_settings_spell_checking_available_languages_get(void);
     
    6464Here is an example of its usage. It gets the available languages and displays them on the standard output:
    6565{{{
    66 Eina_List *available_langs = ewk_settings_spell_checking_available_languages_get();
     66Eina_List *available_langs = ewk_text_checker_spell_checking_available_languages_get();
    6767if (!available_langs)
    6868    return;
     
    8282The client can get a list of dictionaries that have been already loaded and are in use to perform spellchecking. Here is an example:
    8383{{{
    84 Eina_List *loaded_langs = ewk_settings_spell_checking_languages_get();
     84Eina_List *loaded_langs = ewk_text_checker_spell_checking_languages_get();
    8585if (!loaded_langs)
    8686   return;
     
    101101There is a callback function used to notify the user when the continuous spell checking setting was changed by WebKit. Specifying of this callback is needed if the application wants to receive notifications once WebKit changes this setting. If the application is not interested, this callback is not set. Changing of this setting at the WebKit level can be made as a result of modifying options in a Context Menu by a user. The following API from ewk_settings.h can be used:
    102102{{{
    103 void ewk_settings_continuous_spell_checking_change_cb_set(Ewk_Settings_Continuous_Spell_Checking_Change_Cb cb);
    104 typedef void (*Ewk_Settings_Continuous_Spell_Checking_Change_Cb)(Eina_Bool enable);
     103void ewk_text_checker_continuous_spell_checking_change_cb_set(Ewk_Settings_Continuous_Spell_Checking_Change_Cb cb);
     104typedef void (*Ewk_Text_Checker_Continuous_Spell_Checking_Change_Cb)(Eina_Bool enable);
    105105}}}
    106106
     
    115115    ...
    116116    // Callback registration.
    117     ewk_settings_continuous_spell_checking_change_cb_set(setting_change);
     117    ewk_text_checker_continuous_spell_checking_change_cb_set(setting_change);
    118118}
    119119}}}