summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_bubble.c
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-06-04 17:25:36 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-06-05 02:08:03 +0300
commit3eb649b180eb98f7be829de5aed7e8c7f1ceb35a (patch)
treee7095c091fd648d2bf8e45aa5b9a9634bc73735e /src/lib/elementary/elm_bubble.c
parente53b77d6ce9848bdb274b428c33e6848c8620443 (diff)
Elm layout: replace 'text' property with 'efl_part' interface
The expected usage is efl_text_set(efl_part(layout, part), text); Same for text_get. Also, added an example how to make API easier with providing efl_text_set/get for the widget itself, in efl_ui_button. Please see this example.
Diffstat (limited to 'src/lib/elementary/elm_bubble.c')
-rw-r--r--src/lib/elementary/elm_bubble.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/elementary/elm_bubble.c b/src/lib/elementary/elm_bubble.c
index 15d67e4..520a161 100644
--- a/src/lib/elementary/elm_bubble.c
+++ b/src/lib/elementary/elm_bubble.c
@@ -11,6 +11,9 @@
11#include "elm_widget_bubble.h" 11#include "elm_widget_bubble.h"
12#include "elm_widget_layout.h" 12#include "elm_widget_layout.h"
13 13
14#include "elm_bubble_internal_part.eo.h"
15#include "elm_part_helper.h"
16
14#define MY_CLASS ELM_BUBBLE_CLASS 17#define MY_CLASS ELM_BUBBLE_CLASS
15 18
16#define MY_CLASS_NAME "Elm_Bubble" 19#define MY_CLASS_NAME "Elm_Bubble"
@@ -114,11 +117,11 @@ _elm_bubble_elm_widget_focus_direction(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED
114} 117}
115 118
116EOLIAN static Eina_Bool 119EOLIAN static Eina_Bool
117_elm_bubble_elm_layout_text_set(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, const char *part, const char *label) 120_elm_bubble_text_set(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, const char *part, const char *label)
118{ 121{
119 Eina_Bool int_ret = EINA_FALSE; 122 Eina_Bool int_ret = EINA_TRUE;
120 123
121 int_ret = elm_obj_layout_text_set(efl_super(obj, MY_CLASS), part, label); 124 efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), label);
122 if (!int_ret) return EINA_FALSE; 125 if (!int_ret) return EINA_FALSE;
123 126
124 if (part && (!strcmp(part, "info") || !strcmp(part, "elm.info"))) 127 if (part && (!strcmp(part, "info") || !strcmp(part, "elm.info")))
@@ -288,6 +291,12 @@ _elm_bubble_class_constructor(Efl_Class *klass)
288 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 291 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
289} 292}
290 293
294/* Efl.Part begin */
295ELM_PART_OVERRIDE(elm_bubble, ELM_BUBBLE, ELM_LAYOUT, Elm_Bubble_Data, Elm_Part_Data)
296ELM_PART_OVERRIDE_TEXT_SET(elm_bubble, ELM_BUBBLE, ELM_LAYOUT, Elm_Bubble_Data, Elm_Part_Data)
297
298#include "elm_bubble_internal_part.eo.c"
299/* Efl.Part end */
291/* Internal EO APIs and hidden overrides */ 300/* Internal EO APIs and hidden overrides */
292 301
293#define ELM_BUBBLE_EXTRA_OPS \ 302#define ELM_BUBBLE_EXTRA_OPS \