efl_ui_video: remove all legacy usage from eo files
authorMike Blumenkrantz <zmike@samsung.com>
Tue, 5 Mar 2019 22:00:37 +0000 (17:00 -0500)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 14 Mar 2019 05:46:27 +0000 (14:46 +0900)
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8147

src/Makefile_Elementary.am
src/lib/elementary/efl_ui_video.c
src/lib/elementary/efl_ui_video.eo
src/lib/elementary/efl_ui_video_eo.legacy.c [new file with mode: 0644]
src/lib/elementary/efl_ui_video_eo.legacy.h [new file with mode: 0644]
src/lib/elementary/efl_ui_video_legacy.eo [deleted file]
src/lib/elementary/efl_ui_video_legacy.h
src/lib/elementary/efl_ui_video_legacy_eo.c [new file with mode: 0644]
src/lib/elementary/efl_ui_video_legacy_eo.h [new file with mode: 0644]
src/lib/elementary/efl_ui_video_legacy_eo.legacy.h [new file with mode: 0644]
src/lib/elementary/meson.build

index dfca716eaed2c18b481df4721ac94ce50a408ce3..53f02e1126056983b4723310a43f24bf757e7556 100644 (file)
@@ -196,7 +196,6 @@ endif
 
 # Legacy classes - not part of public EO API
 elm_legacy_eolian_files = \
-       lib/elementary/efl_ui_video_legacy.eo \
        lib/elementary/efl_ui_win_legacy.eo \
        lib/elementary/efl_ui_clock_legacy.eo \
        lib/elementary/elm_code_widget_legacy.eo \
@@ -341,6 +340,8 @@ lib/elementary/efl_ui_radio_eo.legacy.c \
 lib/elementary/efl_ui_radio_legacy_eo.c \
 lib/elementary/efl_ui_textpath_eo.legacy.c \
 lib/elementary/efl_ui_textpath_legacy_eo.c \
+lib/elementary/efl_ui_video_eo.legacy.c \
+lib/elementary/efl_ui_video_legacy_eo.c \
 lib/elementary/elm_hoversel_eo.c \
 lib/elementary/elm_hoversel_eo.legacy.c \
 lib/elementary/elm_hoversel_item_eo.c \
@@ -380,6 +381,9 @@ lib/elementary/efl_ui_radio_legacy_eo.legacy.h \
 lib/elementary/efl_ui_textpath_eo.legacy.h \
 lib/elementary/efl_ui_textpath_legacy_eo.h \
 lib/elementary/efl_ui_textpath_legacy_eo.legacy.h \
+lib/elementary/efl_ui_video_eo.legacy.h \
+lib/elementary/efl_ui_video_legacy_eo.h \
+lib/elementary/efl_ui_video_legacy_eo.legacy.h \
 lib/elementary/elm_hoversel_eo.h \
 lib/elementary/elm_hoversel_eo.legacy.h \
 lib/elementary/elm_hoversel_item_eo.h \
index a732e315e84ce457b0c6cd4c4eea67c979eea5b9..dd0d6f11aed91039d9f62c692ca3274ac475116e 100644 (file)
@@ -421,8 +421,9 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_video, Efl_Ui_Video_Data)
    EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_video)
 
 #include "efl_ui_video.eo.c"
+#include "efl_ui_video_eo.legacy.c"
 
-#include "efl_ui_video_legacy.eo.h"
+#include "efl_ui_video_legacy_eo.h"
 
 #define MY_CLASS_NAME_LEGACY "elm_video"
 
@@ -533,4 +534,4 @@ elm_video_pause(Evas_Object *obj)
    efl_player_play_set(obj, EINA_FALSE);
 }
 
-#include "efl_ui_video_legacy.eo.c"
+#include "efl_ui_video_legacy_eo.c"
index 5ed6a1c03f51d153d0f34218b68dc08c8523b1f9..ab9c3ce48d8c0492fd8e839fb409735f978e01c0 100644 (file)
@@ -1,7 +1,6 @@
 class @beta Efl.Ui.Video extends Efl.Ui.Layout_Base implements Efl.File, Efl.Player, Efl.Access.Widget.Action
 {
    [[Efl UI video class]]
-   legacy_prefix: elm_video;
    methods {
       @property remember_position {
          set {
diff --git a/src/lib/elementary/efl_ui_video_eo.legacy.c b/src/lib/elementary/efl_ui_video_eo.legacy.c
new file mode 100644 (file)
index 0000000..09e0e98
--- /dev/null
@@ -0,0 +1,24 @@
+
+EAPI void
+elm_video_remember_position_set(Efl_Ui_Video *obj, Eina_Bool remember)
+{
+   efl_ui_video_remember_position_set(obj, remember);
+}
+
+EAPI Eina_Bool
+elm_video_remember_position_get(const Efl_Ui_Video *obj)
+{
+   return efl_ui_video_remember_position_get(obj);
+}
+
+EAPI Efl_Canvas_Object *
+elm_video_emotion_get(const Efl_Ui_Video *obj)
+{
+   return efl_ui_video_emotion_get(obj);
+}
+
+EAPI const char *
+elm_video_title_get(const Efl_Ui_Video *obj)
+{
+   return efl_ui_video_title_get(obj);
+}
diff --git a/src/lib/elementary/efl_ui_video_eo.legacy.h b/src/lib/elementary/efl_ui_video_eo.legacy.h
new file mode 100644 (file)
index 0000000..463eda8
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef _EFL_UI_VIDEO_EO_LEGACY_H_
+#define _EFL_UI_VIDEO_EO_LEGACY_H_
+
+#ifndef _EFL_UI_VIDEO_EO_CLASS_TYPE
+#define _EFL_UI_VIDEO_EO_CLASS_TYPE
+
+typedef Eo Efl_Ui_Video;
+
+#endif
+
+#ifndef _EFL_UI_VIDEO_EO_TYPES
+#define _EFL_UI_VIDEO_EO_TYPES
+
+
+#endif
+
+/**
+ * @brief Set whether the object can remember the last played position.
+ *
+ * @note This API only serves as indication. System support is required.
+ *
+ * @param[in] obj The object.
+ * @param[in] remember @c true when the object can remember the last position,
+ * @c false otherwise
+ *
+ * @ingroup Elm_Video_Group
+ */
+EAPI void elm_video_remember_position_set(Efl_Ui_Video *obj, Eina_Bool remember);
+
+/**
+ * @brief Set whether the object can remember the last played position.
+ *
+ * @note This API only serves as indication. System support is required.
+ *
+ * @param[in] obj The object.
+ *
+ * @return @c true when the object can remember the last position, @c false
+ * otherwise
+ *
+ * @ingroup Elm_Video_Group
+ */
+EAPI Eina_Bool elm_video_remember_position_get(const Efl_Ui_Video *obj);
+
+/**
+ * @brief Get the underlying Emotion object.
+ *
+ * @param[in] obj The object.
+ *
+ * @return The underlying Emotion object.
+ *
+ * @ingroup Elm_Video_Group
+ */
+EAPI Efl_Canvas_Object *elm_video_emotion_get(const Efl_Ui_Video *obj);
+
+/**
+ * @brief Get the title (for instance DVD title) from this emotion object.
+ *
+ * This function is only useful when playing a DVD.
+ *
+ * @note Don't change or free the string returned by this function.
+ *
+ * @param[in] obj The object.
+ *
+ * @return A string containing the title.
+ *
+ * @ingroup Elm_Video_Group
+ */
+EAPI const char *elm_video_title_get(const Efl_Ui_Video *obj);
+
+#endif
diff --git a/src/lib/elementary/efl_ui_video_legacy.eo b/src/lib/elementary/efl_ui_video_legacy.eo
deleted file mode 100644 (file)
index c6bcd5c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class @beta Efl.Ui.Video_Legacy extends Efl.Ui.Video implements Efl.Ui.Legacy
-{
-   [[Efl UI video class]]
-   data: null;
-   implements {
-      class.constructor;
-      Efl.Object.constructor;
-   }
-}
index 70ac16a7189e0ed23d4a9ef37af43206d76f8e76..1d4d3c36217dff4be7b8ca4617204a23f6eb8881 100644 (file)
@@ -169,4 +169,4 @@ EAPI void elm_video_stop(Evas_Object *obj);
  */
 EAPI void elm_video_pause(Evas_Object *obj);
 
-#include "efl_ui_video.eo.legacy.h"
+#include "efl_ui_video_eo.legacy.h"
diff --git a/src/lib/elementary/efl_ui_video_legacy_eo.c b/src/lib/elementary/efl_ui_video_legacy_eo.c
new file mode 100644 (file)
index 0000000..1c49e44
--- /dev/null
@@ -0,0 +1,35 @@
+
+Efl_Object *_efl_ui_video_legacy_efl_object_constructor(Eo *obj, void *pd);
+
+
+static Eina_Bool
+_efl_ui_video_legacy_class_initializer(Efl_Class *klass)
+{
+   const Efl_Object_Ops *opsp = NULL;
+
+   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
+
+#ifndef EFL_UI_VIDEO_LEGACY_EXTRA_OPS
+#define EFL_UI_VIDEO_LEGACY_EXTRA_OPS
+#endif
+
+   EFL_OPS_DEFINE(ops,
+      EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_video_legacy_efl_object_constructor),
+      EFL_UI_VIDEO_LEGACY_EXTRA_OPS
+   );
+   opsp = &ops;
+
+   return efl_class_functions_set(klass, opsp, ropsp);
+}
+
+static const Efl_Class_Description _efl_ui_video_legacy_class_desc = {
+   EO_VERSION,
+   "Efl.Ui.Video_Legacy",
+   EFL_CLASS_TYPE_REGULAR,
+   0,
+   _efl_ui_video_legacy_class_initializer,
+   _efl_ui_video_legacy_class_constructor,
+   NULL
+};
+
+EFL_DEFINE_CLASS(efl_ui_video_legacy_class_get, &_efl_ui_video_legacy_class_desc, EFL_UI_VIDEO_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
diff --git a/src/lib/elementary/efl_ui_video_legacy_eo.h b/src/lib/elementary/efl_ui_video_legacy_eo.h
new file mode 100644 (file)
index 0000000..f6d5382
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef _EFL_UI_VIDEO_LEGACY_EO_H_
+#define _EFL_UI_VIDEO_LEGACY_EO_H_
+
+#ifndef _EFL_UI_VIDEO_LEGACY_EO_CLASS_TYPE
+#define _EFL_UI_VIDEO_LEGACY_EO_CLASS_TYPE
+
+typedef Eo Efl_Ui_Video_Legacy;
+
+#endif
+
+#ifndef _EFL_UI_VIDEO_LEGACY_EO_TYPES
+#define _EFL_UI_VIDEO_LEGACY_EO_TYPES
+
+
+#endif
+#ifdef EFL_BETA_API_SUPPORT
+/** Efl UI video class
+ *
+ * @ingroup Efl_Ui_Video_Legacy
+ */
+#define EFL_UI_VIDEO_LEGACY_CLASS efl_ui_video_legacy_class_get()
+
+EWAPI const Efl_Class *efl_ui_video_legacy_class_get(void);
+#endif /* EFL_BETA_API_SUPPORT */
+
+#endif
diff --git a/src/lib/elementary/efl_ui_video_legacy_eo.legacy.h b/src/lib/elementary/efl_ui_video_legacy_eo.legacy.h
new file mode 100644 (file)
index 0000000..01c7cea
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _EFL_UI_VIDEO_LEGACY_EO_LEGACY_H_
+#define _EFL_UI_VIDEO_LEGACY_EO_LEGACY_H_
+
+#ifndef _EFL_UI_VIDEO_LEGACY_EO_CLASS_TYPE
+#define _EFL_UI_VIDEO_LEGACY_EO_CLASS_TYPE
+
+typedef Eo Efl_Ui_Video_Legacy;
+
+#endif
+
+#ifndef _EFL_UI_VIDEO_LEGACY_EO_TYPES
+#define _EFL_UI_VIDEO_LEGACY_EO_TYPES
+
+
+#endif
+
+#endif
index 12d1923895609075f8eb8a60483f76b50b250d52..2a3b3948d47a7b0826f9b28d997eba6480ccc2ac 100644 (file)
@@ -1,5 +1,4 @@
 pub_legacy_eo_files = [
-  'efl_ui_video_legacy.eo',
   'efl_ui_win_legacy.eo',
   'efl_ui_clock_legacy.eo',
   'elm_code_widget_legacy.eo',
@@ -836,6 +835,9 @@ elementary_pub_headers = [
   'efl_ui_textpath_eo.legacy.h',
   'efl_ui_textpath_legacy_eo.h',
   'efl_ui_textpath_legacy_eo.legacy.h',
+  'efl_ui_video_eo.legacy.h',
+  'efl_ui_video_legacy_eo.h',
+  'efl_ui_video_legacy_eo.legacy.h',
   'elm_hoversel_eo.h',
   'elm_hoversel_eo.legacy.h',
   'elm_hoversel_item_eo.h',