Changeset 92473 in webkit


Ignore:
Timestamp:
Aug 5, 2011 3:16:57 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Move API documentation of ewk files to the headers
https://bugs.webkit.org/show_bug.cgi?id=65373

There are two arguments for this:

  1. Developers using webkit-efl from packages probably won't have the C/CPP files with them and the doxygen documentation can be generated from the headers without the need for the whole source files.
  2. It will be consistent with structures descriptions.

Patch by Grzegorz Czajkowski <g.czajkowski@samsung.com> on 2011-08-05
Reviewed by Kent Tamura.

  • ewk/ewk_auth.cpp:
  • ewk/ewk_auth.h:
  • ewk/ewk_contextmenu.cpp:
  • ewk/ewk_contextmenu.h:
  • ewk/ewk_cookies.cpp:
  • ewk/ewk_cookies.h:
  • ewk/ewk_frame.cpp:
  • ewk/ewk_frame.h:
  • ewk/ewk_history.cpp:
  • ewk/ewk_history.h:
  • ewk/ewk_main.cpp:
  • ewk/ewk_main.h:
  • ewk/ewk_network.cpp:
  • ewk/ewk_network.h:
  • ewk/ewk_settings.cpp:
  • ewk/ewk_settings.h:
  • ewk/ewk_window_features.cpp:
  • ewk/ewk_window_features.h:
Location:
trunk/Source/WebKit/efl
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r92265 r92473  
     12011-08-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
     2
     3        [EFL] Move API documentation of ewk files to the headers
     4        https://bugs.webkit.org/show_bug.cgi?id=65373
     5
     6        There are two arguments for this:
     7        1. Developers using webkit-efl from packages probably won't have the C/CPP files with them
     8           and the doxygen documentation can be generated from the headers without the need
     9           for the whole source files.
     10        2. It will be consistent with structures descriptions.
     11
     12        Reviewed by Kent Tamura.
     13
     14        * ewk/ewk_auth.cpp:
     15        * ewk/ewk_auth.h:
     16        * ewk/ewk_contextmenu.cpp:
     17        * ewk/ewk_contextmenu.h:
     18        * ewk/ewk_cookies.cpp:
     19        * ewk/ewk_cookies.h:
     20        * ewk/ewk_frame.cpp:
     21        * ewk/ewk_frame.h:
     22        * ewk/ewk_history.cpp:
     23        * ewk/ewk_history.h:
     24        * ewk/ewk_main.cpp:
     25        * ewk/ewk_main.h:
     26        * ewk/ewk_network.cpp:
     27        * ewk/ewk_network.h:
     28        * ewk/ewk_settings.cpp:
     29        * ewk/ewk_settings.h:
     30        * ewk/ewk_window_features.cpp:
     31        * ewk/ewk_window_features.h:
     32
    1332011-08-03  Pavel Feldman  <pfeldman@chromium.org>
    234
  • trunk/Source/WebKit/efl/ewk/ewk_auth.cpp

    r91972 r92473  
    2525#endif
    2626
    27 /**
    28  * Sets callback to be called when authentication is required.
    29  *
    30  * @param callback callback to be called.
    31  */
    3227void ewk_auth_show_dialog_callback_set(Ewk_Auth_Show_Dialog_Callback callback)
    3328{
  • trunk/Source/WebKit/efl/ewk/ewk_auth.h

    r91972 r92473  
    4242
    4343/**
    44  * Sets callback to be called when authentication is required
     44 * Sets callback to be called when authentication is required.
     45 *
     46 * @param callback callback to be called
    4547 */
    4648EAPI void ewk_auth_show_dialog_callback_set(Ewk_Auth_Show_Dialog_Callback);
  • trunk/Source/WebKit/efl/ewk/ewk_contextmenu.cpp

    r91972 r92473  
    6161};
    6262
    63 /**
    64  * Increases the reference count of the given object.
    65  *
    66  * @param menu the context menu object to increase the reference count
    67  */
    6863void ewk_context_menu_ref(Ewk_Context_Menu *menu)
    6964{
     
    7267}
    7368
    74 /**
    75  * Decreases the reference count of the given object, possibly freeing it.
    76  *
    77  * When the reference count it's reached 0, the menu with all items are freed.
    78  *
    79  * @param menu the context menu object to decrease the reference count
    80  */
    8169void ewk_context_menu_unref(Ewk_Context_Menu *menu)
    8270{
     
    9381}
    9482
    95 /**
    96  * Destroys the context menu object.
    97  *
    98  * @param menu the context menu object to destroy
    99  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
    100  *
    101  * @see ewk_context_menu_item_free
    102  */
    10383Eina_Bool ewk_context_menu_destroy(Ewk_Context_Menu *menu)
    10484{
     
    11393}
    11494
    115 /**
    116  * Gets the list of items.
    117  *
    118  * @param o the context menu object to get list of the items
    119  * @return the list of the items on success or @c 0 on failure
    120  */
    12195const Eina_List *ewk_context_menu_item_list_get(Ewk_Context_Menu *o)
    12296{
     
    126100}
    127101
    128 /**
    129  * Creates a new item of the context menu.
    130  *
    131  * @param type specifies a type of the item
    132  * @param action specifies a action of the item
    133  * @param submenu specifies a submenu of the item
    134  * @param title specifies a title of the item
    135  * @param checked
    136  * @param enabled @c EINA_TRUE to enable the item or @c EINA_FALSE to disable
    137  * @return the pointer to the new item on success or @c 0 on failure
    138  *
    139  * @note The return value @b should @b be freed after use.
    140  */
    141102Ewk_Context_Menu_Item *ewk_context_menu_item_new(Ewk_Context_Menu_Item_Type type,
    142103        Ewk_Context_Menu_Action action, Ewk_Context_Menu *submenu,
     
    157118}
    158119
    159 /**
    160  * Selects the item from the context menu object.
    161  *
    162  * @param menu the context menu object
    163  * @param item the item is selected
    164  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
    165  */
    166120Eina_Bool ewk_context_menu_item_select(Ewk_Context_Menu *menu, Ewk_Context_Menu_Item *item)
    167121{
     
    181135}
    182136
    183 /**
    184  * Destroys the item of the context menu object.
    185  *
    186  * @param item the item to destroy
    187  *
    188  * @see ewk_context_menu_destroy
    189  * @see ewk_context_menu_unref
    190  */
    191137void ewk_context_menu_item_free(Ewk_Context_Menu_Item *item)
    192138{
     
    197143}
    198144
    199 /**
    200  * Gets type of the item.
    201  *
    202  * @param o the item to get the type
    203  * @return type of the item on success or @c EWK_ACTION_TYPE on failure
    204  *
    205  * @see ewk_context_menu_item_type_set
    206  */
    207145Ewk_Context_Menu_Item_Type ewk_context_menu_item_type_get(Ewk_Context_Menu_Item *o)
    208146{
     
    211149}
    212150
    213 /**
    214  * Sets the type of item.
    215  *
    216  * @param o the item to set the type
    217  * @param type a new type for the item object
    218  * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
    219  *
    220  * @see ewk_context_menu_item_type_get
    221  */
    222151Eina_Bool ewk_context_menu_item_type_set(Ewk_Context_Menu_Item *o, Ewk_Context_Menu_Item_Type type)
    223152{
     
    227156}
    228157
    229 /**
    230  * Gets an action of the item.
    231  *
    232  * @param o the item to get the action
    233  * @return an action of the item on success or @c EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION on failure
    234  *
    235  * @see ewk_context_menu_item_action_set
    236  */
    237158Ewk_Context_Menu_Action ewk_context_menu_item_action_get(Ewk_Context_Menu_Item *o)
    238159{
     
    241162}
    242163
    243 /**
    244  * Sets an action of the item.
    245  *
    246  * @param o the item to set the action
    247  * @param action a new action for the item object
    248  * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
    249  *
    250  * @see ewk_context_menu_item_action_get
    251  */
    252164Eina_Bool ewk_context_menu_item_action_set(Ewk_Context_Menu_Item *o, Ewk_Context_Menu_Action action)
    253165{
     
    257169}
    258170
    259 /**
    260  * Gets a title of the item.
    261  *
    262  * @param o the item to get the title
    263  * @return a title of the item on success, or @c 0 on failure
    264  *
    265  * @see ewk_context_menu_item_title_set
    266  */
    267171const char *ewk_context_menu_item_title_get(Ewk_Context_Menu_Item *o)
    268172{
     
    271175}
    272176
    273 /**
    274  * Sets a title of the item.
    275  *
    276  * @param o the item to set the title
    277  * @param title a new title for the item object
    278  * @return a new title of the item on success or @c 0 on failure
    279  *
    280  * @see ewk_context_menu_item_title_get
    281  */
    282177const char *ewk_context_menu_item_title_set(Ewk_Context_Menu_Item *o, const char *title)
    283178{
     
    300195}
    301196
    302 /**
    303  * Gets if the item is enabled.
    304  *
    305  * @param o the item to get enabled state
    306  * @return @c EINA_TRUE if it's enabled, @c EINA_FALSE if not or on failure
    307  *
    308  * @see ewk_context_menu_item_enabled_set
    309  */
    310197Eina_Bool ewk_context_menu_item_enabled_get(Ewk_Context_Menu_Item *o)
    311198{
     
    314201}
    315202
    316 /**
    317  * Enables/disables the item.
    318  *
    319  * @param o the item to enable/disable
    320  * @param enabled @c EINA_TRUE to enable the item or @c EINA_FALSE to disable
    321  * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
    322  *
    323  * @see ewk_context_menu_item_enabled_get
    324  */
    325203Eina_Bool ewk_context_menu_item_enabled_set(Ewk_Context_Menu_Item *o, Eina_Bool enabled)
    326204{
  • trunk/Source/WebKit/efl/ewk/ewk_contextmenu.h

    r91972 r92473  
    152152/************************** Exported functions ***********************/
    153153
     154/**
     155 * Increases the reference count of the given object.
     156 *
     157 * @param menu the context menu object to increase the reference count
     158 */
    154159EAPI void                        ewk_context_menu_ref(Ewk_Context_Menu *menu);
     160
     161/**
     162 * Decreases the reference count of the given object, possibly freeing it.
     163 *
     164 * When the reference count it's reached 0, the menu with all items are freed.
     165 *
     166 * @param menu the context menu object to decrease the reference count
     167 */
    155168EAPI void                        ewk_context_menu_unref(Ewk_Context_Menu *menu);
     169
     170/**
     171 * Destroys the context menu object.
     172 *
     173 * @param menu the context menu object to destroy
     174 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
     175 *
     176 * @see ewk_context_menu_item_free
     177 */
    156178EAPI Eina_Bool                   ewk_context_menu_destroy(Ewk_Context_Menu *menu);
    157179
     180/**
     181 * Gets the list of items.
     182 *
     183 * @param o the context menu object to get list of the items
     184 * @return the list of the items on success or @c 0 on failure
     185 */
    158186EAPI const Eina_List            *ewk_context_menu_item_list_get(Ewk_Context_Menu *o);
    159187
     188/**
     189 * Creates a new item of the context menu.
     190 *
     191 * @param type specifies a type of the item
     192 * @param action specifies a action of the item
     193 * @param submenu specifies a submenu of the item
     194 * @param title specifies a title of the item
     195 * @param checked
     196 * @param enabled @c EINA_TRUE to enable the item or @c EINA_FALSE to disable
     197 * @return the pointer to the new item on success or @c 0 on failure
     198 *
     199 * @note The return value @b should @b be freed after use.
     200 */
    160201EAPI Ewk_Context_Menu_Item      *ewk_context_menu_item_new(Ewk_Context_Menu_Item_Type type, Ewk_Context_Menu_Action action, Ewk_Context_Menu *submenu, const char *title, Eina_Bool checked, Eina_Bool enabled);
     202
     203/**
     204 * Destroys the item of the context menu object.
     205 *
     206 * @param item the item to destroy
     207 *
     208 * @see ewk_context_menu_destroy
     209 * @see ewk_context_menu_unref
     210 */
    161211EAPI void                        ewk_context_menu_item_free(Ewk_Context_Menu_Item *item);
     212
     213/**
     214 * Selects the item from the context menu object.
     215 *
     216 * @param menu the context menu object
     217 * @param item the item is selected
     218 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
     219 */
    162220EAPI Eina_Bool                   ewk_context_menu_item_select(Ewk_Context_Menu *menu, Ewk_Context_Menu_Item *item);
     221
     222/**
     223 * Gets type of the item.
     224 *
     225 * @param o the item to get the type
     226 * @return type of the item on success or @c EWK_ACTION_TYPE on failure
     227 *
     228 * @see ewk_context_menu_item_type_set
     229 */
    163230EAPI Ewk_Context_Menu_Item_Type  ewk_context_menu_item_type_get(Ewk_Context_Menu_Item *o);
     231
     232/**
     233 * Sets the type of item.
     234 *
     235 * @param o the item to set the type
     236 * @param type a new type for the item object
     237 * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
     238 *
     239 * @see ewk_context_menu_item_type_get
     240 */
    164241EAPI Eina_Bool                   ewk_context_menu_item_type_set(Ewk_Context_Menu_Item *o, Ewk_Context_Menu_Item_Type type);
     242
     243/**
     244 * Gets an action of the item.
     245 *
     246 * @param o the item to get the action
     247 * @return an action of the item on success or @c EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION on failure
     248 *
     249 * @see ewk_context_menu_item_action_set
     250 */
    165251EAPI Ewk_Context_Menu_Action     ewk_context_menu_item_action_get(Ewk_Context_Menu_Item *o);
     252
     253/**
     254 * Sets an action of the item.
     255 *
     256 * @param o the item to set the action
     257 * @param action a new action for the item object
     258 * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
     259 *
     260 * @see ewk_context_menu_item_action_get
     261 */
    166262EAPI Eina_Bool                   ewk_context_menu_item_action_set(Ewk_Context_Menu_Item *o, Ewk_Context_Menu_Action action);
     263
     264/**
     265 * Gets a title of the item.
     266 *
     267 * @param o the item to get the title
     268 * @return a title of the item on success, or @c 0 on failure
     269 *
     270 * @see ewk_context_menu_item_title_set
     271 */
    167272EAPI const char                 *ewk_context_menu_item_title_get(Ewk_Context_Menu_Item *o);
     273
     274/**
     275 * Sets a title of the item.
     276 *
     277 * @param o the item to set the title
     278 * @param title a new title for the item object
     279 * @return a new title of the item on success or @c 0 on failure
     280 *
     281 * @see ewk_context_menu_item_title_get
     282 */
    168283EAPI const char                 *ewk_context_menu_item_title_set(Ewk_Context_Menu_Item *o, const char *title);
     284
    169285EAPI Eina_Bool                   ewk_context_menu_item_checked_get(Ewk_Context_Menu_Item *o);
    170286EAPI Eina_Bool                   ewk_context_menu_item_checked_set(Ewk_Context_Menu_Item *o, Eina_Bool checked);
     287
     288/**
     289 * Gets if the item is enabled.
     290 *
     291 * @param o the item to get enabled state
     292 * @return @c EINA_TRUE if it's enabled, @c EINA_FALSE if not or on failure
     293 *
     294 * @see ewk_context_menu_item_enabled_set
     295 */
    171296EAPI Eina_Bool                   ewk_context_menu_item_enabled_get(Ewk_Context_Menu_Item *o);
     297
     298/**
     299 * Enables/disables the item.
     300 *
     301 * @param o the item to enable/disable
     302 * @param enabled @c EINA_TRUE to enable the item or @c EINA_FALSE to disable
     303 * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
     304 *
     305 * @see ewk_context_menu_item_enabled_get
     306 */
    172307EAPI Eina_Bool                   ewk_context_menu_item_enabled_set(Ewk_Context_Menu_Item *o, Eina_Bool enabled);
    173308
  • trunk/Source/WebKit/efl/ewk/ewk_cookies.cpp

    r91972 r92473  
    3737
    3838
    39 /**
    40  * Sets the path where the cookies are going to be stored. Use @c NULL for keep
    41  * them just in memory.
    42  *
    43  * @param filename path to the cookies.txt file.
    44  *
    45  * @return @c EINA_FALSE if it wasn't possible to create the cookie jar,
    46  *          @c EINA_FALSE otherwise.
    47  */
    4839Eina_Bool ewk_cookies_file_set(const char *filename)
    4940{
     
    7465}
    7566
    76 /**
    77  * Clears all the cookies from the cookie jar.
    78  */
    7967void ewk_cookies_clear(void)
    8068{
     
    9280}
    9381
    94 /**
    95  * Returns a list of cookies in the cookie jar.
    96  *
    97  * @return an @c Eina_List with all the cookies in the cookie jar.
    98  */
    9982Eina_List *ewk_cookies_get_all(void)
    10083{
     
    124107}
    125108
    126 /**
    127  * Deletes a cookie from the cookie jar.
    128  *
    129  * Note that the fields name, value, domain and path are used to match this
    130  * cookie in the cookie jar.
    131  *
    132  * @param cookie an @c Ewk_Cookie that has the info relative to that cookie.
    133  */
    134109void ewk_cookies_cookie_del(Ewk_Cookie *cookie)
    135110{
     
    156131}
    157132
    158 /**
    159  * Frees the memory used by a cookie.
    160  *
    161  * @param cookie the Ewk_Cookie struct that will be freed.
    162  */
    163133void ewk_cookies_cookie_free(Ewk_Cookie *cookie)
    164134{
     
    173143}
    174144
    175 /**
    176  * Sets the cookies accept policy.
    177  *
    178  * @param p the acceptance policy
    179  * @see Ewk_Cookie_Policy
    180  */
    181145void ewk_cookies_policy_set(Ewk_Cookie_Policy p)
    182146{
  • trunk/Source/WebKit/efl/ewk/ewk_cookies.h

    r84771 r92473  
    7575/************************** Exported functions ***********************/
    7676
     77/**
     78 * Sets the path where the cookies are going to be stored.
     79 *
     80 * @param filename path to the cookies.txt file, use @c 0 for keep
     81 *        cookies just in memory.
     82 *
     83 * @return @c EINA_FALSE if it wasn't possible to create the cookie jar,
     84 *          @c EINA_TRUE otherwise.
     85 */
    7786EAPI Eina_Bool          ewk_cookies_file_set(const char *filename);
     87
     88/**
     89 * Clears all the cookies from the cookie jar.
     90 */
    7891EAPI void               ewk_cookies_clear(void);
     92
     93/**
     94 * Returns a list of cookies in the cookie jar.
     95 *
     96 * @return an @c Eina_List with all the cookies in the cookie jar
     97 */
    7998EAPI Eina_List*         ewk_cookies_get_all(void);
     99
     100/**
     101 * Deletes a cookie from the cookie jar.
     102 *
     103 * Note that the fields name, value, domain and path are used to match this
     104 * cookie in the cookie jar.
     105 *
     106 * @param cookie an @c Ewk_Cookie that has the info relative to that cookie
     107 */
    80108EAPI void               ewk_cookies_cookie_del(Ewk_Cookie *cookie);
     109
     110/**
     111 * Frees the memory used by a cookie.
     112 *
     113 * @param cookie the Ewk_Cookie struct that will be freed
     114 */
    81115EAPI void               ewk_cookies_cookie_free(Ewk_Cookie *cookie);
     116
     117/**
     118 * Sets accept policy for the cookies.
     119 *
     120 * @param p the acceptance policy
     121 *
     122 * @see Ewk_Cookie_Policy
     123 */
    82124EAPI void               ewk_cookies_policy_set(Ewk_Cookie_Policy p);
    83125EAPI Ewk_Cookie_Policy  ewk_cookies_policy_get(void);
  • trunk/Source/WebKit/efl/ewk/ewk_frame.cpp

    r92039 r92473  
    287287}
    288288
    289 /**
    290  * Retrieves the ewk_view object that owns this frame.
    291  *
    292  * @param o frame object to get view object
    293  *
    294  * @return view object or @c 0 on failure
    295  */
    296289Evas_Object *ewk_frame_view_get(const Evas_Object *o)
    297290{
     
    300293}
    301294
    302 /**
    303  * Returns a new iterator over all direct children frames.
    304  *
    305  * Keep frame object intact while iteration happens otherwise frame
    306  * may be destroyed while iterated.
    307  *
    308  * Iteration results are Evas_Object*, so give eina_iterator_next() a
    309  * pointer to it.
    310  *
    311  * Returned iterator should be freed by eina_iterator_free().
    312  *
    313  * @param o frame object to create the iterator
    314  *
    315  * @return a newly allocated iterator on sucess, or @c 0 if not possible to
    316  *      create the iterator
    317  */
    318295Eina_Iterator *ewk_frame_children_iterator_new(Evas_Object *o)
    319296{
     
    333310}
    334311
    335 /**
    336  * Finds a child frame by its name, recursively.
    337  *
    338  * For pre-defined names, returns @a o if @a name is "_self" or
    339  * "_current", returns @a o's parent frame if @a name is "_parent",
    340  * and returns the main frame if @a name is "_top". Also returns @a o
    341  * if it is the main frame and @a name is either "_parent" or
    342  * "_top". For other names, this function returns the first frame that
    343  * matches @a name. This function searches @a o and its descendents
    344  * first, then @a o's parent and its children moving up the hierarchy
    345  * until a match is found. If no match is found in @a o's hierarchy,
    346  * this function will search for a matching frame in other main frame
    347  * hierarchies.
    348  *
    349  * @param o frame object to find a child frame
    350  * @param name child frame name
    351  *
    352  * @return child frame of the given frame, or @c 0 if the the child wasn't found
    353  */
    354312Evas_Object *ewk_frame_child_find(Evas_Object *o, const char *name)
    355313{
     
    361319}
    362320
    363 /**
    364  * Asks the main frame to load the given URI.
    365  *
    366  * @param o frame object to load uri
    367  * @param uri uniform resource identifier to load
    368  *
    369  * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
    370  */
    371321Eina_Bool ewk_frame_uri_set(Evas_Object *o, const char *uri)
    372322{
     
    379329}
    380330
    381 /**
    382  * Gets the uri of this frame.
    383  *
    384  * It returns an internal string and should not
    385  * be modified. The string is guaranteed to be stringshared.
    386  *
    387  * @param o frame object to get uri
    388  *
    389  * @return frame uri on success or @c 0 on failure
    390  */
    391331const char *ewk_frame_uri_get(const Evas_Object *o)
    392332{
     
    395335}
    396336
    397 /**
    398  * Gets the title of this frame.
    399  *
    400  * It returns an internal string and should not
    401  * be modified. The string is guaranteed to be stringshared.
    402  *
    403  * @param o frame object to get title
    404  *
    405  * @return frame title on success or @c 0 on failure
    406  */
    407337const char *ewk_frame_title_get(const Evas_Object *o)
    408338{
     
    411341}
    412342
    413 /**
    414  * Gets the name of this frame.
    415  *
    416  * It returns an internal string and should not
    417  * be modified. The string is guaranteed to be stringshared.
    418  *
    419  * @param o frame object to get name
    420  *
    421  * @return frame name on success or @c 0 on failure
    422  */
    423343const char *ewk_frame_name_get(const Evas_Object *o)
    424344{
     
    439359}
    440360
    441 /**
    442  * Gets last known contents size.
    443  *
    444  * @param o frame object to get contents size
    445  * @param w pointer to store contents size width, may be @c 0
    446  * @param h pointer to store contents size height, may be @c 0
    447  *
    448  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure and
    449  *         @a w and @a h will be zeroed
    450  */
    451361Eina_Bool ewk_frame_contents_size_get(const Evas_Object *o, Evas_Coord *w, Evas_Coord *h)
    452362{
     
    494404}
    495405
    496 /**
    497  * Requests loading the given contents in this frame.
    498  *
    499  * @param o frame object to load document
    500  * @param contents what to load into frame
    501  * @param contents_size size of @a contents (in bytes),
    502  *        if @c 0 is given, length of @a contents is used
    503  * @param mime_type type of @a contents data, if @c 0 is given "text/html" is assumed
    504  * @param encoding encoding for @a contents data, if @c 0 is given "UTF-8" is assumed
    505  * @param base_uri base uri to use for relative resources, may be @c 0,
    506  *        if provided @b must be an absolute uri
    507  *
    508  * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
    509  */
    510406Eina_Bool ewk_frame_contents_set(Evas_Object *o, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri)
    511407{
     
    517413}
    518414
    519 /**
    520  * Requests loading alternative contents for unreachable URI in this frame.
    521  *
    522  * This is similar to ewk_frame_contents_set(), but is used when some
    523  * URI was failed to load, using the provided content instead. The main
    524  * difference is that back-forward navigation list is not changed.
    525  *
    526  * @param o frame object to load alternative content
    527  * @param contents what to load into frame, must @b not be @c 0
    528  * @param contents_size size of @a contents (in bytes),
    529  *        if @c 0 is given, length of @a contents is used
    530  * @param mime_type type of @a contents data, if @c 0 is given "text/html" is assumed
    531  * @param encoding encoding used for @a contents data, if @c 0 is given "UTF-8" is assumed
    532  * @param base_uri base URI to use for relative resources, may be @c 0,
    533  *        if provided must be an absolute uri
    534  * @param unreachable_uri the URI that failed to load and is getting the
    535  *        alternative representation
    536  *
    537  * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
    538  */
    539415Eina_Bool ewk_frame_contents_alternate_set(Evas_Object *o, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri, const char *unreachable_uri)
    540416{
     
    548424}
    549425
    550 /**
    551  * Requests execution of the given script.
    552  *
    553  * @param o frame object to execute script
    554  * @param script Java Script to execute
    555  *
    556  * @return @c EINA_TRUE if request was done, @c EINA_FALSE on errors
    557  */
    558426Eina_Bool ewk_frame_script_execute(Evas_Object *o, const char *script)
    559427{
     
    565433}
    566434
    567 /**
    568  * Queries if the frame is editable.
    569  *
    570  * @param o the frame object to query editable state
    571  *
    572  * @return @c EINA_TRUE if the frame is editable, @c EINA_FALSE otherwise
    573  */
    574435Eina_Bool ewk_frame_editable_get(const Evas_Object *o)
    575436{
     
    579440}
    580441
    581 /**
    582  * Sets editable state for frame.
    583  *
    584  * @param o the frame object to set editable state
    585  * @param editable a new state to set
    586  *
    587  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    588  */
    589442Eina_Bool ewk_frame_editable_set(Evas_Object *o, Eina_Bool editable)
    590443{
     
    599452}
    600453
    601 /**
    602  * Gets the copy of the selected text.
    603  *
    604  * The returned string @b should be freed after use.
    605  *
    606  * @param o the frame object to get selected text
    607  *
    608  * @return a newly allocated string or @c 0 if nothing is selected or on failure
    609  */
    610454char *ewk_frame_selection_get(const Evas_Object *o)
    611455{
     
    618462}
    619463
    620 /**
    621  * Searches the given string in a document.
    622  *
    623  * @param o frame object where to search the text
    624  * @param string reference string to search
    625  * @param case_sensitive if search should be case sensitive or not
    626  * @param forward if search is from cursor and on or backwards
    627  * @param wrap if search should wrap at the end
    628  *
    629  * @return @c EINA_TRUE if the given string was found, @c EINA_FALSE if not or failure
    630  */
    631464Eina_Bool ewk_frame_text_search(const Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap)
    632465{
     
    638471}
    639472
    640 /**
    641  * Marks matches the given string in a document.
    642  *
    643  * @param o frame object where to search text
    644  * @param string reference string to match
    645  * @param case_sensitive if match should be case sensitive or not
    646  * @param highlight if matches should be highlighted
    647  * @param limit maximum amount of matches, or zero to unlimited
    648  *
    649  * @return number of matched @a string
    650  */
    651473unsigned int ewk_frame_text_matches_mark(Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit)
    652474{
     
    659481}
    660482
    661 /**
    662  * Unmarks all marked matches in a document.
    663  * Reverses the effect of ewk_frame_text_matches_mark().
    664  *
    665  * @param o frame object where to unmark matches
    666  *
    667  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
    668  */
    669483Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object *o)
    670484{
     
    692506}
    693507
    694 /**
    695  * Returns whether matches marked with ewk_frame_text_matches_mark() are highlighted.
    696  *
    697  * @param o frame object to query if matches are highlighted or not
    698  *
    699  * @return @c EINA_TRUE if matches are highlighted, @c EINA_FALSE otherwise
    700  */
    701508Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object *o)
    702509{
     
    722529}
    723530
    724 /**
    725  * Returns the position of the n-th matched text in the frame.
    726  *
    727  * @param o frame object where matches are marked
    728  * @param n index of element
    729  * @param x the pointer to store the horizontal position of @a n matched text, may be @c 0
    730  * @param y the pointer to store the vertical position of @a n matched text, may be @c 0
    731  *
    732  * @return @c EINA_TRUE on success, @c EINA_FALSE when no matches were found or
    733  *         @a n is bigger than search results or on failure
    734  */
    735531Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object *o, size_t n, int *x, int *y)
    736532{
     
    755551}
    756552
    757 /**
    758  * Asks frame to stop loading.
    759  *
    760  * @param o frame object to stop loading
    761  *
    762  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    763  */
    764553Eina_Bool ewk_frame_stop(Evas_Object *o)
    765554{
     
    770559}
    771560
    772 /**
    773  * Asks frame to reload current document.
    774  *
    775  * @param o frame object to reload current document
    776  *
    777  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    778  *
    779  * @see ewk_frame_reload_full()
    780  */
    781561Eina_Bool ewk_frame_reload(Evas_Object *o)
    782562{
     
    787567}
    788568
    789 /**
    790  * Asks frame to fully reload current document, using no previous caches.
    791  *
    792  * @param o frame object to reload current document
    793  *
    794  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    795  */
    796569Eina_Bool ewk_frame_reload_full(Evas_Object *o)
    797570{
     
    802575}
    803576
    804 /**
    805  * Asks the frame to navigate back in the history.
    806  *
    807  * @param o frame object to navigate back
    808  *
    809  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    810  *
    811  * @see ewk_frame_navigate()
    812  */
    813577Eina_Bool ewk_frame_back(Evas_Object *o)
    814578{
     
    816580}
    817581
    818 /**
    819  * Asks frame to navigate forward in the history.
    820  *
    821  * @param o frame object to navigate forward
    822  *
    823  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    824  *
    825  * @see ewk_frame_navigate()
    826  */
    827582Eina_Bool ewk_frame_forward(Evas_Object *o)
    828583{
     
    830585}
    831586
    832 /**
    833  * Navigates back or forward in the history.
    834  *
    835  * @param o frame object to navigate
    836  * @param steps if positive navigates that amount forwards, if negative
    837  *        does backwards
    838  *
    839  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    840  */
    841587Eina_Bool ewk_frame_navigate(Evas_Object *o, int steps)
    842588{
     
    850596}
    851597
    852 /**
    853  * Queries if it's possible to navigate backwards one item in the history.
    854  *
    855  * @param o frame object to query if backward navigation is possible
    856  *
    857  * @return @c EINA_TRUE if it's possible to navigate backwards one item in the history, @c EINA_FALSE otherwise
    858  *
    859  * @see ewk_frame_navigate_possible()
    860  */
    861598Eina_Bool ewk_frame_back_possible(Evas_Object *o)
    862599{
     
    864601}
    865602
    866 /**
    867  * Queries if it's possible to navigate forwards one item in the history.
    868  *
    869  * @param o frame object to query if forward navigation is possible
    870  *
    871  * @return @c EINA_TRUE if it's possible to navigate forwards in the history, @c EINA_FALSE otherwise
    872  *
    873  * @see ewk_frame_navigate_possible()
    874  */
    875603Eina_Bool ewk_frame_forward_possible(Evas_Object *o)
    876604{
     
    878606}
    879607
    880 /**
    881  * Queries if it's possible to navigate given @a steps in the history.
    882  *
    883  * @param o frame object to query if is possible to navigate @a steps in the history
    884  * @param steps positive value navigates that amount forwards, negative value
    885  *        does backwards
    886  *
    887  * @return @c EINA_TRUE if it's possible to navigate @a steps in the history, @c EINA_FALSE otherwise
    888  */
    889608Eina_Bool ewk_frame_navigate_possible(Evas_Object *o, int steps)
    890609{
     
    895614}
    896615
    897 /**
    898  * Gets the current zoom level used by this frame.
    899  *
    900  * @param o frame object to get zoom level
    901  *
    902  * @return zoom level for the frame or @c -1.0 on failure
    903  */
    904616float ewk_frame_zoom_get(const Evas_Object *o)
    905617{
     
    912624}
    913625
    914 /**
    915  * Sets the current zoom level used by this frame.
    916  *
    917  * @param o frame object to change zoom level
    918  * @param zoom a new zoom level
    919  *
    920  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
    921  *
    922  * @see ewk_frame_zoom_text_only_set()
    923  */
    924626Eina_Bool ewk_frame_zoom_set(Evas_Object *o, float zoom)
    925627{
     
    933635}
    934636
    935 /**
    936  * Queries if zoom level just applies to text only and not other elements.
    937  *
    938  * @param o frame to query zoom level for text only
    939  *
    940  * @return @c EINA_TRUE if zoom level is applied to text only, @c EINA_FALSE if not or on failure
    941  */
    942637Eina_Bool ewk_frame_zoom_text_only_get(const Evas_Object *o)
    943638{
     
    946641}
    947642
    948 /**
    949  * Sets if zoom level just applies to text only and not other elements.
    950  *
    951  * @param o frame to apply zoom level for text only
    952  * @param setting @c EINA_TRUE if zoom level should be applied to text only, @c EINA_FALSE if not
    953  *
    954  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    955  */
    956643Eina_Bool ewk_frame_zoom_text_only_set(Evas_Object *o, Eina_Bool setting)
    957644{
     
    970657}
    971658
    972 /**
    973  * Frees hit test instance created by ewk_frame_hit_test_new().
    974  *
    975  * @param hit_test instance
    976  */
    977659void ewk_frame_hit_test_free(Ewk_Hit_Test *hit_test)
    978660{
     
    988670}
    989671
    990 /**
    991  * Creates a new hit test for the given frame and point.
    992  *
    993  * The returned object should be freed by ewk_frame_hit_test_free().
    994  *
    995  * @param o frame object to do hit test on
    996  * @param x the horizontal position to query
    997  * @param y the vertical position to query
    998  *
    999  * @return a newly allocated hit test on success, @c 0 otherwise
    1000  */
    1001672Ewk_Hit_Test *ewk_frame_hit_test_new(const Evas_Object *o, int x, int y)
    1002673{
     
    1071742}
    1072743
    1073 /**
    1074  * Sets a relative scroll of the given frame.
    1075  *
    1076  * This function does scroll @a dx and @a dy pixels
    1077  * from the current position of scroll.
    1078  *
    1079  * @param o frame object to scroll
    1080  * @param dx horizontal offset to scroll
    1081  * @param dy vertical offset to scroll
    1082  *
    1083  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    1084  */
    1085744Eina_Bool
    1086745ewk_frame_scroll_add(Evas_Object *o, int dx, int dy)
     
    1093752}
    1094753
    1095 /**
    1096  * Sets an absolute scroll of the given frame.
    1097  *
    1098  * Both values are from zero to the contents size minus the viewport
    1099  * size. See ewk_frame_scroll_size_get().
    1100  *
    1101  * @param o frame object to scroll
    1102  * @param x horizontal position to scroll
    1103  * @param y vertical position to scroll
    1104  *
    1105  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
    1106  */
    1107754Eina_Bool
    1108755ewk_frame_scroll_set(Evas_Object *o, int x, int y)
     
    1115762}
    1116763
    1117 /**
    1118  * Gets the possible scroll size of the given frame.
    1119  *
    1120  * Possible scroll size is contents size minus the viewport
    1121  * size. It's the last allowed value for ewk_frame_scroll_set()
    1122  *
    1123  * @param o frame object to get scroll size
    1124  * @param w the pointer to store the horizontal size that is possible to scroll,
    1125  *        may be @c 0
    1126  * @param h the pointer to store the vertical size that is possible to scroll,
    1127  *        may be @c 0
    1128  *
    1129  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
    1130  *         values are zeroed
    1131  */
    1132764Eina_Bool
    1133765ewk_frame_scroll_size_get(const Evas_Object *o, int *w, int *h)
     
    1148780}
    1149781
    1150 /**
    1151  * Gets the current scroll position of given frame.
    1152  *
    1153  * @param o frame object to get the current scroll position
    1154  * @param x the pointer to store the horizontal position, may be @c 0
    1155  * @param y the pointer to store the vertical position. may be @c 0
    1156  *
    1157  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
    1158  *         values are zeroed.
    1159  */
    1160782Eina_Bool
    1161783ewk_frame_scroll_pos_get(const Evas_Object *o, int *x, int *y)
     
    1176798}
    1177799
    1178 /**
    1179  * Gets the visible content geometry of the frame.
    1180  *
    1181  * @param o frame object to query visible content geometry
    1182  * @param include_scrollbars whenever to include scrollbars size
    1183  * @param x the pointer to store the horizontal position, may be @c 0
    1184  * @param y the pointer to store the vertical position, may be @c 0
    1185  * @param w the pointer to store width, may be @c 0
    1186  * @param h the pointer to store height, may be @c 0
    1187  *
    1188  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
    1189  *         values are zeroed
    1190  */
    1191800Eina_Bool ewk_frame_visible_content_geometry_get(const Evas_Object *o, Eina_Bool include_scrollbars, int *x, int *y, int *w, int *h)
    1192801{
     
    1214823}
    1215824
    1216 /**
    1217  * Queries if the frame should be repainted completely.
    1218  *
    1219  * Function tells if dirty areas should be repainted
    1220  * even if they are out of the screen.
    1221  *
    1222  * @param o frame object to query if the frame should be repainted completely
    1223  *
    1224  * @return @c EINA_TRUE if any dirty areas should be repainted, @c EINA_FALSE
    1225  *         otherwise
    1226  */
    1227825Eina_Bool ewk_frame_paint_full_get(const Evas_Object *o)
    1228826{
     
    1233831}
    1234832
    1235 /**
    1236  * Sets if the frame should be repainted completely.
    1237  *
    1238  * Function sets if dirty areas should be repainted
    1239  * even if they are out of the screen.
    1240  *
    1241  * @param o frame object to set if the frame should be repainted completely
    1242  * @param flag @c EINA_TRUE to repaint the frame completely,
    1243  *             @c EINA_FALSE if not
    1244  */
    1245833void ewk_frame_paint_full_set(Evas_Object *o, Eina_Bool flag)
    1246834{
     
    1251839}
    1252840
    1253 /**
    1254  * Feeds the focus in event to the frame.
    1255  *
    1256  * @param o frame object to feed focus
    1257  *
    1258  * @return @c EINA_TRUE if the focus was handled, @c EINA_FALSE otherwise
    1259  */
    1260841Eina_Bool ewk_frame_feed_focus_in(Evas_Object *o)
    1261842{
     
    1267848}
    1268849
    1269 /**
    1270  * Feeds the focus out event to the frame.
    1271  *
    1272  * @param o frame object to remove focus
    1273  *
    1274  * @return @c EINA_FALSE since the feature is not implemented
    1275  */
    1276850Eina_Bool ewk_frame_feed_focus_out(Evas_Object *o)
    1277851{
     
    1281855}
    1282856
    1283 /**
    1284  * Feeds the mouse wheel event to the frame.
    1285  *
    1286  * @param o frame object to feed the mouse wheel event
    1287  * @param ev the mouse wheel event
    1288  *
    1289  * @return @c EINA_TRUE if the mouse wheel event was handled, @c EINA_FALSE otherwise
    1290  */
    1291857Eina_Bool ewk_frame_feed_mouse_wheel(Evas_Object *o, const Evas_Event_Mouse_Wheel *ev)
    1292858{
     
    1304870}
    1305871
    1306 /**
    1307  * Feeds the mouse down event to the frame.
    1308  *
    1309  * @param o frame object to feed the mouse down event
    1310  * @param ev the mouse down event
    1311  *
    1312  * @return @c EINA_TRUE if the mouse down event was handled, @c EINA_FALSE otherwise
    1313  */
    1314872Eina_Bool ewk_frame_feed_mouse_down(Evas_Object *o, const Evas_Event_Mouse_Down *ev)
    1315873{
     
    1330888}
    1331889
    1332 /**
    1333  * Feeds the mouse up event to the frame.
    1334  *
    1335  * @param o frame object to feed the mouse up event
    1336  * @param ev the mouse up event
    1337  *
    1338  * @return @c EINA_TRUE if the mouse up event was handled, @c EINA_FALSE otherwise
    1339  */
    1340890Eina_Bool ewk_frame_feed_mouse_up(Evas_Object *o, const Evas_Event_Mouse_Up *ev)
    1341891{
     
    1356906}
    1357907
    1358 /**
    1359  * Feeds the mouse move event to the frame.
    1360  *
    1361  * @param o frame object to feed the mouse move event
    1362  * @param ev the mouse move event
    1363  *
    1364  * @return @c EINA_TRUE if the mouse move event was handled, @c EINA_FALSE otherwise
    1365  */
    1366908Eina_Bool ewk_frame_feed_mouse_move(Evas_Object *o, const Evas_Event_Mouse_Move *ev)
    1367909{
     
    1383925}
    1384926
    1385 /**
    1386  * Feeds the touch event to the frame.
    1387  *
    1388  * @param o frame object to feed touch event
    1389  * @param action the action of touch event
    1390  * @param points a list of points (Ewk_Touch_Point) to process
    1391  * @param metaState DEPRECTAED, not supported for now
    1392  *
    1393  * @return @c EINA_TRUE if touch event was handled, @c EINA_FALSE otherwise
    1394  */
    1395927Eina_Bool ewk_frame_feed_touch_event(Evas_Object *o, Ewk_Touch_Event_Type action, Eina_List *points, int metaState)
    1396928{
     
    14981030}
    14991031
    1500 /**
    1501  * Feeds the keyboard key down event to the frame.
    1502  *
    1503  * @param o frame object to feed event
    1504  * @param ev keyboard key down event
    1505  *
    1506  * @return @c EINA_TRUE if the key down event was handled, @c EINA_FALSE otherwise
    1507  */
    15081032Eina_Bool ewk_frame_feed_key_down(Evas_Object *o, const Evas_Event_Key_Down *ev)
    15091033{
     
    15221046}
    15231047
    1524 /**
    1525  * Feeds the keyboard key up event to the frame.
    1526  *
    1527  * @param o frame object to feed event
    1528  * @param ev keyboard key up event
    1529  *
    1530  * @return @c EINA_TRUE if the key up event was handled, @c EINA_FALSE otherwise
    1531  */
    15321048Eina_Bool ewk_frame_feed_key_up(Evas_Object *o, const Evas_Event_Key_Up *ev)
    15331049{
     
    15431059}
    15441060
    1545 /**
    1546  * Returns current text selection type.
    1547  *
    1548  * @param o a frame object to check selection type
    1549  * @return Current text selection type on success or no selection otherwise
    1550  */
    15511061Ewk_Text_Selection_Type ewk_frame_text_selection_type_get(Evas_Object *o)
    15521062{
  • trunk/Source/WebKit/efl/ewk/ewk_frame.h

    r92039 r92473  
    173173} Ewk_Text_Selection_Type;
    174174
     175/**
     176 * Retrieves the ewk_view object that owns this frame.
     177 *
     178 * @param o frame object to get view object
     179 *
     180 * @return view object or @c 0 on failure
     181 */
    175182EAPI Evas_Object *ewk_frame_view_get(const Evas_Object *o);
    176183
     184/**
     185 * Returns a new iterator over all direct children frames.
     186 *
     187 * Keep frame object intact while iteration happens otherwise frame
     188 * may be destroyed while iterated.
     189 *
     190 * Iteration results are Evas_Object*, so give eina_iterator_next() a
     191 * pointer to it.
     192 *
     193 * Returned iterator should be freed by eina_iterator_free().
     194 *
     195 * @param o frame object to create the iterator
     196 *
     197 * @return a newly allocated iterator on sucess, or @c 0 if not possible to
     198 *      create the iterator
     199 */
    177200EAPI Eina_Iterator *ewk_frame_children_iterator_new(Evas_Object *o);
     201
     202/**
     203 * Finds a child frame by its name, recursively.
     204 *
     205 * For pre-defined names, returns @a o if @a name is "_self" or
     206 * "_current", returns @a o's parent frame if @a name is "_parent",
     207 * and returns the main frame if @a name is "_top". Also returns @a o
     208 * if it is the main frame and @a name is either "_parent" or
     209 * "_top". For other names, this function returns the first frame that
     210 * matches @a name. This function searches @a o and its descendents
     211 * first, then @a o's parent and its children moving up the hierarchy
     212 * until a match is found. If no match is found in @a o's hierarchy,
     213 * this function will search for a matching frame in other main frame
     214 * hierarchies.
     215 *
     216 * @param o frame object to find a child frame
     217 * @param name child frame name
     218 *
     219 * @return child frame of the given frame, or @c 0 if the the child wasn't found
     220 */
    178221EAPI Evas_Object   *ewk_frame_child_find(Evas_Object *o, const char *name);
    179222
     223/**
     224 * Asks the main frame to load the given URI.
     225 *
     226 * @param o frame object to load uri
     227 * @param uri uniform resource identifier to load
     228 *
     229 * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
     230 */
    180231EAPI Eina_Bool    ewk_frame_uri_set(Evas_Object *o, const char *uri);
     232
     233/**
     234 * Gets the uri of this frame.
     235 *
     236 * It returns an internal string and should not
     237 * be modified. The string is guaranteed to be stringshared.
     238 *
     239 * @param o frame object to get uri
     240 *
     241 * @return frame uri on success or @c 0 on failure
     242 */
    181243EAPI const char  *ewk_frame_uri_get(const Evas_Object *o);
     244
     245/**
     246 * Gets the title of this frame.
     247 *
     248 * It returns an internal string and should not
     249 * be modified. The string is guaranteed to be stringshared.
     250 *
     251 * @param o frame object to get title
     252 *
     253 * @return frame title on success or @c 0 on failure
     254 */
    182255EAPI const char  *ewk_frame_title_get(const Evas_Object *o);
     256
     257/**
     258 * Gets the name of this frame.
     259 *
     260 * It returns an internal string and should not
     261 * be modified. The string is guaranteed to be stringshared.
     262 *
     263 * @param o frame object to get name
     264 *
     265 * @return frame name on success or @c 0 on failure
     266 */
    183267EAPI const char  *ewk_frame_name_get(const Evas_Object *o);
     268
     269/**
     270 * Gets last known contents size.
     271 *
     272 * @param o frame object to get contents size
     273 * @param w pointer to store contents size width, may be @c 0
     274 * @param h pointer to store contents size height, may be @c 0
     275 *
     276 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure and
     277 *         @a w and @a h will be zeroed
     278 */
    184279EAPI Eina_Bool    ewk_frame_contents_size_get(const Evas_Object *o, Evas_Coord *w, Evas_Coord *h);
    185280
     281/**
     282 * Requests loading the given contents in this frame.
     283 *
     284 * @param o frame object to load document
     285 * @param contents what to load into frame
     286 * @param contents_size size of @a contents (in bytes),
     287 *        if @c 0 is given, length of @a contents is used
     288 * @param mime_type type of @a contents data, if @c 0 is given "text/html" is assumed
     289 * @param encoding encoding for @a contents data, if @c 0 is given "UTF-8" is assumed
     290 * @param base_uri base uri to use for relative resources, may be @c 0,
     291 *        if provided @b must be an absolute uri
     292 *
     293 * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
     294 */
    186295EAPI Eina_Bool    ewk_frame_contents_set(Evas_Object *o, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri);
     296
     297/**
     298 * Requests loading alternative contents for unreachable URI in this frame.
     299 *
     300 * This is similar to ewk_frame_contents_set(), but is used when some
     301 * URI was failed to load, using the provided content instead. The main
     302 * difference is that back-forward navigation list is not changed.
     303 *
     304 * @param o frame object to load alternative content
     305 * @param contents what to load into frame, must @b not be @c 0
     306 * @param contents_size size of @a contents (in bytes),
     307 *        if @c 0 is given, length of @a contents is used
     308 * @param mime_type type of @a contents data, if @c 0 is given "text/html" is assumed
     309 * @param encoding encoding used for @a contents data, if @c 0 is given "UTF-8" is assumed
     310 * @param base_uri base URI to use for relative resources, may be @c 0,
     311 *        if provided must be an absolute uri
     312 * @param unreachable_uri the URI that failed to load and is getting the
     313 *        alternative representation
     314 *
     315 * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
     316 */
    187317EAPI Eina_Bool    ewk_frame_contents_alternate_set(Evas_Object *o, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri, const char *unreachable_uri);
    188318
     319/**
     320 * Requests execution of the given script.
     321 *
     322 * @param o frame object to execute script
     323 * @param script Java Script to execute
     324 *
     325 * @return @c EINA_TRUE if request was done, @c EINA_FALSE on errors
     326 */
    189327EAPI Eina_Bool    ewk_frame_script_execute(Evas_Object *o, const char *script);
    190328
     329/**
     330 * Queries if the frame is editable.
     331 *
     332 * @param o the frame object to query editable state
     333 *
     334 * @return @c EINA_TRUE if the frame is editable, @c EINA_FALSE otherwise
     335 */
    191336EAPI Eina_Bool    ewk_frame_editable_get(const Evas_Object *o);
     337
     338/**
     339 * Sets editable state for frame.
     340 *
     341 * @param o the frame object to set editable state
     342 * @param editable a new state to set
     343 *
     344 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     345 */
    192346EAPI Eina_Bool    ewk_frame_editable_set(Evas_Object *o, Eina_Bool editable);
    193347
     348/**
     349 * Gets the copy of the selected text.
     350 *
     351 * The returned string @b should be freed after use.
     352 *
     353 * @param o the frame object to get selected text
     354 *
     355 * @return a newly allocated string or @c 0 if nothing is selected or on failure
     356 */
    194357EAPI char        *ewk_frame_selection_get(const Evas_Object *o);
    195358
     359/**
     360 * Searches the given string in a document.
     361 *
     362 * @param o frame object where to search the text
     363 * @param string reference string to search
     364 * @param case_sensitive if search should be case sensitive or not
     365 * @param forward if search is from cursor and on or backwards
     366 * @param wrap if search should wrap at the end
     367 *
     368 * @return @c EINA_TRUE if the given string was found, @c EINA_FALSE if not or failure
     369 */
    196370EAPI Eina_Bool    ewk_frame_text_search(const Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
    197371
     372/**
     373 * Marks matches the given string in a document.
     374 *
     375 * @param o frame object where to search text
     376 * @param string reference string to match
     377 * @param case_sensitive if match should be case sensitive or not
     378 * @param highlight if matches should be highlighted
     379 * @param limit maximum amount of matches, or zero to unlimited
     380 *
     381 * @return number of matched @a string
     382 */
    198383EAPI unsigned int ewk_frame_text_matches_mark(Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
    199384EAPI Eina_Bool    ewk_frame_text_matches_unmark_all(Evas_Object *o);
     385
     386/**
     387 * Unmarks all marked matches in a document.
     388 * Reverses the effect of ewk_frame_text_matches_mark().
     389 *
     390 * @param o frame object where to unmark matches
     391 *
     392 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
     393 */
    200394EAPI Eina_Bool    ewk_frame_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight);
     395
     396/**
     397 * Returns whether matches marked with ewk_frame_text_matches_mark() are highlighted.
     398 *
     399 * @param o frame object to query if matches are highlighted or not
     400 *
     401 * @return @c EINA_TRUE if matches are highlighted, @c EINA_FALSE otherwise
     402 */
    201403EAPI Eina_Bool    ewk_frame_text_matches_highlight_get(const Evas_Object *o);
     404
     405/**
     406 * Returns the position of the n-th matched text in the frame.
     407 *
     408 * @param o frame object where matches are marked
     409 * @param n index of element
     410 * @param x the pointer to store the horizontal position of @a n matched text, may be @c 0
     411 * @param y the pointer to store the vertical position of @a n matched text, may be @c 0
     412 *
     413 * @return @c EINA_TRUE on success, @c EINA_FALSE when no matches were found or
     414 *         @a n is bigger than search results or on failure
     415 */
    202416EAPI Eina_Bool    ewk_frame_text_matches_nth_pos_get(Evas_Object *o, size_t n, int *x, int *y);
    203417
     418/**
     419 * Asks frame to stop loading.
     420 *
     421 * @param o frame object to stop loading
     422 *
     423 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     424 */
    204425EAPI Eina_Bool    ewk_frame_stop(Evas_Object *o);
     426
     427/**
     428 * Asks frame to reload current document.
     429 *
     430 * @param o frame object to reload current document
     431 *
     432 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     433 *
     434 * @see ewk_frame_reload_full()
     435 */
    205436EAPI Eina_Bool    ewk_frame_reload(Evas_Object *o);
     437
     438/**
     439 * Asks frame to fully reload current document, using no previous caches.
     440 *
     441 * @param o frame object to reload current document
     442 *
     443 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     444 */
    206445EAPI Eina_Bool    ewk_frame_reload_full(Evas_Object *o);
    207446
     447/**
     448 * Asks the frame to navigate back in the history.
     449 *
     450 * @param o frame object to navigate back
     451 *
     452 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     453 *
     454 * @see ewk_frame_navigate()
     455 */
    208456EAPI Eina_Bool    ewk_frame_back(Evas_Object *o);
     457
     458/**
     459 * Asks frame to navigate forward in the history.
     460 *
     461 * @param o frame object to navigate forward
     462 *
     463 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     464 *
     465 * @see ewk_frame_navigate()
     466 */
    209467EAPI Eina_Bool    ewk_frame_forward(Evas_Object *o);
     468
     469/**
     470 * Navigates back or forward in the history.
     471 *
     472 * @param o frame object to navigate
     473 * @param steps if positive navigates that amount forwards, if negative
     474 *        does backwards
     475 *
     476 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     477 */
    210478EAPI Eina_Bool    ewk_frame_navigate(Evas_Object *o, int steps);
    211479
     480/**
     481 * Queries if it's possible to navigate backwards one item in the history.
     482 *
     483 * @param o frame object to query if backward navigation is possible
     484 *
     485 * @return @c EINA_TRUE if it's possible to navigate backwards one item in the history, @c EINA_FALSE otherwise
     486 *
     487 * @see ewk_frame_navigate_possible()
     488 */
    212489EAPI Eina_Bool    ewk_frame_back_possible(Evas_Object *o);
     490
     491/**
     492 * Queries if it's possible to navigate forwards one item in the history.
     493 *
     494 * @param o frame object to query if forward navigation is possible
     495 *
     496 * @return @c EINA_TRUE if it's possible to navigate forwards in the history, @c EINA_FALSE otherwise
     497 *
     498 * @see ewk_frame_navigate_possible()
     499 */
    213500EAPI Eina_Bool    ewk_frame_forward_possible(Evas_Object *o);
     501
     502/**
     503 * Queries if it's possible to navigate given @a steps in the history.
     504 *
     505 * @param o frame object to query if is possible to navigate @a steps in the history
     506 * @param steps positive value navigates that amount forwards, negative value
     507 *        does backwards
     508 *
     509 * @return @c EINA_TRUE if it's possible to navigate @a steps in the history, @c EINA_FALSE otherwise
     510 */
    214511EAPI Eina_Bool    ewk_frame_navigate_possible(Evas_Object *o, int steps);
    215512
     513/**
     514 * Gets the current zoom level used by this frame.
     515 *
     516 * @param o frame object to get zoom level
     517 *
     518 * @return zoom level for the frame or @c -1.0 on failure
     519 */
    216520EAPI float        ewk_frame_zoom_get(const Evas_Object *o);
     521
     522/**
     523 * Sets the current zoom level used by this frame.
     524 *
     525 * @param o frame object to change zoom level
     526 * @param zoom a new zoom level
     527 *
     528 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
     529 *
     530 * @see ewk_frame_zoom_text_only_set()
     531 */
    217532EAPI Eina_Bool    ewk_frame_zoom_set(Evas_Object *o, float zoom);
     533
     534/**
     535 * Queries if zoom level just applies to text only and not other elements.
     536 *
     537 * @param o frame to query zoom level for text only
     538 *
     539 * @return @c EINA_TRUE if zoom level is applied to text only, @c EINA_FALSE if not or on failure
     540 */
    218541EAPI Eina_Bool    ewk_frame_zoom_text_only_get(const Evas_Object *o);
     542
     543/**
     544 * Sets if zoom level just applies to text only and not other elements.
     545 *
     546 * @param o frame to apply zoom level for text only
     547 * @param setting @c EINA_TRUE if zoom level should be applied to text only, @c EINA_FALSE if not
     548 *
     549 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     550 */
    219551EAPI Eina_Bool    ewk_frame_zoom_text_only_set(Evas_Object *o, Eina_Bool setting);
    220552
     553/**
     554 * Frees hit test instance created by ewk_frame_hit_test_new().
     555 *
     556 * @param hit_test instance
     557 */
    221558EAPI void          ewk_frame_hit_test_free(Ewk_Hit_Test *hit_test);
     559
     560/**
     561 * Creates a new hit test for the given frame and point.
     562 *
     563 * The returned object should be freed by ewk_frame_hit_test_free().
     564 *
     565 * @param o frame object to do hit test on
     566 * @param x the horizontal position to query
     567 * @param y the vertical position to query
     568 *
     569 * @return a newly allocated hit test on success, @c 0 otherwise
     570 */
    222571EAPI Ewk_Hit_Test *ewk_frame_hit_test_new(const Evas_Object *o, int x, int y);
    223572
     573/**
     574 * Sets a relative scroll of the given frame.
     575 *
     576 * This function does scroll @a dx and @a dy pixels
     577 * from the current position of scroll.
     578 *
     579 * @param o frame object to scroll
     580 * @param dx horizontal offset to scroll
     581 * @param dy vertical offset to scroll
     582 *
     583 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     584 */
    224585EAPI Eina_Bool    ewk_frame_scroll_add(Evas_Object *o, int dx, int dy);
     586
     587/**
     588 * Sets an absolute scroll of the given frame.
     589 *
     590 * Both values are from zero to the contents size minus the viewport
     591 * size. See ewk_frame_scroll_size_get().
     592 *
     593 * @param o frame object to scroll
     594 * @param x horizontal position to scroll
     595 * @param y vertical position to scroll
     596 *
     597 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
     598 */
    225599EAPI Eina_Bool    ewk_frame_scroll_set(Evas_Object *o, int x, int y);
    226600
     601/**
     602 * Gets the possible scroll size of the given frame.
     603 *
     604 * Possible scroll size is contents size minus the viewport
     605 * size. It's the last allowed value for ewk_frame_scroll_set()
     606 *
     607 * @param o frame object to get scroll size
     608 * @param w the pointer to store the horizontal size that is possible to scroll,
     609 *        may be @c 0
     610 * @param h the pointer to store the vertical size that is possible to scroll,
     611 *        may be @c 0
     612 *
     613 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
     614 *         values are zeroed
     615 */
    227616EAPI Eina_Bool    ewk_frame_scroll_size_get(const Evas_Object *o, int *w, int *h);
     617
     618/**
     619 * Gets the current scroll position of given frame.
     620 *
     621 * @param o frame object to get the current scroll position
     622 * @param x the pointer to store the horizontal position, may be @c 0
     623 * @param y the pointer to store the vertical position. may be @c 0
     624 *
     625 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
     626 *         values are zeroed.
     627 */
    228628EAPI Eina_Bool    ewk_frame_scroll_pos_get(const Evas_Object *o, int *x, int *y);
    229629
     630/**
     631 * Gets the visible content geometry of the frame.
     632 *
     633 * @param o frame object to query visible content geometry
     634 * @param include_scrollbars whenever to include scrollbars size
     635 * @param x the pointer to store the horizontal position, may be @c 0
     636 * @param y the pointer to store the vertical position, may be @c 0
     637 * @param w the pointer to store width, may be @c 0
     638 * @param h the pointer to store height, may be @c 0
     639 *
     640 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
     641 *         values are zeroed
     642 */
    230643EAPI Eina_Bool    ewk_frame_visible_content_geometry_get(const Evas_Object *o, Eina_Bool include_scrollbars, int *x, int *y, int *w, int *h);
    231644
     645/**
     646 * Queries if the frame should be repainted completely.
     647 *
     648 * Function tells if dirty areas should be repainted
     649 * even if they are out of the screen.
     650 *
     651 * @param o frame object to query if the frame should be repainted completely
     652 *
     653 * @return @c EINA_TRUE if any dirty areas should be repainted, @c EINA_FALSE
     654 *         otherwise
     655 */
    232656EAPI Eina_Bool    ewk_frame_paint_full_get(const Evas_Object *o);
     657
     658/**
     659 * Sets if the frame should be repainted completely.
     660 *
     661 * Function sets if dirty areas should be repainted
     662 * even if they are out of the screen.
     663 *
     664 * @param o frame object to set if the frame should be repainted completely
     665 * @param flag @c EINA_TRUE to repaint the frame completely,
     666 *             @c EINA_FALSE if not
     667 */
    233668EAPI void         ewk_frame_paint_full_set(Evas_Object *o, Eina_Bool flag);
    234669
     670/**
     671 * Feeds the focus in event to the frame.
     672 *
     673 * @param o frame object to feed focus
     674 *
     675 * @return @c EINA_TRUE if the focus was handled, @c EINA_FALSE otherwise
     676 */
    235677EAPI Eina_Bool    ewk_frame_feed_focus_in(Evas_Object *o);
     678
     679/**
     680 * Feeds the focus out event to the frame.
     681 *
     682 * @param o frame object to remove focus
     683 *
     684 * @return @c EINA_FALSE since the feature is not implemented
     685 */
    236686EAPI Eina_Bool    ewk_frame_feed_focus_out(Evas_Object *o);
    237687
     688/**
     689 * Feeds the mouse wheel event to the frame.
     690 *
     691 * @param o frame object to feed the mouse wheel event
     692 * @param ev the mouse wheel event
     693 *
     694 * @return @c EINA_TRUE if the mouse wheel event was handled, @c EINA_FALSE otherwise
     695 */
    238696EAPI Eina_Bool    ewk_frame_feed_mouse_wheel(Evas_Object *o, const Evas_Event_Mouse_Wheel *ev);
     697
     698/**
     699 * Feeds the mouse down event to the frame.
     700 *
     701 * @param o frame object to feed the mouse down event
     702 * @param ev the mouse down event
     703 *
     704 * @return @c EINA_TRUE if the mouse down event was handled, @c EINA_FALSE otherwise
     705 */
    239706EAPI Eina_Bool    ewk_frame_feed_mouse_down(Evas_Object *o, const Evas_Event_Mouse_Down *ev);
     707
     708/**
     709 * Feeds the mouse up event to the frame.
     710 *
     711 * @param o frame object to feed the mouse up event
     712 * @param ev the mouse up event
     713 *
     714 * @return @c EINA_TRUE if the mouse up event was handled, @c EINA_FALSE otherwise
     715 */
    240716EAPI Eina_Bool    ewk_frame_feed_mouse_up(Evas_Object *o, const Evas_Event_Mouse_Up *ev);
     717
     718/**
     719 * Feeds the mouse move event to the frame.
     720 *
     721 * @param o frame object to feed the mouse move event
     722 * @param ev the mouse move event
     723 *
     724 * @return @c EINA_TRUE if the mouse move event was handled, @c EINA_FALSE otherwise
     725 */
    241726EAPI Eina_Bool    ewk_frame_feed_mouse_move(Evas_Object *o, const Evas_Event_Mouse_Move *ev);
     727
     728/**
     729 * Feeds the touch event to the frame.
     730 *
     731 * @param o frame object to feed touch event
     732 * @param action the action of touch event
     733 * @param points a list of points (Ewk_Touch_Point) to process
     734 * @param metaState DEPRECTAED, not supported for now
     735 *
     736 * @return @c EINA_TRUE if touch event was handled, @c EINA_FALSE otherwise
     737 */
    242738EAPI Eina_Bool    ewk_frame_feed_touch_event(Evas_Object *o, Ewk_Touch_Event_Type action, Eina_List *points, int metaState);
     739
     740/**
     741 * Feeds the keyboard key down event to the frame.
     742 *
     743 * @param o frame object to feed event
     744 * @param ev keyboard key down event
     745 *
     746 * @return @c EINA_TRUE if the key down event was handled, @c EINA_FALSE otherwise
     747 */
    243748EAPI Eina_Bool    ewk_frame_feed_key_down(Evas_Object *o, const Evas_Event_Key_Down *ev);
     749
     750/**
     751 * Feeds the keyboard key up event to the frame.
     752 *
     753 * @param o frame object to feed event
     754 * @param ev keyboard key up event
     755 *
     756 * @return @c EINA_TRUE if the key up event was handled, @c EINA_FALSE otherwise
     757 */
    244758EAPI Eina_Bool    ewk_frame_feed_key_up(Evas_Object *o, const Evas_Event_Key_Up *ev);
    245759
     760/**
     761 * Returns current text selection type.
     762 *
     763 * @param o a frame object to check selection type
     764 * @return current text selection type on success or no selection otherwise
     765 */
    246766EAPI Ewk_Text_Selection_Type ewk_frame_text_selection_type_get(Evas_Object *o);
    247767
  • trunk/Source/WebKit/efl/ewk/ewk_history.cpp

    r86480 r92473  
    111111}
    112112
    113 /**
    114  * Go forward in history one item, if possible.
    115  *
    116  * @param history which history instance to modify.
    117  *
    118  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
    119  */
    120113Eina_Bool ewk_history_forward(Ewk_History* history)
    121114{
     
    127120}
    128121
    129 /**
    130  * Go back in history one item, if possible.
    131  *
    132  * @param history which history instance to modify.
    133  *
    134  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
    135  */
    136122Eina_Bool ewk_history_back(Ewk_History* history)
    137123{
     
    143129}
    144130
    145 /**
    146  * Adds the given item to history.
    147  *
    148  * Memory handling: This will not modify or even take references to
    149  * given item (Ewk_History_Item), so you should still handle it with
    150  * ewk_history_item_free().
    151  *
    152  * @param history which history instance to modify.
    153  * @param item reference to add to history. Unmodified. Must @b not be @c NULL.
    154  *
    155  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
    156  */
    157131Eina_Bool ewk_history_history_item_add(Ewk_History* history, const Ewk_History_Item* item)
    158132{
     
    163137}
    164138
    165 /**
    166  * Sets the given item as current in history (go to item).
    167  *
    168  * Memory handling: This will not modify or even take references to
    169  * given item (Ewk_History_Item), so you should still handle it with
    170  * ewk_history_item_free().
    171  *
    172  * @param history which history instance to modify.
    173  * @param item reference to go to history. Unmodified. Must @b not be @c NULL.
    174  *
    175  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
    176  */
    177139Eina_Bool ewk_history_history_item_set(Ewk_History* history, const Ewk_History_Item* item)
    178140{
     
    183145}
    184146
    185 /**
    186  * Get the first item from back list, if any.
    187  *
    188  * @param history which history instance to query.
    189  *
    190  * @return the @b newly allocated item instance. This memory must be
    191  *         released with ewk_history_item_free() after use.
    192  */
    193147Ewk_History_Item* ewk_history_history_item_back_get(const Ewk_History* history)
    194148{
     
    197151}
    198152
    199 /**
    200  * Get the current item in history, if any.
    201  *
    202  * @param history which history instance to query.
    203  *
    204  * @return the @b newly allocated item instance. This memory must be
    205  *         released with ewk_history_item_free() after use.
    206  */
    207153Ewk_History_Item* ewk_history_history_item_current_get(const Ewk_History* history)
    208154{
     
    211157}
    212158
    213 /**
    214  * Get the first item from forward list, if any.
    215  *
    216  * @param history which history instance to query.
    217  *
    218  * @return the @b newly allocated item instance. This memory must be
    219  *         released with ewk_history_item_free() after use.
    220  */
    221159Ewk_History_Item* ewk_history_history_item_forward_get(const Ewk_History* history)
    222160{
     
    225163}
    226164
    227 /**
    228  * Get item at given position, if any at that index.
    229  *
    230  * @param history which history instance to query.
    231  * @param index position of item to get.
    232  *
    233  * @return the @b newly allocated item instance. This memory must be
    234  *         released with ewk_history_item_free() after use.
    235  */
    236165Ewk_History_Item* ewk_history_history_item_nth_get(const Ewk_History* history, int index)
    237166{
     
    240169}
    241170
    242 /**
    243  * Queries if given item is in history.
    244  *
    245  * Memory handling: This will not modify or even take references to
    246  * given item (Ewk_History_Item), so you should still handle it with
    247  * ewk_history_item_free().
    248  *
    249  * @param history which history instance to modify.
    250  * @param item reference to check in history. Must @b not be @c NULL.
    251  *
    252  * @return @c EINA_TRUE if in history, @c EINA_FALSE if not or failure.
    253  */
    254171Eina_Bool ewk_history_history_item_contains(const Ewk_History* history, const Ewk_History_Item* item)
    255172{
     
    259176}
    260177
    261 /**
    262  * Get the whole forward list.
    263  *
    264  * @param history which history instance to query.
    265  *
    266  * @return a newly allocated list of @b newly allocated item
    267  *         instance. This memory of each item must be released with
    268  *         ewk_history_item_free() after use. use
    269  *         ewk_history_item_list_free() for convenience.
    270  *
    271  * @see ewk_history_item_list_free()
    272  * @see ewk_history_forward_list_get_with_limit()
    273  */
    274178Eina_List* ewk_history_forward_list_get(const Ewk_History* history)
    275179{
     
    281185}
    282186
    283 /**
    284  * Get the forward list within the given limit.
    285  *
    286  * @param history which history instance to query.
    287  * @param limit the maximum number of items to return.
    288  *
    289  * @return a newly allocated list of @b newly allocated item
    290  *         instance. This memory of each item must be released with
    291  *         ewk_history_item_free() after use. use
    292  *         ewk_history_item_list_free() for convenience.
    293  *
    294  * @see ewk_history_item_list_free()
    295  * @see ewk_history_forward_list_length()
    296  * @see ewk_history_forward_list_get()
    297  */
    298187Eina_List* ewk_history_forward_list_get_with_limit(const Ewk_History* history, int limit)
    299188{
     
    304193}
    305194
    306 /**
    307  * Get the whole size of forward list.
    308  *
    309  * @param history which history instance to query.
    310  *
    311  * @return number of elements in whole list.
    312  *
    313  * @see ewk_history_forward_list_get_with_limit()
    314  */
    315195int ewk_history_forward_list_length(const Ewk_History* history)
    316196{
     
    319199}
    320200
    321 /**
    322  * Get the whole back list.
    323  *
    324  * @param history which history instance to query.
    325  *
    326  * @return a newly allocated list of @b newly allocated item
    327  *         instance. This memory of each item must be released with
    328  *         ewk_history_item_free() after use. use
    329  *         ewk_history_item_list_free() for convenience.
    330  *
    331  * @see ewk_history_item_list_free()
    332  * @see ewk_history_back_list_get_with_limit()
    333  */
    334201Eina_List* ewk_history_back_list_get(const Ewk_History* history)
    335202{
     
    341208}
    342209
    343 /**
    344  * Get the back list within the given limit.
    345  *
    346  * @param history which history instance to query.
    347  * @param limit the maximum number of items to return.
    348  *
    349  * @return a newly allocated list of @b newly allocated item
    350  *         instance. This memory of each item must be released with
    351  *         ewk_history_item_free() after use. use
    352  *         ewk_history_item_list_free() for convenience.
    353  *
    354  * @see ewk_history_item_list_free()
    355  * @see ewk_history_back_list_length()
    356  * @see ewk_history_back_list_get()
    357  */
    358210Eina_List* ewk_history_back_list_get_with_limit(const Ewk_History* history, int limit)
    359211{
     
    364216}
    365217
    366 /**
    367  * Get the whole size of back list.
    368  *
    369  * @param history which history instance to query.
    370  *
    371  * @return number of elements in whole list.
    372  *
    373  * @see ewk_history_back_list_get_with_limit()
    374  */
    375218int ewk_history_back_list_length(const Ewk_History* history)
    376219{
     
    379222}
    380223
    381 /**
    382  * Get maximum capacity of given history.
    383  *
    384  * @param history which history instance to query.
    385  *
    386  * @return maximum number of entries this history will hold.
    387  */
    388224int ewk_history_limit_get(Ewk_History* history)
    389225{
     
    392228}
    393229
    394 /**
    395  * Set maximum capacity of given history.
    396  *
    397  * @param history which history instance to modify.
    398  * @param limit maximum size to allow.
    399  *
    400  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
    401  */
    402230Eina_Bool ewk_history_limit_set(const Ewk_History* history, int limit)
    403231{
     
    407235}
    408236
    409 /**
    410  * Create a new history item with given URI and title.
    411  *
    412  * @param uri where this resource is located.
    413  * @param title resource title.
    414  *
    415  * @return newly allocated history item or @c NULL on errors. You must
    416  *         free this item with ewk_history_item_free().
    417  */
    418237Ewk_History_Item* ewk_history_item_new(const char* uri, const char* title)
    419238{
     
    431250}
    432251
    433 /**
    434  * Free given history item instance.
    435  *
    436  * @param item what to free.
    437  */
    438252void ewk_history_item_free(Ewk_History_Item* item)
    439253{
     
    442256}
    443257
    444 /**
    445  * Free given list and associated history items instances.
    446  *
    447  * @param history_items list of items to free (both list nodes and
    448  *        item instances).
    449  */
    450258void ewk_history_item_list_free(Eina_List* history_items)
    451259{
     
    457265}
    458266
    459 /**
    460  * Query title for given history item.
    461  *
    462  * @param item history item to query.
    463  *
    464  * @return the title pointer, that may be @c NULL. This pointer is
    465  *         guaranteed to be eina_stringshare, so whenever possible
    466  *         save yourself some cpu cycles and use
    467  *         eina_stringshare_ref() instead of eina_stringshare_add() or
    468  *         strdup().
    469  */
    470267const char* ewk_history_item_title_get(const Ewk_History_Item* item)
    471268{
     
    477274}
    478275
    479 /**
    480  * Query alternate title for given history item.
    481  *
    482  * @param item history item to query.
    483  *
    484  * @return the alternate title pointer, that may be @c NULL. This
    485  *         pointer is guaranteed to be eina_stringshare, so whenever
    486  *         possible save yourself some cpu cycles and use
    487  *         eina_stringshare_ref() instead of eina_stringshare_add() or
    488  *         strdup().
    489  */
    490276const char* ewk_history_item_title_alternate_get(const Ewk_History_Item* item)
    491277{
     
    498284}
    499285
    500 /**
    501  * Set alternate title for given history item.
    502  *
    503  * @param item history item to query.
    504  * @param title new alternate title to use for given item. No
    505  *        references are kept after this function returns.
    506  */
    507286void ewk_history_item_title_alternate_set(Ewk_History_Item* item, const char* title)
    508287{
     
    513292}
    514293
    515 /**
    516  * Query URI for given history item.
    517  *
    518  * @param item history item to query.
    519  *
    520  * @return the URI pointer, that may be @c NULL. This pointer is
    521  *         guaranteed to be eina_stringshare, so whenever possible
    522  *         save yourself some cpu cycles and use
    523  *         eina_stringshare_ref() instead of eina_stringshare_add() or
    524  *         strdup().
    525  */
    526294const char* ewk_history_item_uri_get(const Ewk_History_Item* item)
    527295{
     
    533301}
    534302
    535 /**
    536  * Query original URI for given history item.
    537  *
    538  * @param item history item to query.
    539  *
    540  * @return the original URI pointer, that may be @c NULL. This pointer
    541  *         is guaranteed to be eina_stringshare, so whenever possible
    542  *         save yourself some cpu cycles and use
    543  *         eina_stringshare_ref() instead of eina_stringshare_add() or
    544  *         strdup().
    545  */
    546303const char* ewk_history_item_uri_original_get(const Ewk_History_Item* item)
    547304{
     
    554311}
    555312
    556 /**
    557  * Query last visited time for given history item.
    558  *
    559  * @param item history item to query.
    560  *
    561  * @return the time in seconds this item was visited.
    562  */
    563313double ewk_history_item_time_last_visited_get(const Ewk_History_Item* item)
    564314{
     
    567317}
    568318
    569 /**
    570  * Get the icon (aka favicon) associated with this history item.
    571  *
    572  * @note in order to have this working, one must open icon database
    573  *       with ewk_settings_icon_database_path_set().
    574  *
    575  * @param item history item to query.
    576  *
    577  * @return the surface reference or @c NULL on errors. Note that the
    578  *         reference may be to a standard fallback icon.
    579  */
    580319cairo_surface_t* ewk_history_item_icon_surface_get(const Ewk_History_Item* item)
    581320{
     
    590329}
    591330
    592 /**
    593  * Add an Evas_Object of type 'image' to given canvas with history item icon.
    594  *
    595  * This is an utility function that creates an Evas_Object of type
    596  * image set to have fill always match object size
    597  * (evas_object_image_filled_add()), saving some code to use it from Evas.
    598  *
    599  * @note in order to have this working, one must open icon database
    600  *       with ewk_settings_icon_database_path_set().
    601  *
    602  * @param item history item to query.
    603  * @param canvas evas instance where to add resulting object.
    604  *
    605  * @return newly allocated Evas_Object instance or @c NULL on
    606  *         errors. Delete the object with evas_object_del().
    607  */
    608331Evas_Object* ewk_history_item_icon_object_add(const Ewk_History_Item* item, Evas* canvas)
    609332{
     
    622345}
    623346
    624 /**
    625  * Query if given item is still in page cache.
    626  *
    627  * @param item history item to query.
    628  *
    629  * @return @c EINA_TRUE if in cache, @c EINA_FALSE otherwise.
    630  */
    631347Eina_Bool ewk_history_item_page_cache_exists(const Ewk_History_Item* item)
    632348{
     
    635351}
    636352
    637 /**
    638  * Query number of times item was visited.
    639  *
    640  * @param item history item to query.
    641  *
    642  * @return number of visits.
    643  */
    644353int ewk_history_item_visit_count(const Ewk_History_Item* item)
    645354{
     
    648357}
    649358
    650 /**
    651  * Query if last visit to item was failure or not.
    652  *
    653  * @param item history item to query.
    654  *
    655  * @return @c EINA_TRUE if last visit was failure, @c EINA_FALSE if it
    656  *         was fine.
    657  */
    658359Eina_Bool ewk_history_item_visit_last_failed(const Ewk_History_Item* item)
    659360{
  • trunk/Source/WebKit/efl/ewk/ewk_history.h

    r84771 r92473  
    5050
    5151
     52/**
     53 * Go forward in history one item, if possible.
     54 *
     55 * @param history which history instance to modify.
     56 *
     57 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
     58 */
    5259EAPI Eina_Bool         ewk_history_forward(Ewk_History *history);
     60
     61/**
     62 * Go back in history one item, if possible.
     63 *
     64 * @param history which history instance to modify.
     65 *
     66 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
     67 */
    5368EAPI Eina_Bool         ewk_history_back(Ewk_History *history);
    5469
     70/**
     71 * Adds the given item to history.
     72 *
     73 * Memory handling: This will not modify or even take references to
     74 * given item (Ewk_History_Item), so you should still handle it with
     75 * ewk_history_item_free().
     76 *
     77 * @param history which history instance to modify.
     78 * @param item reference to add to history. Unmodified. Must @b not be @c NULL.
     79 *
     80 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
     81 */
    5582EAPI Eina_Bool         ewk_history_history_item_add(Ewk_History *history, const Ewk_History_Item *item);
     83
     84/**
     85 * Sets the given item as current in history (go to item).
     86 *
     87 * Memory handling: This will not modify or even take references to
     88 * given item (Ewk_History_Item), so you should still handle it with
     89 * ewk_history_item_free().
     90 *
     91 * @param history which history instance to modify.
     92 * @param item reference to go to history. Unmodified. Must @b not be @c NULL.
     93 *
     94 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
     95 */
    5696EAPI Eina_Bool         ewk_history_history_item_set(Ewk_History *history,  const Ewk_History_Item *item);
     97
     98/**
     99 * Get the first item from back list, if any.
     100 *
     101 * @param history which history instance to query.
     102 *
     103 * @return the @b newly allocated item instance. This memory must be
     104 *         released with ewk_history_item_free() after use.
     105 */
    57106EAPI Ewk_History_Item *ewk_history_history_item_back_get(const Ewk_History *history);
     107
     108/**
     109 * Get the current item in history, if any.
     110 *
     111 * @param history which history instance to query.
     112 *
     113 * @return the @b newly allocated item instance. This memory must be
     114 *         released with ewk_history_item_free() after use.
     115 */
    58116EAPI Ewk_History_Item *ewk_history_history_item_current_get(const Ewk_History *history);
     117
     118/**
     119 * Get the first item from forward list, if any.
     120 *
     121 * @param history which history instance to query.
     122 *
     123 * @return the @b newly allocated item instance. This memory must be
     124 *         released with ewk_history_item_free() after use.
     125 */
    59126EAPI Ewk_History_Item *ewk_history_history_item_forward_get(const Ewk_History *history);
     127
     128/**
     129 * Get item at given position, if any at that index.
     130 *
     131 * @param history which history instance to query.
     132 * @param index position of item to get.
     133 *
     134 * @return the @b newly allocated item instance. This memory must be
     135 *         released with ewk_history_item_free() after use.
     136 */
    60137EAPI Ewk_History_Item *ewk_history_history_item_nth_get(const Ewk_History *history, int index);
     138
     139/**
     140 * Queries if given item is in history.
     141 *
     142 * Memory handling: This will not modify or even take references to
     143 * given item (Ewk_History_Item), so you should still handle it with
     144 * ewk_history_item_free().
     145 *
     146 * @param history which history instance to modify.
     147 * @param item reference to check in history. Must @b not be @c NULL.
     148 *
     149 * @return @c EINA_TRUE if in history, @c EINA_FALSE if not or failure.
     150 */
    61151EAPI Eina_Bool         ewk_history_history_item_contains(const Ewk_History *history, const Ewk_History_Item *item);
    62152
     153/**
     154 * Get the whole forward list.
     155 *
     156 * @param history which history instance to query.
     157 *
     158 * @return a newly allocated list of @b newly allocated item
     159 *         instance. This memory of each item must be released with
     160 *         ewk_history_item_free() after use. use
     161 *         ewk_history_item_list_free() for convenience.
     162 *
     163 * @see ewk_history_item_list_free()
     164 * @see ewk_history_forward_list_get_with_limit()
     165 */
    63166EAPI Eina_List        *ewk_history_forward_list_get(const Ewk_History *history);
     167
     168/**
     169 * Get the forward list within the given limit.
     170 *
     171 * @param history which history instance to query.
     172 * @param limit the maximum number of items to return.
     173 *
     174 * @return a newly allocated list of @b newly allocated item
     175 *         instance. This memory of each item must be released with
     176 *         ewk_history_item_free() after use. use
     177 *         ewk_history_item_list_free() for convenience.
     178 *
     179 * @see ewk_history_item_list_free()
     180 * @see ewk_history_forward_list_length()
     181 * @see ewk_history_forward_list_get()
     182 */
    64183EAPI Eina_List        *ewk_history_forward_list_get_with_limit(const Ewk_History *history, int limit);
     184
     185/**
     186 * Get the whole size of forward list.
     187 *
     188 * @param history which history instance to query.
     189 *
     190 * @return number of elements in whole list.
     191 *
     192 * @see ewk_history_forward_list_get_with_limit()
     193 */
    65194EAPI int               ewk_history_forward_list_length(const Ewk_History *history);
    66195
     196/**
     197 * Get the whole back list.
     198 *
     199 * @param history which history instance to query.
     200 *
     201 * @return a newly allocated list of @b newly allocated item
     202 *         instance. This memory of each item must be released with
     203 *         ewk_history_item_free() after use. use
     204 *         ewk_history_item_list_free() for convenience.
     205 *
     206 * @see ewk_history_item_list_free()
     207 * @see ewk_history_back_list_get_with_limit()
     208 */
    67209EAPI Eina_List        *ewk_history_back_list_get(const Ewk_History *history);
     210
     211/**
     212 * Get the back list within the given limit.
     213 *
     214 * @param history which history instance to query.
     215 * @param limit the maximum number of items to return.
     216 *
     217 * @return a newly allocated list of @b newly allocated item
     218 *         instance. This memory of each item must be released with
     219 *         ewk_history_item_free() after use. use
     220 *         ewk_history_item_list_free() for convenience.
     221 *
     222 * @see ewk_history_item_list_free()
     223 * @see ewk_history_back_list_length()
     224 * @see ewk_history_back_list_get()
     225 */
    68226EAPI Eina_List        *ewk_history_back_list_get_with_limit(const Ewk_History *history, int limit);
     227
     228/**
     229 * Get the whole size of back list.
     230 *
     231 * @param history which history instance to query.
     232 *
     233 * @return number of elements in whole list.
     234 *
     235 * @see ewk_history_back_list_get_with_limit()
     236 */
    69237EAPI int               ewk_history_back_list_length(const Ewk_History *history);
    70238
     239/**
     240 * Get maximum capacity of given history.
     241 *
     242 * @param history which history instance to query.
     243 *
     244 * @return maximum number of entries this history will hold.
     245 */
    71246EAPI int               ewk_history_limit_get(Ewk_History *history);
     247
     248/**
     249 * Set maximum capacity of given history.
     250 *
     251 * @param history which history instance to modify.
     252 * @param limit maximum size to allow.
     253 *
     254 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
     255 */
    72256EAPI Eina_Bool         ewk_history_limit_set(const Ewk_History *history, int limit);
    73257
     258/**
     259 * Create a new history item with given URI and title.
     260 *
     261 * @param uri where this resource is located.
     262 * @param title resource title.
     263 *
     264 * @return newly allocated history item or @c NULL on errors. You must
     265 *         free this item with ewk_history_item_free().
     266 */
    74267EAPI Ewk_History_Item *ewk_history_item_new(const char *uri, const char *title);
     268
     269/**
     270 * Free given history item instance.
     271 *
     272 * @param item what to free.
     273 */
    75274EAPI void              ewk_history_item_free(Ewk_History_Item *item);
     275
     276/**
     277 * Free given list and associated history items instances.
     278 *
     279 * @param history_items list of items to free (both list nodes and
     280 *        item instances).
     281 */
    76282EAPI void              ewk_history_item_list_free(Eina_List *history_items);
    77283
     284/**
     285 * Query title for given history item.
     286 *
     287 * @param item history item to query.
     288 *
     289 * @return the title pointer, that may be @c NULL. This pointer is
     290 *         guaranteed to be eina_stringshare, so whenever possible
     291 *         save yourself some cpu cycles and use
     292 *         eina_stringshare_ref() instead of eina_stringshare_add() or
     293 *         strdup().
     294 */
    78295EAPI const char       *ewk_history_item_title_get(const Ewk_History_Item *item);
     296
     297/**
     298 * Query alternate title for given history item.
     299 *
     300 * @param item history item to query.
     301 *
     302 * @return the alternate title pointer, that may be @c NULL. This
     303 *         pointer is guaranteed to be eina_stringshare, so whenever
     304 *         possible save yourself some cpu cycles and use
     305 *         eina_stringshare_ref() instead of eina_stringshare_add() or
     306 *         strdup().
     307 */
    79308EAPI const char       *ewk_history_item_title_alternate_get(const Ewk_History_Item *item);
     309
     310/**
     311 * Set alternate title for given history item.
     312 *
     313 * @param item history item to query.
     314 * @param title new alternate title to use for given item. No
     315 *        references are kept after this function returns.
     316 */
    80317EAPI void              ewk_history_item_title_alternate_set(Ewk_History_Item *item, const char *title);
     318
     319/**
     320 * Query URI for given history item.
     321 *
     322 * @param item history item to query.
     323 *
     324 * @return the URI pointer, that may be @c NULL. This pointer is
     325 *         guaranteed to be eina_stringshare, so whenever possible
     326 *         save yourself some cpu cycles and use
     327 *         eina_stringshare_ref() instead of eina_stringshare_add() or
     328 *         strdup().
     329 */
    81330EAPI const char       *ewk_history_item_uri_get(const Ewk_History_Item *item);
     331
     332/**
     333 * Query original URI for given history item.
     334 *
     335 * @param item history item to query.
     336 *
     337 * @return the original URI pointer, that may be @c NULL. This pointer
     338 *         is guaranteed to be eina_stringshare, so whenever possible
     339 *         save yourself some cpu cycles and use
     340 *         eina_stringshare_ref() instead of eina_stringshare_add() or
     341 *         strdup().
     342 */
    82343EAPI const char       *ewk_history_item_uri_original_get(const Ewk_History_Item *item);
     344
     345/**
     346 * Query last visited time for given history item.
     347 *
     348 * @param item history item to query.
     349 *
     350 * @return the time in seconds this item was visited.
     351 */
    83352EAPI double            ewk_history_item_time_last_visited_get(const Ewk_History_Item *item);
    84353
     354/**
     355 * Get the icon (aka favicon) associated with this history item.
     356 *
     357 * @note in order to have this working, one must open icon database
     358 *       with ewk_settings_icon_database_path_set().
     359 *
     360 * @param item history item to query.
     361 *
     362 * @return the surface reference or @c NULL on errors. Note that the
     363 *         reference may be to a standard fallback icon.
     364 */
    85365EAPI cairo_surface_t  *ewk_history_item_icon_surface_get(const Ewk_History_Item *item);
     366
     367/**
     368 * Add an Evas_Object of type 'image' to given canvas with history item icon.
     369 *
     370 * This is an utility function that creates an Evas_Object of type
     371 * image set to have fill always match object size
     372 * (evas_object_image_filled_add()), saving some code to use it from Evas.
     373 *
     374 * @note in order to have this working, one must open icon database
     375 *       with ewk_settings_icon_database_path_set().
     376 *
     377 * @param item history item to query.
     378 * @param canvas evas instance where to add resulting object.
     379 *
     380 * @return newly allocated Evas_Object instance or @c NULL on
     381 *         errors. Delete the object with evas_object_del().
     382 */
    86383EAPI Evas_Object      *ewk_history_item_icon_object_add(const Ewk_History_Item *item, Evas *canvas);
    87384
     385/**
     386 * Query if given item is still in page cache.
     387 *
     388 * @param item history item to query.
     389 *
     390 * @return @c EINA_TRUE if in cache, @c EINA_FALSE otherwise.
     391 */
    88392EAPI Eina_Bool         ewk_history_item_page_cache_exists(const Ewk_History_Item *item);
     393
     394/**
     395 * Query number of times item was visited.
     396 *
     397 * @param item history item to query.
     398 *
     399 * @return number of visits.
     400 */
    89401EAPI int               ewk_history_item_visit_count(const Ewk_History_Item *item);
     402
     403/**
     404 * Query if last visit to item was failure or not.
     405 *
     406 * @param item history item to query.
     407 *
     408 * @return @c EINA_TRUE if last visit was failure, @c EINA_FALSE if it
     409 *         was fine.
     410 */
    90411EAPI Eina_Bool         ewk_history_item_visit_last_failed(const Ewk_History_Item *item);
    91412
  • trunk/Source/WebKit/efl/ewk/ewk_main.cpp

    r91972 r92473  
    6868static Eina_Bool _ewk_init_body(void);
    6969
    70 /**
    71  * Initializes webkit's instance.
    72  *
    73  * - initializes components needed by Efl,
    74  * - sets web database location,
    75  * - sets page cache capacity,
    76  * - increases a reference count of webkit's instance.
    77  *
    78  * @return a reference count of webkit's instance on success or 0 on failure
    79  */
    8070int ewk_init(void)
    8171{
     
    134124}
    135125
    136 /**
    137  * Decreases a reference count of webkit's instance, possibly destroying it.
    138  *
    139  * If the reference count reaches 0 webkit's instance is destroyed.
    140  *
    141  * @return a reference count of webkit's instance
    142  */
    143126int ewk_shutdown(void)
    144127{
  • trunk/Source/WebKit/efl/ewk/ewk_main.h

    r84771 r92473  
    3333#endif
    3434
     35/**
     36 * Initializes webkit's instance.
     37 *
     38 * - initializes components needed by Efl,
     39 * - sets web database location,
     40 * - sets page cache capacity,
     41 * - increases a reference count of webkit's instance.
     42 *
     43 * @return a reference count of webkit's instance on success or 0 on failure
     44 */
    3545EAPI int ewk_init(void);
     46
     47/**
     48 * Decreases a reference count of webkit's instance, possibly destroying it.
     49 *
     50 * If the reference count reaches 0 webkit's instance is destroyed.
     51 *
     52 * @return a reference count of webkit's instance
     53 */
    3654EAPI int ewk_shutdown(void);
    3755
  • trunk/Source/WebKit/efl/ewk/ewk_network.cpp

    r91972 r92473  
    3131#endif
    3232
    33 /**
    34  * Sets the given proxy URI to network backend.
    35  *
    36  * @param proxy URI to set.
    37  */
    3833void ewk_network_proxy_uri_set(const char *proxy)
    3934{
     
    5752}
    5853
    59 /**
    60  * Gets the proxy URI from the network backend.
    61  *
    62  * The returned string should be freed by eina_stringshare_del() after use.
    63  *
    64  * @return current proxy URI or @c 0 if it's not set.
    65  */
    6654const char *ewk_network_proxy_uri_get(void)
    6755{
     
    8371}
    8472
    85 /**
    86  * Sets if network backend is online or not.
    87  *
    88  * @param online @c EINA_FALSE if network is disconnected.
    89  */
    9073void ewk_network_state_notifier_online_set(Eina_Bool online)
    9174{
  • trunk/Source/WebKit/efl/ewk/ewk_network.h

    r91972 r92473  
    3232#endif
    3333
     34/**
     35 * Sets the given proxy URI to network backend.
     36 *
     37 * @param proxy URI to set
     38 */
    3439EAPI void             ewk_network_proxy_uri_set(const char *proxy);
     40
     41/**
     42 * Gets the proxy URI from the network backend.
     43 *
     44 * The returned string should be freed by eina_stringshare_del() after use.
     45 *
     46 * @return current proxy URI or @c 0 if it's not set
     47 */
    3548EAPI const char      *ewk_network_proxy_uri_get(void);
    3649
     50/**
     51 * Sets if network backend is online or not.
     52 *
     53 * @param online @c EINA_FALSE if network is disconnected
     54 */
    3755EAPI void             ewk_network_state_notifier_online_set(Eina_Bool online);
    3856
  • trunk/Source/WebKit/efl/ewk/ewk_settings.cpp

    r91972 r92473  
    8181}
    8282
    83 /**
    84  * Returns the default quota for Web Database databases. By default
    85  * this value is 1MB.
    86  *
    87  * @return the current default database quota in bytes
    88  */
    8983uint64_t ewk_settings_web_database_default_quota_get(void)
    9084{
     
    9690}
    9791
    98 /**
    99  * Sets the current path to the directory WebKit will write Web
    100  * Database databases.
    101  *
    102  * @param path the new database directory path
    103  */
    10492void ewk_settings_web_database_path_set(const char *path)
    10593{
     
    115103}
    116104
    117 /**
    118  * Returns directory path where web database is stored.
    119  *
    120  * This is guaranteed to be eina_stringshare, so whenever possible
    121  * save yourself some cpu cycles and use eina_stringshare_ref()
    122  * instead of eina_stringshare_add() or strdup().
    123  *
    124  * @return database path or @c 0 if none or web database is not supported
    125  */
    126105const char *ewk_settings_web_database_path_get(void)
    127106{
     
    133112}
    134113
    135 /**
    136  * Sets directory where to store icon database, opening or closing database.
    137  *
    138  * Icon database must be opened only once. If you try to set a path when the icon
    139  * database is already open, this function returns @c EINA_FALSE.
    140  *
    141  * @param directory where to store icon database, must be
    142  *        write-able, if @c 0 is given, then database is closed
    143  *
    144  * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
    145  */
    146114Eina_Bool ewk_settings_icon_database_path_set(const char *directory)
    147115{
     
    189157}
    190158
    191 /**
    192  * Returns directory path where icon database is stored.
    193  *
    194  * This is guaranteed to be eina_stringshare, so whenever possible
    195  * save yourself some cpu cycles and use eina_stringshare_ref()
    196  * instead of eina_stringshare_add() or strdup().
    197  *
    198  * @return database path or @c 0 if none is set or database is closed
    199  */
    200159const char *ewk_settings_icon_database_path_get(void)
    201160{
     
    208167}
    209168
    210 /**
    211  * Removes all known icons from database.
    212  *
    213  * Database must be opened with ewk_settings_icon_database_path_set()
    214  * in order to work.
    215  *
    216  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise, like
    217  *         closed database.
    218  */
    219169Eina_Bool ewk_settings_icon_database_clear(void)
    220170{
     
    228178}
    229179
    230 /**
    231  * Queries icon for given URL, returning associated cairo surface.
    232  *
    233  * @note In order to have this working, one must open icon database
    234  *       with ewk_settings_icon_database_path_set().
    235  *
    236  * @param url which url to query icon
    237  *
    238  * @return cairo surface if any, or @c 0 on failure
    239  */
    240180cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url)
    241181{
     
    253193}
    254194
    255 /**
    256  * Creates Evas_Object of type image representing the given URL.
    257  *
    258  * This is an utility function that creates an Evas_Object of type
    259  * image set to have fill always match object size
    260  * (evas_object_image_filled_add()), saving some code to use it from Evas.
    261  *
    262  * @note In order to have this working, one must open icon database
    263  *       with ewk_settings_icon_database_path_set().
    264  *
    265  * @param url which url to query icon
    266  * @param canvas evas instance where to add resulting object
    267  *
    268  * @return newly allocated Evas_Object instance or @c 0 on
    269  *         errors. Delete the object with evas_object_del().
    270  */
    271195Evas_Object *ewk_settings_icon_database_icon_object_add(const char *url, Evas *canvas)
    272196{
     
    287211}
    288212
    289 /**
    290  * Gets status of the memory cache of WebCore.
    291  *
    292  * @return @c EINA_TRUE if the cache is enabled or @c EINA_FALSE if not
    293  */
    294213Eina_Bool ewk_settings_cache_enable_get(void)
    295214{
     
    298217}
    299218
    300 /**
    301  * Enables/disables the memory cache of WebCore, possibly clearing it.
    302  *
    303  * Disabling the cache will remove all resources from the cache.
    304  * They may still live on if they are referenced by some Web page though.
    305  *
    306  * @param set @c EINA_TRUE to enable memory cache, @c EINA_FALSE to disable
    307  */
    308219void ewk_settings_cache_enable_set(Eina_Bool set)
    309220{
     
    314225}
    315226
    316 /**
    317  * Sets capacity of memory cache of WebCore.
    318  *
    319  * WebCore sets default value of memory cache on 8192 * 1024 bytes.
    320  *
    321  * @param capacity the maximum number of bytes that the cache should consume overall
    322  */
    323227void ewk_settings_cache_capacity_set(unsigned capacity)
    324228{
     
    327231}
    328232
    329 /**
    330  * Sets values for repaint throttling.
    331  *
    332  * It allows to slow down page loading and
    333  * should ensure displaying a content with many css/gif animations.
    334  *
    335  * These values can be used as a example for repaints throttling.
    336  * 0,     0,   0,    0    - default WebCore's values, these do not delay any repaints
    337  * 0.025, 0,   2.5,  0.5  - recommended values for dynamic content
    338  * 0.01,  0,   1,    0.2  - minimal level
    339  * 0.025, 1,   5,    0.5  - medium level
    340  * 0.1,   2,   10,   1    - heavy level
    341  *
    342  * @param deferred_repaint_delay a normal delay
    343  * @param initial_deferred_repaint_delay_during_loading negative value would mean that first few repaints happen without a delay
    344  * @param max_deferred_repaint_delay_during_loading the delay grows on each repaint to this maximum value
    345  * @param deferred_repaint_delay_increment_during_loading on each repaint the delay increses by this amount
    346  */
    347233void ewk_settings_repaint_throttling_set(double deferred_repaint_delay, double initial_deferred_repaint_delay_during_loading, double max_deferred_repaint_delay_during_loading, double deferred_repaint_delay_increment_during_loading)
    348234{
     
    368254}
    369255
    370 /**
    371  * Sets cache directory.
    372  *
    373  * @param path where to store cache, must be write-able.
    374  *
    375  * @return @c EINA_TRUE on success, @c EINA_FALSE if path is NULL or offline
    376  *         web application is not supported.
    377  */
    378256Eina_Bool ewk_settings_cache_directory_path_set(const char *path)
    379257{
     
    393271}
    394272
    395 /**
    396  * Return cache directory path.
    397  *
    398  * This is guaranteed to be eina_stringshare, so whenever possible
    399  * save yourself some cpu cycles and use eina_stringshare_ref()
    400  * instead of eina_stringshare_add() or strdup().
    401  *
    402  * @return cache directory path.
    403  */
    404273const char *ewk_settings_cache_directory_path_get()
    405274{
  • trunk/Source/WebKit/efl/ewk/ewk_settings.h

    r91255 r92473  
    3636 */
    3737
     38/**
     39 * Returns the default quota for Web Database databases. By default
     40 * this value is 1MB.
     41 *
     42 * @return the current default database quota in bytes
     43 */
    3844EAPI uint64_t         ewk_settings_web_database_default_quota_get(void);
     45
     46/**
     47 * Sets the current path to the directory WebKit will write Web
     48 * Database databases.
     49 *
     50 * @param path the new database directory path
     51 */
    3952EAPI void             ewk_settings_web_database_path_set(const char *path);
     53
     54/**
     55 * Returns directory path where web database is stored.
     56 *
     57 * This is guaranteed to be eina_stringshare, so whenever possible
     58 * save yourself some cpu cycles and use eina_stringshare_ref()
     59 * instead of eina_stringshare_add() or strdup().
     60 *
     61 * @return database path or @c 0 if none or web database is not supported
     62 */
    4063EAPI const char      *ewk_settings_web_database_path_get(void);
    4164
     65/**
     66 * Sets directory where to store icon database, opening or closing database.
     67 *
     68 * Icon database must be opened only once. If you try to set a path when the icon
     69 * database is already open, this function returns @c EINA_FALSE.
     70 *
     71 * @param directory where to store icon database, must be
     72 *        write-able, if @c 0 is given, then database is closed
     73 *
     74 * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
     75 */
    4276EAPI Eina_Bool        ewk_settings_icon_database_path_set(const char *path);
     77
     78/**
     79 * Returns directory path where icon database is stored.
     80 *
     81 * This is guaranteed to be eina_stringshare, so whenever possible
     82 * save yourself some cpu cycles and use eina_stringshare_ref()
     83 * instead of eina_stringshare_add() or strdup().
     84 *
     85 * @return database path or @c 0 if none is set or database is closed
     86 */
    4387EAPI const char      *ewk_settings_icon_database_path_get(void);
     88
     89/**
     90 * Removes all known icons from database.
     91 *
     92 * Database must be opened with ewk_settings_icon_database_path_set()
     93 * in order to work.
     94 *
     95 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise, like
     96 *         closed database.
     97 */
    4498EAPI Eina_Bool        ewk_settings_icon_database_clear(void);
    4599
     100/**
     101 * Queries icon for given URL, returning associated cairo surface.
     102 *
     103 * @note In order to have this working, one must open icon database
     104 *       with ewk_settings_icon_database_path_set().
     105 *
     106 * @param url which url to query icon
     107 *
     108 * @return cairo surface if any, or @c 0 on failure
     109 */
    46110EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url);
     111
     112/**
     113 * Creates Evas_Object of type image representing the given URL.
     114 *
     115 * This is an utility function that creates an Evas_Object of type
     116 * image set to have fill always match object size
     117 * (evas_object_image_filled_add()), saving some code to use it from Evas.
     118 *
     119 * @note In order to have this working, one must open icon database
     120 *       with ewk_settings_icon_database_path_set().
     121 *
     122 * @param url which url to query icon
     123 * @param canvas evas instance where to add resulting object
     124 *
     125 * @return newly allocated Evas_Object instance or @c 0 on
     126 *         errors. Delete the object with evas_object_del().
     127 */
    47128EAPI Evas_Object     *ewk_settings_icon_database_icon_object_add(const char *url, Evas *canvas);
    48129
     130/**
     131 * Sets cache directory.
     132 *
     133 * @param path where to store cache, must be write-able.
     134 *
     135 * @return @c EINA_TRUE on success, @c EINA_FALSE if path is NULL or offline
     136 *         web application is not supported.
     137 */
    49138EAPI Eina_Bool        ewk_settings_cache_directory_path_set(const char *path);
     139
     140/**
     141 * Return cache directory path.
     142 *
     143 * This is guaranteed to be eina_stringshare, so whenever possible
     144 * save yourself some cpu cycles and use eina_stringshare_ref()
     145 * instead of eina_stringshare_add() or strdup().
     146 *
     147 * @return cache directory path.
     148 */
    50149EAPI const char      *ewk_settings_cache_directory_path_get(void);
    51150
     151/**
     152 * Gets status of the memory cache of WebCore.
     153 *
     154 * @return @c EINA_TRUE if the cache is enabled or @c EINA_FALSE if not
     155 */
    52156EAPI Eina_Bool        ewk_settings_cache_enable_get(void);
     157
     158/**
     159 * Enables/disables the memory cache of WebCore, possibly clearing it.
     160 *
     161 * Disabling the cache will remove all resources from the cache.
     162 * They may still live on if they are referenced by some Web page though.
     163 *
     164 * @param set @c EINA_TRUE to enable memory cache, @c EINA_FALSE to disable
     165 */
    53166EAPI void             ewk_settings_cache_enable_set(Eina_Bool set);
     167
     168/**
     169 * Sets capacity of memory cache of WebCore.
     170 *
     171 * WebCore sets default value of memory cache on 8192 * 1024 bytes.
     172 *
     173 * @param capacity the maximum number of bytes that the cache should consume overall
     174 */
    54175EAPI void             ewk_settings_cache_capacity_set(unsigned capacity);
    55176
     177/**
     178 * Sets values for repaint throttling.
     179 *
     180 * It allows to slow down page loading and
     181 * should ensure displaying a content with many css/gif animations.
     182 *
     183 * These values can be used as a example for repaints throttling.
     184 * 0,     0,   0,    0    - default WebCore's values, these do not delay any repaints
     185 * 0.025, 0,   2.5,  0.5  - recommended values for dynamic content
     186 * 0.01,  0,   1,    0.2  - minimal level
     187 * 0.025, 1,   5,    0.5  - medium level
     188 * 0.1,   2,   10,   1    - heavy level
     189 *
     190 * @param deferred_repaint_delay a normal delay
     191 * @param initial_deferred_repaint_delay_during_loading negative value would mean that first few repaints happen without a delay
     192 * @param max_deferred_repaint_delay_during_loading the delay grows on each repaint to this maximum value
     193 * @param deferred_repaint_delay_increment_during_loading on each repaint the delay increses by this amount
     194 */
    56195EAPI void             ewk_settings_repaint_throttling_set(double deferred_repaint_delay, double initial_deferred_repaint_delay_during_loading, double max_deferred_repaint_delay_during_loading, double deferred_repaint_delay_increment_during_loading);
    57196
  • trunk/Source/WebKit/efl/ewk/ewk_window_features.cpp

    r91972 r92473  
    3636};
    3737
    38 /**
    39  * Decreases the referece count of an Ewk_Window_Features, possibly freeing it.
    40  *
    41  * When the reference count of the object reaches 0, the one is freed.
    42  *
    43  * @param window_features the object to decrease reference count
    44  */
    4538void ewk_window_features_unref(Ewk_Window_Features *window_features)
    4639{
     
    5649}
    5750
    58 /**
    59  * Increases the reference count of an Ewk_Window_Features.
    60  *
    61  * @param window_features the object to increase reference count
    62  */
    6351void ewk_window_features_ref(Ewk_Window_Features *window_features)
    6452{
     
    6755}
    6856
    69 /**
    70  * Gets boolean properties of an Ewk_Window_Features.
    71  *
    72  * Properties are returned in the respective pointers. Passing @c 0 to any of
    73  * these pointers will make that property to not be returned.
    74  *
    75  * @param window_features the object to get boolean properties
    76  * @param toolbar_visible the pointer to store if toolbar is visible
    77  * @param statusbar_visible the pointer to store if statusbar is visible
    78  * @param scrollbars_visible the pointer to store if scrollbars is visible
    79  * @param menubar_visible the pointer to store if menubar is visible
    80  * @param locationbar_visible the pointer to store if locationbar is visible
    81  * @param fullscreen the pointer to store if fullscreen is enabled
    82  *
    83  * @see ewk_window_features_int_property_get
    84  */
    8557void ewk_window_features_bool_property_get(Ewk_Window_Features *window_features, Eina_Bool *toolbar_visible, Eina_Bool *statusbar_visible, Eina_Bool *scrollbars_visible, Eina_Bool *menubar_visible, Eina_Bool *locationbar_visible, Eina_Bool *fullscreen)
    8658{
     
    10779}
    10880
    109 /**
    110  * Gets int properties of an Ewk_Window_Features.
    111  *
    112  * Properties are returned in the respective pointers. Passing @c 0 to any of
    113  * these pointers will make that property to not be returned.
    114  *
    115  * Make sure to check if the value returned is less than 0 before using it, since in
    116  * that case it means that property was not set in winwdow_features object.
    117  *
    118  * @param window_features the window's features
    119  * @param x the pointer to store x position
    120  * @param y the pointer to store y position
    121  * @param w the pointer to store width
    122  * @param h the pointer to store height
    123  *
    124  * @see ewk_window_features_bool_property_get
    125  */
    12681void ewk_window_features_int_property_get(Ewk_Window_Features *window_features, int *x, int *y, int *w, int *h)
    12782{
  • trunk/Source/WebKit/efl/ewk/ewk_window_features.h

    r91972 r92473  
    3636typedef struct _Ewk_Window_Features Ewk_Window_Features;
    3737
     38/**
     39 * Decreases the referece count of an Ewk_Window_Features, possibly freeing it.
     40 *
     41 * When the reference count of the object reaches 0, the one is freed.
     42 *
     43 * @param window_features the object to decrease reference count
     44 */
    3845EAPI void         ewk_window_features_unref(Ewk_Window_Features *window_features);
     46
     47/**
     48 * Increases the reference count of an Ewk_Window_Features.
     49 *
     50 * @param window_features the object to increase reference count
     51 */
    3952EAPI void         ewk_window_features_ref(Ewk_Window_Features *window_features);
    4053
     54/**
     55 * Gets boolean properties of an Ewk_Window_Features.
     56 *
     57 * Properties are returned in the respective pointers. Passing @c 0 to any of
     58 * these pointers will make that property to not be returned.
     59 *
     60 * @param window_features the object to get boolean properties
     61 * @param toolbar_visible the pointer to store if toolbar is visible
     62 * @param statusbar_visible the pointer to store if statusbar is visible
     63 * @param scrollbars_visible the pointer to store if scrollbars is visible
     64 * @param menubar_visible the pointer to store if menubar is visible
     65 * @param locationbar_visible the pointer to store if locationbar is visible
     66 * @param fullscreen the pointer to store if fullscreen is enabled
     67 *
     68 * @see ewk_window_features_int_property_get
     69 */
    4170EAPI void         ewk_window_features_bool_property_get(Ewk_Window_Features *window_features, Eina_Bool *toolbar_visible, Eina_Bool *statusbar_visible, Eina_Bool *scrollbars_visible, Eina_Bool *menubar_visible, Eina_Bool *locationbar_visible, Eina_Bool *fullscreen);
     71
     72/**
     73 * Gets int properties of an Ewk_Window_Features.
     74 *
     75 * Properties are returned in the respective pointers. Passing @c 0 to any of
     76 * these pointers will make that property to not be returned.
     77 *
     78 * Make sure to check if the value returned is less than 0 before using it, since in
     79 * that case it means that property was not set in winwdow_features object.
     80 *
     81 * @param window_features the window's features
     82 * @param x the pointer to store x position
     83 * @param y the pointer to store y position
     84 * @param w the pointer to store width
     85 * @param h the pointer to store height
     86 *
     87 * @see ewk_window_features_bool_property_get
     88 */
    4289EAPI void         ewk_window_features_int_property_get(Ewk_Window_Features *window_features, int *x, int *y, int *w, int *h);
    4390
Note: See TracChangeset for help on using the changeset viewer.