diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 401454c0bf..7a3510770a 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -183,7 +183,6 @@ elm_private_eolian_files = \ # Legacy classes - not part of public EO API elm_legacy_eolian_files = \ lib/elementary/efl_ui_clock_legacy.eo \ - lib/elementary/elm_player.eo \ lib/elementary/elm_plug.eo \ lib/elementary/elm_popup.eo \ lib/elementary/elm_route.eo \ @@ -377,6 +376,7 @@ lib/elementary/elm_panel_eo.legacy.c \ lib/elementary/elm_pan_eo.c \ lib/elementary/elm_pan_eo.legacy.c \ lib/elementary/elm_photo_eo.c \ +lib/elementary/elm_player_eo.c \ $(NULL) elm_legacy_eo_headers = \ @@ -538,6 +538,8 @@ lib/elementary/elm_pan_eo.h \ lib/elementary/elm_pan_eo.legacy.h \ lib/elementary/elm_photo_eo.h \ lib/elementary/elm_photo_eo.legacy.h \ +lib/elementary/elm_player_eo.h \ +lib/elementary/elm_player_eo.legacy.h \ $(NULL) diff --git a/src/lib/elementary/elc_player.c b/src/lib/elementary/elc_player.c index 4b41566644..8a386fc9c4 100644 --- a/src/lib/elementary/elc_player.c +++ b/src/lib/elementary/elc_player.c @@ -711,4 +711,4 @@ ELM_PART_CONTENT_DEFAULT_GET(elm_player, "video") ELM_LAYOUT_SIZING_EVAL_OPS(elm_player), \ EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_player) -#include "elm_player.eo.c" +#include "elm_player_eo.c" diff --git a/src/lib/elementary/elm_player.eo b/src/lib/elementary/elm_player.eo deleted file mode 100644 index 12e3b23d4d..0000000000 --- a/src/lib/elementary/elm_player.eo +++ /dev/null @@ -1,28 +0,0 @@ -class Elm.Player extends Efl.Ui.Layout_Base implements Efl.Access.Widget.Action, Efl.Ui.Legacy -{ - [[Elementary player class]] - legacy_prefix: elm_player; - eo_prefix: elm_obj_player; - event_prefix: elm_player; - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.widget_input_event_handler; - Efl.Access.Widget.Action.elm_actions { get; } - Efl.Part.part_get; - } - events { - forward,clicked: void; [[Called when forward was clicked]] - info,clicked: void; [[Called when info was clicked]] - next,clicked: void; [[Called when next was clicked]] - pause,clicked: void; [[Called when pause was clicked]] - play,clicked: void; [[Called when play was clicked]] - prev,clicked: void; [[Called when previous was clicked]] - rewind,clicked: void; [[Called when rewind was clicked]] - quality,clicked: void; [[Called when quality was clicked]] - eject,clicked: void; [[Called when eject was clicked]] - volume,clicked: void; [[Called when volume was clicked]] - mute,clicked: void; [[Called when mute was clicked]] - } -} diff --git a/src/lib/elementary/elm_player_eo.c b/src/lib/elementary/elm_player_eo.c new file mode 100644 index 0000000000..067926faf6 --- /dev/null +++ b/src/lib/elementary/elm_player_eo.c @@ -0,0 +1,73 @@ +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_FORWARD_CLICKED = + EFL_EVENT_DESCRIPTION("forward,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_INFO_CLICKED = + EFL_EVENT_DESCRIPTION("info,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_NEXT_CLICKED = + EFL_EVENT_DESCRIPTION("next,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_PAUSE_CLICKED = + EFL_EVENT_DESCRIPTION("pause,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_PLAY_CLICKED = + EFL_EVENT_DESCRIPTION("play,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_PREV_CLICKED = + EFL_EVENT_DESCRIPTION("prev,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_REWIND_CLICKED = + EFL_EVENT_DESCRIPTION("rewind,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_QUALITY_CLICKED = + EFL_EVENT_DESCRIPTION("quality,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_EJECT_CLICKED = + EFL_EVENT_DESCRIPTION("eject,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_VOLUME_CLICKED = + EFL_EVENT_DESCRIPTION("volume,clicked"); +EWAPI const Efl_Event_Description _ELM_PLAYER_EVENT_MUTE_CLICKED = + EFL_EVENT_DESCRIPTION("mute,clicked"); + +Efl_Object *_elm_player_efl_object_constructor(Eo *obj, Elm_Player_Data *pd); + + +Eina_Error _elm_player_efl_ui_widget_theme_apply(Eo *obj, Elm_Player_Data *pd); + + +Eina_Bool _elm_player_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Player_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source); + + +const Efl_Access_Action_Data *_elm_player_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Player_Data *pd); + + +Efl_Object *_elm_player_efl_part_part_get(const Eo *obj, Elm_Player_Data *pd, const char *name); + + +static Eina_Bool +_elm_player_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_PLAYER_EXTRA_OPS +#define ELM_PLAYER_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_player_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_player_efl_ui_widget_theme_apply), + EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_player_efl_ui_widget_widget_input_event_handler), + EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_player_efl_access_widget_action_elm_actions_get), + EFL_OBJECT_OP_FUNC(efl_part_get, _elm_player_efl_part_part_get), + ELM_PLAYER_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_player_class_desc = { + EO_VERSION, + "Elm.Player", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Player_Data), + _elm_player_class_initializer, + _elm_player_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_player_class_get, &_elm_player_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL); diff --git a/src/lib/elementary/elm_player_eo.h b/src/lib/elementary/elm_player_eo.h new file mode 100644 index 0000000000..8efee210e8 --- /dev/null +++ b/src/lib/elementary/elm_player_eo.h @@ -0,0 +1,112 @@ +#ifndef _ELM_PLAYER_EO_H_ +#define _ELM_PLAYER_EO_H_ + +#ifndef _ELM_PLAYER_EO_CLASS_TYPE +#define _ELM_PLAYER_EO_CLASS_TYPE + +typedef Eo Elm_Player; + +#endif + +#ifndef _ELM_PLAYER_EO_TYPES +#define _ELM_PLAYER_EO_TYPES + + +#endif +/** Elementary player class + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_CLASS elm_player_class_get() + +EWAPI const Efl_Class *elm_player_class_get(void); + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_FORWARD_CLICKED; + +/** Called when forward was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_FORWARD_CLICKED (&(_ELM_PLAYER_EVENT_FORWARD_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_INFO_CLICKED; + +/** Called when info was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_INFO_CLICKED (&(_ELM_PLAYER_EVENT_INFO_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_NEXT_CLICKED; + +/** Called when next was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_NEXT_CLICKED (&(_ELM_PLAYER_EVENT_NEXT_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_PAUSE_CLICKED; + +/** Called when pause was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_PAUSE_CLICKED (&(_ELM_PLAYER_EVENT_PAUSE_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_PLAY_CLICKED; + +/** Called when play was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_PLAY_CLICKED (&(_ELM_PLAYER_EVENT_PLAY_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_PREV_CLICKED; + +/** Called when previous was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_PREV_CLICKED (&(_ELM_PLAYER_EVENT_PREV_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_REWIND_CLICKED; + +/** Called when rewind was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_REWIND_CLICKED (&(_ELM_PLAYER_EVENT_REWIND_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_QUALITY_CLICKED; + +/** Called when quality was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_QUALITY_CLICKED (&(_ELM_PLAYER_EVENT_QUALITY_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_EJECT_CLICKED; + +/** Called when eject was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_EJECT_CLICKED (&(_ELM_PLAYER_EVENT_EJECT_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_VOLUME_CLICKED; + +/** Called when volume was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_VOLUME_CLICKED (&(_ELM_PLAYER_EVENT_VOLUME_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_PLAYER_EVENT_MUTE_CLICKED; + +/** Called when mute was clicked + * + * @ingroup Elm_Player + */ +#define ELM_PLAYER_EVENT_MUTE_CLICKED (&(_ELM_PLAYER_EVENT_MUTE_CLICKED)) + +#endif diff --git a/src/lib/elementary/elm_player_eo.legacy.h b/src/lib/elementary/elm_player_eo.legacy.h new file mode 100644 index 0000000000..dfbd115a15 --- /dev/null +++ b/src/lib/elementary/elm_player_eo.legacy.h @@ -0,0 +1,17 @@ +#ifndef _ELM_PLAYER_EO_LEGACY_H_ +#define _ELM_PLAYER_EO_LEGACY_H_ + +#ifndef _ELM_PLAYER_EO_CLASS_TYPE +#define _ELM_PLAYER_EO_CLASS_TYPE + +typedef Eo Elm_Player; + +#endif + +#ifndef _ELM_PLAYER_EO_TYPES +#define _ELM_PLAYER_EO_TYPES + + +#endif + +#endif diff --git a/src/lib/elementary/elm_widget_player.h b/src/lib/elementary/elm_widget_player.h index 3bc4f204b9..ace9128e88 100644 --- a/src/lib/elementary/elm_widget_player.h +++ b/src/lib/elementary/elm_widget_player.h @@ -3,7 +3,7 @@ #include "Elementary.h" -#include "elm_player.eo.h" +#include "elm_player_eo.h" /* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index ac8c7cedc0..3dab5717e9 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -1,6 +1,5 @@ pub_legacy_eo_files = [ 'efl_ui_clock_legacy.eo', - 'elm_player.eo', 'elm_plug.eo', 'elm_popup.eo', 'elm_route.eo', @@ -781,6 +780,8 @@ elementary_pub_headers = [ 'elm_pan_eo.legacy.h', 'elm_photo_eo.h', 'elm_photo_eo.legacy.h', + 'elm_player_eo.h', + 'elm_player_eo.legacy.h', ] elementary_header_src = [