summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaehyub Kim <taehyub.kim@samsung.com>2019-11-07 13:38:47 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2019-11-07 13:38:47 +0900
commite4e7ff3905090a75eb900672be7208f1f62fcf65 (patch)
tree345dee1226567b4e503f0a4e9681f428ff1dd00d /src
parent03d9fa97cc6b753b393436b461e6c36eff5cc577 (diff)
efl_ui_alert_popup: add title part in parts block
Summary: add title part in parts block Reviewers: Jaehyun_Cho, woohyun, zmike, segfaultxavi Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10596
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_alert_popup.c38
-rw-r--r--src/lib/elementary/efl_ui_alert_popup.eo3
-rw-r--r--src/lib/elementary/efl_ui_alert_popup_part_title.eo (renamed from src/lib/elementary/efl_ui_alert_popup_part.eo)2
-rw-r--r--src/lib/elementary/meson.build2
4 files changed, 36 insertions, 9 deletions
diff --git a/src/lib/elementary/efl_ui_alert_popup.c b/src/lib/elementary/efl_ui_alert_popup.c
index 0c5fc1b..65dcb49 100644
--- a/src/lib/elementary/efl_ui_alert_popup.c
+++ b/src/lib/elementary/efl_ui_alert_popup.c
@@ -8,7 +8,7 @@
8 8
9#include "elm_priv.h" 9#include "elm_priv.h"
10#include "efl_ui_alert_popup_private.h" 10#include "efl_ui_alert_popup_private.h"
11#include "efl_ui_alert_popup_part.eo.h" 11#include "efl_ui_alert_popup_part_title.eo.h"
12#include "elm_part_helper.h" 12#include "elm_part_helper.h"
13 13
14#define MY_CLASS EFL_UI_ALERT_POPUP_CLASS 14#define MY_CLASS EFL_UI_ALERT_POPUP_CLASS
@@ -257,18 +257,42 @@ _efl_ui_alert_popup_efl_object_destructor(Eo *obj, Efl_Ui_Alert_Popup_Data *pd)
257} 257}
258 258
259static Eina_Bool 259static Eina_Bool
260_part_is_efl_ui_alert_popup_part(const Eo *obj, const char *part) 260_part_is_efl_ui_alert_popup_part_title(const Eo *obj, const char *part)
261{ 261{
262 if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) return EINA_FALSE; 262 if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) return EINA_FALSE;
263 return eina_streq(part, "efl.text.title"); 263 return eina_streq(part, "efl.text.title");
264} 264}
265 265
266/* Efl.Part begin */ 266/* Efl.Part begin */
267ELM_PART_OVERRIDE_PARTIAL(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, 267EOLIAN static Efl_Object *
268 Efl_Ui_Alert_Popup_Data, _part_is_efl_ui_alert_popup_part) 268_efl_ui_alert_popup_efl_part_part_get(const Eo *obj, Efl_Ui_Alert_Popup_Data *priv EINA_UNUSED, const char *part)
269ELM_PART_OVERRIDE_TEXT_SET(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, Efl_Ui_Alert_Popup_Data) 269{
270ELM_PART_OVERRIDE_TEXT_GET(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, Efl_Ui_Alert_Popup_Data) 270 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
271#include "efl_ui_alert_popup_part.eo.c" 271 if (_part_is_efl_ui_alert_popup_part_title(obj, part))
272 return ELM_PART_IMPLEMENT(EFL_UI_ALERT_POPUP_PART_TITLE_CLASS, obj, part);
273 return efl_part_get(efl_super(obj, EFL_UI_ALERT_POPUP_CLASS), part);
274}
275
276EOLIAN static void
277_efl_ui_alert_popup_part_title_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *text)
278{
279 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
280 Efl_Ui_Alert_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_ALERT_POPUP_CLASS);
281
282 _efl_ui_alert_popup_text_set(pd->obj, sd, pd->part, text);
283}
284
285EOLIAN static const char*
286_efl_ui_alert_popup_part_title_efl_text_text_get(const Eo *obj, void *_pd EINA_UNUSED)
287{
288 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
289 Efl_Ui_Alert_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_ALERT_POPUP_CLASS);
290
291 return _efl_ui_alert_popup_text_get(pd->obj, sd, pd->part);
292}
293
294
295#include "efl_ui_alert_popup_part_title.eo.c"
272 296
273/* Efl.Part end */ 297/* Efl.Part end */
274EFL_UI_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_alert_popup) 298EFL_UI_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_alert_popup)
diff --git a/src/lib/elementary/efl_ui_alert_popup.eo b/src/lib/elementary/efl_ui_alert_popup.eo
index c154bb2..b51fcb4 100644
--- a/src/lib/elementary/efl_ui_alert_popup.eo
+++ b/src/lib/elementary/efl_ui_alert_popup.eo
@@ -45,6 +45,9 @@ class Efl.Ui.Alert_Popup extends Efl.Ui.Popup
45 } 45 }
46 } 46 }
47 } 47 }
48 parts {
49 title @beta: Efl.Ui.Alert_Popup_Part_Title; [[The title text of Alert Popup.]]
50 }
48 implements { 51 implements {
49 Efl.Object.constructor; 52 Efl.Object.constructor;
50 Efl.Object.destructor; 53 Efl.Object.destructor;
diff --git a/src/lib/elementary/efl_ui_alert_popup_part.eo b/src/lib/elementary/efl_ui_alert_popup_part_title.eo
index b5860a9..94a4899 100644
--- a/src/lib/elementary/efl_ui_alert_popup_part.eo
+++ b/src/lib/elementary/efl_ui_alert_popup_part_title.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.Alert_Popup_Part extends Efl.Ui.Layout_Part_Text 1class @beta Efl.Ui.Alert_Popup_Part_Title extends Efl.Ui.Layout_Part_Text
2{ 2{
3 [[Efl UI Alert Popup internal part class]] 3 [[Efl UI Alert Popup internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index c2cd86b..58c7fd3 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -83,7 +83,7 @@ pub_eo_files = [
83 'efl_ui_popup.eo', 83 'efl_ui_popup.eo',
84 'efl_ui_popup_part_backwall.eo', 84 'efl_ui_popup_part_backwall.eo',
85 'efl_ui_alert_popup.eo', 85 'efl_ui_alert_popup.eo',
86 'efl_ui_alert_popup_part.eo', 86 'efl_ui_alert_popup_part_title.eo',
87 'efl_ui_text_editable.eo', 87 'efl_ui_text_editable.eo',
88 'efl_ui_text_async.eo', 88 'efl_ui_text_async.eo',
89 'efl_ui_text_factory_images.eo', 89 'efl_ui_text_factory_images.eo',