2019-04-28 03:28:55 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <Efl_Ui.h>
|
|
|
|
#include "elm_priv.h"
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
#include "efl_ui_spotlight_plain_manager.eo.h"
|
2019-04-28 03:28:55 -07:00
|
|
|
|
|
|
|
typedef struct {
|
2019-07-04 16:02:43 -07:00
|
|
|
Efl_Ui_Spotlight_Container * container;
|
2019-04-28 03:28:55 -07:00
|
|
|
Eina_Size2D page_size;
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
Efl_Ui_Widget *current_content;
|
2020-01-21 02:32:34 -08:00
|
|
|
Efl_Gfx_Entity *clipper;
|
2019-04-28 03:28:55 -07:00
|
|
|
Eina_Bool animation;
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
double last_pos;
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
} Efl_Ui_Spotlight_Plain_Manager_Data;
|
2019-04-28 03:28:55 -07:00
|
|
|
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
#define MY_CLASS EFL_UI_SPOTLIGHT_PLAIN_MANAGER_CLASS
|
2019-04-28 03:28:55 -07:00
|
|
|
|
|
|
|
static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_emit_position(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Plain_Manager_Data *pd)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
double absolut_position = efl_pack_index_get(pd->container, pd->current_content);
|
2020-05-09 01:25:21 -07:00
|
|
|
if (!EINA_DBL_EQ(pd->last_pos, absolut_position))
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &absolut_position);
|
|
|
|
|
|
|
|
pd->last_pos = absolut_position;
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_geom_sync(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Plain_Manager_Data *pd)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
Efl_Gfx_Entity *entity = pd->current_content;
|
2019-11-20 07:45:45 -08:00
|
|
|
Eina_Rect group_pos = efl_gfx_entity_geometry_get(pd->container);
|
2019-04-28 03:28:55 -07:00
|
|
|
Eina_Rect goal = EINA_RECT_EMPTY();
|
|
|
|
|
|
|
|
goal.size = pd->page_size;
|
|
|
|
goal.y = (group_pos.y + group_pos.h/2)-pd->page_size.h/2;
|
|
|
|
goal.x = (group_pos.x + group_pos.w/2)-pd->page_size.w/2;
|
2020-01-21 02:32:34 -08:00
|
|
|
efl_gfx_entity_geometry_set(pd->clipper, goal);
|
2019-04-28 03:28:55 -07:00
|
|
|
efl_gfx_entity_geometry_set(entity, goal);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd, Efl_Ui_Spotlight_Container *spotlight)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
2019-11-20 07:45:45 -08:00
|
|
|
if (spotlight)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
Efl_Ui_Widget *index;
|
2019-04-28 03:28:55 -07:00
|
|
|
|
2019-07-04 16:02:43 -07:00
|
|
|
pd->container = spotlight;
|
2019-04-28 03:28:55 -07:00
|
|
|
|
2020-01-21 02:32:34 -08:00
|
|
|
pd->clipper = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
|
|
|
|
evas_object_evas_get(spotlight));
|
|
|
|
evas_object_static_clip_set(pd->clipper, EINA_TRUE);
|
|
|
|
efl_canvas_group_member_add(spotlight, pd->clipper);
|
|
|
|
|
2019-07-04 16:02:43 -07:00
|
|
|
for (int i = 0; i < efl_content_count(spotlight) ; ++i) {
|
|
|
|
Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i);
|
2020-01-21 02:32:34 -08:00
|
|
|
efl_key_data_set(elem, "_elm_leaveme", spotlight);
|
|
|
|
efl_canvas_object_clipper_set(elem, pd->clipper);
|
2019-10-28 09:40:17 -07:00
|
|
|
efl_canvas_group_member_add(pd->container, elem);
|
2019-04-28 03:28:55 -07:00
|
|
|
efl_gfx_entity_visible_set(elem, EINA_FALSE);
|
|
|
|
}
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
index = efl_ui_spotlight_active_element_get(spotlight);
|
|
|
|
if (index)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
|
|
|
pd->current_content = index;
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
efl_gfx_entity_visible_set(pd->current_content, EINA_TRUE);
|
2019-04-28 03:28:55 -07:00
|
|
|
_geom_sync(obj, pd);
|
|
|
|
_emit_position(obj, pd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_content_changed(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
if (efl_ui_spotlight_active_element_get(pd->container) != pd->current_content)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
Efl_Ui_Widget *old_current_content = pd->current_content;
|
|
|
|
pd->current_content = efl_ui_spotlight_active_element_get(pd->container);
|
|
|
|
efl_gfx_entity_visible_set(old_current_content, EINA_FALSE);
|
|
|
|
efl_gfx_entity_visible_set(pd->current_content, EINA_TRUE);
|
2019-04-28 03:28:55 -07:00
|
|
|
_geom_sync(obj, pd);
|
|
|
|
}
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
_emit_position(obj, pd);
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_ui_spotlight_manager_content_add(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
2020-01-21 02:32:34 -08:00
|
|
|
efl_key_data_set(subobj, "_elm_leaveme", pd->container);
|
|
|
|
efl_canvas_object_clipper_set(subobj, pd->clipper);
|
2019-10-28 09:40:17 -07:00
|
|
|
efl_canvas_group_member_add(pd->container, subobj);
|
2019-04-28 03:28:55 -07:00
|
|
|
efl_gfx_entity_visible_set(subobj, EINA_FALSE);
|
|
|
|
_content_changed(obj, pd);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_ui_spotlight_manager_content_del(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
2020-01-21 02:32:34 -08:00
|
|
|
efl_key_data_set(subobj, "_elm_leaveme", NULL);
|
|
|
|
efl_canvas_object_clipper_set(subobj, NULL);
|
2019-10-28 09:40:17 -07:00
|
|
|
efl_canvas_group_member_remove(pd->container, subobj);
|
2019-12-09 12:02:26 -08:00
|
|
|
if (pd->current_content == subobj)
|
|
|
|
pd->current_content = NULL;
|
2019-04-28 03:28:55 -07:00
|
|
|
_content_changed(obj, pd);
|
|
|
|
}
|
|
|
|
EOLIAN static void
|
2020-02-14 08:37:42 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_ui_spotlight_manager_switch_to(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd, int from EINA_UNUSED, int to, Efl_Ui_Spotlight_Manager_Switch_Reason reason EINA_UNUSED)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
|
|
|
Efl_Gfx_Entity *to_obj, *from_obj;
|
|
|
|
to_obj = efl_pack_content_get(pd->container, to);
|
|
|
|
from_obj = efl_pack_content_get(pd->container, from);
|
|
|
|
if (from_obj)
|
|
|
|
{
|
|
|
|
efl_gfx_entity_visible_set(from_obj, EINA_FALSE);
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
pd->current_content = NULL;
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (to_obj)
|
|
|
|
{
|
|
|
|
efl_gfx_entity_visible_set(to_obj, EINA_TRUE);
|
efl_ui_spotlight: migrate from active_index to active_element
after playing arround with the widget, we found out that it feels quite
weird to have a index, where most of the time you work with widgets.
We might want to add syntax suger in the future to make it easier to
just jump to the next element, or to the previous, but that still is to
be decided.
The event and the communication to the spotlight manager are still left
to be used with the index, reason for this is, that we might need to
fill there an invalid pointer, if a deletion is triggering an animation,
which seems quite weird. That needs further discussing.
Docx have been updated, the sitemarks about the shifting of the
active_index can be removed, as the element is not subject of change
during content adds/deletes.
ref T7991
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9813
2019-09-02 01:26:40 -07:00
|
|
|
pd->current_content = efl_pack_content_get(pd->container, to);
|
2019-04-28 03:28:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
_emit_position(obj, pd);
|
|
|
|
_geom_sync(obj, pd);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_ui_spotlight_manager_size_set(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd, Eina_Size2D size)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
|
|
|
pd->page_size = size;
|
|
|
|
_geom_sync(obj, pd);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_object_destructor(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd EINA_UNUSED)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
|
|
|
efl_destructor(efl_super(obj, MY_CLASS));
|
|
|
|
|
|
|
|
for (int i = 0; i < efl_content_count(pd->container); ++i)
|
|
|
|
{
|
|
|
|
Efl_Gfx_Stack *elem = efl_pack_content_get(pd->container, i);
|
|
|
|
efl_gfx_entity_visible_set(elem, EINA_TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_ui_spotlight_manager_animated_transition_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Plain_Manager_Data *pd, Eina_Bool animation)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
|
|
|
pd->animation = animation;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_ui_spotlight_manager_animated_transition_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Plain_Manager_Data *pd)
|
2019-04-28 03:28:55 -07:00
|
|
|
{
|
|
|
|
return pd->animation;
|
|
|
|
}
|
|
|
|
|
2020-01-21 02:32:34 -08:00
|
|
|
EOLIAN static void
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
_efl_ui_spotlight_plain_manager_efl_object_invalidate(Eo *obj, Efl_Ui_Spotlight_Plain_Manager_Data *pd)
|
2020-01-21 02:32:34 -08:00
|
|
|
{
|
|
|
|
efl_del(pd->clipper);
|
|
|
|
|
|
|
|
for (int i = 0; i < efl_content_count(pd->container); ++i)
|
|
|
|
{
|
|
|
|
efl_canvas_object_clipper_set(efl_pack_content_get(pd->container, i), NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
efl_invalidate(efl_super(obj, MY_CLASS));
|
|
|
|
}
|
2019-04-28 03:28:55 -07:00
|
|
|
|
efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon
However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator
However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11142
2020-01-22 19:55:12 -08:00
|
|
|
#include "efl_ui_spotlight_plain_manager.eo.c"
|