2014-07-22 3:57 GMT+02:00 Felipe Magno de Almeida < fel...@expertisesolutions.com.br>:
> savio pushed a commit to branch master. > > > http://git.enlightenment.org/core/elementary.git/commit/?id=a1f0348e68a683408e8d36067bc717006bb21eb7 > > commit a1f0348e68a683408e8d36067bc717006bb21eb7 > Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> > Date: Wed Jul 16 17:34:05 2014 -0300 > > Added part_text_get/part_text_set and text_get/text_set to elm_button > > Added part_text_get/part_text_set and text_get/text_set to elm_button > to eolianized API. > ok, there are to options to choose from: 1. I did no understand nothing about how Eo works 2. This commit is totally wrong I'm quite sure the correct choose is the first one, but please explain me why. Shouldn't text_get/set functions be implemented in Layout? Why Buttton need to reimplement this? is not enough to put the function in the "implement" part of the .eo file? ...I'm quite confused davemds > --- > src/lib/elm_button.c | 20 ++++++++++++++++ > src/lib/elm_button.eo | 66 > +++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 86 insertions(+) > > diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c > index d9376c08..6db3487 100644 > --- a/src/lib/elm_button.c > +++ b/src/lib/elm_button.c > @@ -433,6 +433,26 @@ > _elm_button_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj > EINA_UNUSE > return &key_actions[0]; > } > > +EOLIAN const char* _elm_button_part_text_get(Eo* obj, Elm_Button_Data* pd > EINA_UNUSED, const char* part) > +{ > + return elm_object_part_text_get(obj, part); > +} > + > +EOLIAN void _elm_button_part_text_set(Eo* obj, Elm_Button_Data* pd > EINA_UNUSED, const char* part, const char* text) > +{ > + return elm_object_part_text_set(obj, part, text); > +} > + > +EOLIAN const char* _elm_button_text_get(Eo* obj, Elm_Button_Data* pd > EINA_UNUSED) > +{ > + return _elm_button_part_text_get(obj, pd, NULL); > +} > + > +EOLIAN void _elm_button_text_set(Eo* obj, Elm_Button_Data* pd > EINA_UNUSED, const char* text) > +{ > + return _elm_button_part_text_set(obj, pd, NULL, text); > +} > + > static void > _elm_button_class_constructor(Eo_Class *klass) > { > diff --git a/src/lib/elm_button.eo b/src/lib/elm_button.eo > index 4e0d567..1b40c2d 100644 > --- a/src/lib/elm_button.eo > +++ b/src/lib/elm_button.eo > @@ -96,6 +96,72 @@ class Elm_Button (Elm_Layout, Evas.Clickable_Interface, > } > } > } > + methods { > + part_text_set { > + /** > + * Set a text of an object > + * > + * @param obj The Elementary object > + * @param part The text part name to set (NULL for the default > part) > + * @param text The new text of the part > + * > + * @note Elementary objects may have many text parts (e.g. Action > Slider) > + * > + * @ingroup General > + */ > + params { > + @in const(char)* part; > + @in const(char)* text; > + } > + } > + part_text_get { > + /** > + * Get a text of an object > + * > + * @param obj The Elementary object > + * @param part The text part name to get (NULL for the default > part) > + * @return text of the part or NULL for any error > + * > + * @note Elementary objects may have many text parts (e.g. Action > Slider) > + * > + * @ingroup General > + */ > + params { > + @in const(char)* part; > + } > + return const(char)*; > + } > + text_set { > + /** > + * Set a text of an object > + * > + * @param obj The Elementary object > + * @param part The text part name to set (NULL for the default > part) > + * @param text The new text of the part > + * > + * @note Elementary objects may have many text parts (e.g. Action > Slider) > + * > + * @ingroup General > + */ > + params { > + @in const(char)* text; > + } > + } > + text_get { > + /** > + * Get a text of an object > + * > + * @param obj The Elementary object > + * @param part The text part name to get (NULL for the default > part) > + * @return text of the part or NULL for any error > + * > + * @note Elementary objects may have many text parts (e.g. Action > Slider) > + * > + * @ingroup General > + */ > + return const(char)*; > + } > + } > implements { > class.constructor; > Eo.Base.constructor; > > -- > > > ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel