[webkit-efl] Naming rules for setting APIs
Kenneth Rohde Christiansen
kenneth.christiansen at gmail.com
Wed Oct 10 04:15:01 PDT 2012
Well the examples below is using enable_set and not enableD_set. Maybe
we should stick to that?
On Wed, Oct 10, 2012 at 1:13 PM, Dumez, Christophe
<christophe.dumez at intel.com> wrote:
> 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 (Evas_Object *obj, Eina_Bool disabled)
> void evas_object_map_enable_set (Evas_Object *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
>
>
> _______________________________________________
> webkit-efl mailing list
> webkit-efl at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-efl
>
--
Kenneth Rohde Christiansen
Senior Engineer, WebKit, Qt, EFL
Phone +45 4093 0598 / E-mail kenneth at webkit.org
﹆﹆﹆
More information about the webkit-efl
mailing list