[webkit-efl] Naming rules for setting APIs

Dumez, Christophe christophe.dumez at intel.com
Wed Oct 10 04:13:16 PDT 2012


Hi,

To my knowledge, the second one is more consistent with EFL naming style
(so I would vote for it):

For e.g.:
void elm_object_disabled_set<http://docs.enlightenment.org/auto/elementary/group__Styles.html#ga6849a57df3316eabad5bec443bf87597>(Evas_Object
*obj, Eina_Bool disabled)
void evas_object_map_enable_set<http://docs.enlightenment.org/auto/evas/group__Evas__Object__Group__Map.html#ga80bc36afa9fa3d0118d32ca4402f0fe1>(
Evas_Object<http://docs.enlightenment.org/auto/evas/group__Evas__Object__Group.html#ga9e19e6dd1f517a0ba437c0114d3e7c97>*obj,
Eina_Bool enabled)

Kr,

On Wed, Oct 10, 2012 at 2:07 PM, Jinwoo Song <jinwoo7.song at samsung.com>wrote:

> Hi,
>
> I'm revisiting API names and documentation of WebKit2 EFL settings.
> https://bugs.webkit.org/show_bug.cgi?id=98793
>
> Currently, there is no concrete rules for API naming, so the names are
> inconsistent.
>
> For example:
>
> ewk_settings_enable_frame_flattening_set()/ewk_settings_enable_frame_flattening_get()
> vs.
>
> ewk_settings_developer_extras_enabled_set()/ewk_settings_developer_extras_enabled_get()
>
> Grzegorz suggested to use 'ewk_settings_enable_frame_flattening_set() with
> following rules and I also prefer this one.
> > 1) WK1 uses similar API, for example:
> ewk_view_setting_enable_frame_flattening_set
> > 2) Verb next to another verb (enabled_set) doesn't looks/sounds well.
> > 3) I'd rather prefer not using plural in API (enabled -> enable)
> > 4) The Spelling API  bug 91854 proposes API syntax based on above
> suggestions (as during work on this there wasn't ewk2-settings yet). So we
> will have consistent API.
>
> FYI, GTK uses set_enable_frame_flattening() and Qt uses
> setFrameFlatteningEnabled().
>
> So I'd like to here the opinions for the naming rule and if there is no
> objections for the suggested rule, I'll adjust the APIs with this one.
>
> Thanks,
> Jinwoo
> _______________________________________________
> webkit-efl mailing list
> webkit-efl at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-efl
>



-- 
Christophe Dumez
Linux Software Engineer, PhD
Intel Finland Oy - Open Source Technology Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-efl/attachments/20121010/e4a3970b/attachment.html>


More information about the webkit-efl mailing list