[webkit-efl] Question related to API comment location.

Gyuyoung Kim gyuyoung.kim at samsung.com
Tue Jul 12 19:32:59 PDT 2011


Hello,

I wonder why API's description is added to .cpp files.

For example, in ewk_view.cpp,

/**
 * Sets the spatial navigation.
 *
 * @param o view object to set spatial navigation setting.
 * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
 */
Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool
enable)
{
    EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    ...
} 

In contrast, type definition's description are put on .h files.

/**
 * Cache (pool) that contains unused tiles for ewk_view_tiled.
 *
 * This cache will maintain unused tiles and flush them when the total
 * memory exceeds the set amount when
 * ewk_tile_unused_cache_auto_flush() or explicitly set value when
 * ewk_tile_unused_cache_flush() is called.
 *
 * The tile may be shared among different ewk_view_tiled instances to
 * group maximum unused memory resident in the system.
 */
typedef struct _Ewk_Tile_Unused_Cache Ewk_Tile_Unused_Cache;


It looks there are no consistency for API description. 

IMO, it is better to move all descriptions to .h files. Because, application
developers 
can refer to the usage of API through header files. If efl developers agree
with my suggestion,
I'd like to move all descriptions to header files.

- Gyuyoung





More information about the webkit-efl mailing list