Page MenuHomePhabricator

eolian-mono: Make Get/Set internal for generated properties

Authored by felipealmeida on Jan 30 2020, 1:40 PM.



Make Get and Set methods internal for properties that get the
property syntax generated.

Diff Detail

rEFL core/efl
Lint OK
No Unit Test Coverage
Build Status
Buildable 15880
felipealmeida created this revision.Jan 30 2020, 1:40 PM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

felipealmeida requested review of this revision.Jan 30 2020, 1:40 PM
YOhoho requested changes to this revision.Jan 30 2020, 11:34 PM
YOhoho added a subscriber: YOhoho.

Please change commit message/summary to Make ... internal from Make ... protected.


Tuple property GetXXX, SetXXX are still public because getter/setter have different parameter directions.


Some property have only getter with return value. (E.g. loop_count in efl_gfx_frame_controller.eo)
They can be property instead of GetXXX method.


If setter->explicit_return_type is bool or Eina_Error, its SetXXX Method can be internal, because they will be handled in proeprty setter.

This revision now requires changes to proceed.Jan 30 2020, 11:34 PM
felipealmeida retitled this revision from eolian-mono: Make Get/Set protected for generated properties to eolian-mono: Make Get/Set internal for generated properties.
felipealmeida edited the summary of this revision. (Show Details)

fixed typo in commit message

YOhoho requested changes to this revision.Feb 2 2020, 11:36 PM

Please check inline comment above.

This revision now requires changes to proceed.Feb 2 2020, 11:36 PM
felipealmeida added inline comments.Feb 3 2020, 7:24 PM

I'm finishing a fix for this.


Same thing, I'd like to deal with this in another patch. Which I'll work immediately.


I prefer to leave this for another commit. With proper testing of this specific return type.

Made values comparations to be weaker so they can match getter and setter differences in directions.

There's still a problem with efl_ui_win_wm_available_rotations_set_ptr which seems to be related with Tuples, but I still couldn't figure it out what exactly. @YOhoho if you can take a look and find a solution before my next shift that would probably be good for you guys. Error message is:

src/bindings/mono/efl_ui_win.eo.cs(1206,38): error CS0117: Efl.Ui.Win.NativeMethods' does not contain a definition for efl_ui_win_wm_available_rotations_set_ptr'
src/bindings/mono/efl_ui_win.eo.cs(3126,28): (Location of the symbol related to previous error)
src/bindings/mono/efl_ui_win.eo.cs(3189,21): error CS0103: The name `efl_ui_win_wm_available_rotations_set_static_delegate' does not exist in the current context
src/bindings/mono/efl_ui_win.eo.cs(3191,81): error CS0246: The type or namespace name `efl_ui_win_wm_available_rotations_set_delegate' could not be found. Are you missing an assembly reference?
src/bindings/mono/efl_ui_win.eo.cs(3191,21): error CS0103: The name `efl_ui_win_wm_available_rotations_set_static_delegate' does not exist in the current context
src/bindings/mono/efl_ui_win.eo.cs(3196,211): error CS0103: The name `efl_ui_win_wm_available_rotations_set_static_delegate' does not exist in the current context
Compilation failed: 5 error(s), 0 warnings
ninja: build stopped: subcommand failed.

YOhoho added inline comments.Feb 3 2020, 8:43 PM

Because of this line, efl_ui_win_wm_available_rotations_set_delegate is not generated.

For wm_avaliable_rotations, has_wrapper_getter : 0, has_wrapper_setter : 1.

  1. GetWmAvailableRotations is generated by line 67 of function_definition.hh
  2. But, efl_ui_win_wm_available_rotations_get_ptr is not generated by this line.

I'm not sure if this condition is necessary.

Fixes not generating native property function improperly.

jptiz accepted this revision.Feb 13 2020, 11:30 AM
jptiz added a subscriber: jptiz.

Passes tests and has pretty nice refactors.

Removed GenericModel.cs changed that are already upstream

This revision was not accepted when it landed; it landed in state Needs Review.Feb 18 2020, 11:48 AM
This revision was automatically updated to reflect the committed changes.