Page MenuHomePhabricator

efl: add Cb suffix for callbacks
Needs ReviewPublic

Authored by YOhoho on Fri, Jan 31, 2:34 AM.

Details

Summary

Callbacks will be renamed to XXX.XXXXXX_Cb.
We don't have any EFL naming convention for callbacks. however, binding languages
have the naming guideline for framework.
This patch will make it esay to have a general translation rule for generator.

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15872
Build 10757: arc lint + arc unit
YOhoho created this revision.Fri, Jan 31, 2:34 AM

This makes sense to me, but I think not using underscores was the EO convention for callbacks. @cedric @zmike ?

segfaultxavi accepted this revision.Fri, Jan 31, 4:12 AM

On second thoughts, there is no naming convention, go ahead (builds and passes tests).

This revision is now accepted and ready to land.Fri, Jan 31, 4:12 AM
YOhoho planned changes to this revision.EditedFri, Jan 31, 4:21 AM

C# recommends naming rules for callbacks.

https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces#names-of-common-types

Base TypeDerived/Implementing Type Guideline
System.DelegateDO add the suffix "Callback" to names of delegates other than those used as event handlers.

I think it is better to add suffix like "Cb" for eo functions to apply same rules in eolian_mono.

I meant that there is no naming convention for callbacks in EO :)

I think it is better to add suffix like "Cb" for eo functions to apply same rules in eolian_mono.

Yeah, I think so too.

bu5hm4n requested changes to this revision.Fri, Jan 31, 5:17 AM
bu5hm4n added a subscriber: bu5hm4n.

Mhm, would you mind also splitting the names with a "_" so "FooBar" gets "Foo_Bar" ? that would match the efl standard even more.

Mhm, would you mind also splitting the names with a "_" so "FooBar" gets "Foo_Bar" ? that would match the efl standard even more.

Yes, i agree with that.

felipealmeida accepted this revision.EditedSun, Feb 2, 5:46 PM
felipealmeida added a subscriber: felipealmeida.
This comment has been deleted.
YOhoho updated this revision to Diff 28776.Sun, Feb 2, 11:25 PM
YOhoho retitled this revision from efl: fix incorrect correct namespacing of functions to efl: add Cb suffix for callbacks.
YOhoho edited the summary of this revision. (Show Details)

Rewrite patch.