summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2018-10-12 15:42:31 +0900
committerHermet Park <hermetpark@gmail.com>2018-10-12 15:42:31 +0900
commit32504a8cfa8639a8ff80a28bc308c73d98c25e39 (patch)
treec41006188f793469de8a4a8ecb31ca78d897fc4f
parent0270b20378da1682fab4598ed0322cd1fcfdb470 (diff)
elementary textpath: support legacy APIs
Summary: Efl.Ui.Textpath was added when we were developing new interfaces. So, basically, it does not support 'legacy' APIs. ex) elm_textpath_add But, in Tizen, the legacy APIs had been delivered in old version of EFL. To reduce maintainning cost between the platforms, this patch will be helpful. @feature Test Plan: N/A Reviewers: Hermet, woohyun, zmike, cedric, herdsman Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7033
-rw-r--r--src/Makefile_Elementary.am3
-rw-r--r--src/lib/elementary/Elementary.h2
-rw-r--r--src/lib/elementary/efl_ui_textpath.c29
-rw-r--r--src/lib/elementary/efl_ui_textpath.eo1
-rw-r--r--src/lib/elementary/efl_ui_textpath_legacy.eo9
-rw-r--r--src/lib/elementary/elm_textpath.h15
-rw-r--r--src/lib/elementary/elm_textpath_legacy.h15
7 files changed, 73 insertions, 1 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 4e906e1190..865c623841 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -56,6 +56,7 @@ elm_public_eolian_files = \
56 lib/elementary/efl_ui_text_factory_emoticons.eo \ 56 lib/elementary/efl_ui_text_factory_emoticons.eo \
57 lib/elementary/efl_ui_text_factory_fallback.eo \ 57 lib/elementary/efl_ui_text_factory_fallback.eo \
58 lib/elementary/efl_ui_textpath.eo \ 58 lib/elementary/efl_ui_textpath.eo \
59 lib/elementary/efl_ui_textpath_legacy.eo \
59 lib/elementary/efl_ui_translatable.eo \ 60 lib/elementary/efl_ui_translatable.eo \
60 lib/elementary/efl_ui_clock.eo \ 61 lib/elementary/efl_ui_clock.eo \
61 lib/elementary/efl_ui_cursor.eo \ 62 lib/elementary/efl_ui_cursor.eo \
@@ -630,6 +631,8 @@ includesub_HEADERS = \
630 lib/elementary/elm_sys_notify.h \ 631 lib/elementary/elm_sys_notify.h \
631 lib/elementary/elm_table.h \ 632 lib/elementary/elm_table.h \
632 lib/elementary/elm_table_legacy.h \ 633 lib/elementary/elm_table_legacy.h \
634 lib/elementary/elm_textpath.h \
635 lib/elementary/elm_textpath_legacy.h \
633 lib/elementary/elm_theme.h \ 636 lib/elementary/elm_theme.h \
634 lib/elementary/elm_thumb.h \ 637 lib/elementary/elm_thumb.h \
635 lib/elementary/elm_thumb_common.h \ 638 lib/elementary/elm_thumb_common.h \
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 9ede3d650b..97ef0838d8 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -160,7 +160,6 @@ typedef Eo Efl_Ui_Focus_Manager;
160# include <efl_ui_focus_manager_sub.eo.h> 160# include <efl_ui_focus_manager_sub.eo.h>
161# include <efl_ui_focus_manager_root_focus.eo.h> 161# include <efl_ui_focus_manager_root_focus.eo.h>
162# include <efl_ui_focus_util.eo.h> 162# include <efl_ui_focus_util.eo.h>
163# include <efl_ui_textpath.eo.h>
164# include <efl_ui_translatable.eo.h> 163# include <efl_ui_translatable.eo.h>
165# include <efl_ui_focus_composition.eo.h> 164# include <efl_ui_focus_composition.eo.h>
166# include <efl_ui_focus_layer.eo.h> 165# include <efl_ui_focus_layer.eo.h>
@@ -269,6 +268,7 @@ typedef Eo Efl_Ui_Focus_Manager;
269#include <elm_spinner.h> 268#include <elm_spinner.h>
270#include <elm_store.h> 269#include <elm_store.h>
271#include <elm_table.h> 270#include <elm_table.h>
271#include <elm_textpath.h>
272#include <elm_theme.h> 272#include <elm_theme.h>
273#include <elm_thumb.h> 273#include <elm_thumb.h>
274#include <elm_toolbar.h> 274#include <elm_toolbar.h>
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index 20b04092b0..be6de4de36 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -758,3 +758,32 @@ ELM_PART_OVERRIDE_TEXT_GET(efl_ui_textpath, EFL_UI_TEXTPATH, Efl_Ui_Textpath_Dat
758 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_textpath) 758 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_textpath)
759 759
760#include "efl_ui_textpath.eo.c" 760#include "efl_ui_textpath.eo.c"
761
762#include "efl_ui_textpath_legacy.eo.h"
763
764#define MY_CLASS_NAME_LEGACY "elm_textpath"
765/* Legacy APIs */
766
767static void
768_efl_ui_textpath_legacy_class_constructor(Efl_Class *klass)
769{
770 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
771}
772
773EOLIAN static Eo *
774_efl_ui_textpath_legacy_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
775{
776 obj = efl_constructor(efl_super(obj, EFL_UI_TEXTPATH_LEGACY_CLASS));
777 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
778 return obj;
779}
780
781EAPI Evas_Object *
782elm_textpath_add(Evas_Object *parent)
783{
784 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
785 return elm_legacy_add(EFL_UI_TEXTPATH_LEGACY_CLASS, parent);
786}
787
788#include "efl_ui_textpath_legacy.eo.c"
789
diff --git a/src/lib/elementary/efl_ui_textpath.eo b/src/lib/elementary/efl_ui_textpath.eo
index 8feca95bd5..d506d2b901 100644
--- a/src/lib/elementary/efl_ui_textpath.eo
+++ b/src/lib/elementary/efl_ui_textpath.eo
@@ -7,6 +7,7 @@ enum Efl.Ui.Textpath_Direction {
7class Efl.Ui.Textpath (Efl.Ui.Layout.Object, Efl.Text, Efl.Gfx.Path) 7class Efl.Ui.Textpath (Efl.Ui.Layout.Object, Efl.Text, Efl.Gfx.Path)
8{ 8{
9 [[Efl Ui Textpath class]] 9 [[Efl Ui Textpath class]]
10 legacy_prefix: elm_textpath;
10 methods { 11 methods {
11 circle_set { 12 circle_set {
12 [[Set a circle with given center, radius, and start angle.]] 13 [[Set a circle with given center, radius, and start angle.]]
diff --git a/src/lib/elementary/efl_ui_textpath_legacy.eo b/src/lib/elementary/efl_ui_textpath_legacy.eo
new file mode 100644
index 0000000000..fd19602b1f
--- /dev/null
+++ b/src/lib/elementary/efl_ui_textpath_legacy.eo
@@ -0,0 +1,9 @@
1class Efl.Ui.Textpath_Legacy (Efl.Ui.Textpath, Efl.Ui.Legacy)
2{
3 [[Textpath widget]]
4 data: null;
5 implements {
6 class.constructor;
7 Efl.Object.constructor;
8 }
9}
diff --git a/src/lib/elementary/elm_textpath.h b/src/lib/elementary/elm_textpath.h
new file mode 100644
index 0000000000..780f1fa222
--- /dev/null
+++ b/src/lib/elementary/elm_textpath.h
@@ -0,0 +1,15 @@
1/**
2 * @defgroup Elm_Textpath Textpath
3 * @ingroup Elementary
4 */
5
6#ifdef EFL_EO_API_SUPPORT
7#include "efl_ui_textpath.eo.h"
8#define EFL_UI_RADIO_EVENT_CHANGED EFL_UI_NSTATE_EVENT_CHANGED
9#endif
10#ifndef EFL_NOLEGACY_API_SUPPORT
11#include "elm_textpath_legacy.h"
12#endif
13/**
14 * @}
15 */
diff --git a/src/lib/elementary/elm_textpath_legacy.h b/src/lib/elementary/elm_textpath_legacy.h
new file mode 100644
index 0000000000..b57dafff15
--- /dev/null
+++ b/src/lib/elementary/elm_textpath_legacy.h
@@ -0,0 +1,15 @@
1typedef Eo Elm_Textpath;
2
3/**
4 * @brief Add a new textpath to the parent
5 *
6 * @param[in] parent The parent object
7 * @return The new object or NULL if it cannot be created
8 *
9 * @ingroup Elm_Textpath
10 *
11 * @since 1.22
12 */
13EAPI Evas_Object *elm_textpath_add(Evas_Object *parent);
14
15#include "efl_ui_textpath.eo.legacy.h"