2014-07-18 05:38:25 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2017-12-18 04:08:25 -08:00
|
|
|
#define EFL_UI_SCROLLBAR_PROTECTED
|
2018-05-03 16:34:17 -07:00
|
|
|
#define EFL_PART_PROTECTED
|
2019-08-16 16:17:57 -07:00
|
|
|
#define EFL_UI_FACTORY_PROTECTED
|
2018-05-03 16:34:17 -07:00
|
|
|
|
|
|
|
#include "eo_internal.h"
|
2017-12-12 02:11:11 -08:00
|
|
|
|
2014-07-18 05:38:25 -07:00
|
|
|
#include <Efl.h>
|
|
|
|
|
2016-06-23 03:33:34 -07:00
|
|
|
#include "interfaces/efl_config.eo.c"
|
2014-08-07 04:51:36 -07:00
|
|
|
#include "interfaces/efl_control.eo.c"
|
2017-12-10 21:50:22 -08:00
|
|
|
#include "interfaces/efl_duplicate.eo.c"
|
2018-04-19 04:26:59 -07:00
|
|
|
#include "interfaces/efl_gfx_image.eo.c"
|
2019-01-29 02:16:34 -08:00
|
|
|
#include "interfaces/efl_gfx_frame_controller.eo.c"
|
2018-04-19 04:26:59 -07:00
|
|
|
#include "interfaces/efl_gfx_image_load_controller.eo.c"
|
2016-05-18 11:20:09 -07:00
|
|
|
#include "interfaces/efl_part.eo.c"
|
2018-01-16 03:31:15 -08:00
|
|
|
#include "interfaces/efl_playable.eo.c"
|
2014-08-06 03:55:36 -07:00
|
|
|
#include "interfaces/efl_player.eo.c"
|
2014-07-24 09:42:09 -07:00
|
|
|
#include "interfaces/efl_text.eo.c"
|
2017-05-22 07:36:41 -07:00
|
|
|
#include "interfaces/efl_text_font.eo.c"
|
|
|
|
#include "interfaces/efl_text_style.eo.c"
|
|
|
|
#include "interfaces/efl_text_format.eo.c"
|
2017-06-08 03:07:12 -07:00
|
|
|
#include "interfaces/efl_text_cursor.eo.c"
|
2017-06-08 06:08:28 -07:00
|
|
|
#include "interfaces/efl_text_annotate.eo.c"
|
2017-09-25 09:21:21 -07:00
|
|
|
#include "interfaces/efl_text_markup.eo.c"
|
2019-01-28 08:10:40 -08:00
|
|
|
#include "interfaces/efl_text_markup_interactive.eo.c"
|
2015-04-03 07:14:54 -07:00
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
#include "interfaces/efl_gfx_entity.eo.c"
|
2016-03-02 03:46:11 -08:00
|
|
|
#include "interfaces/efl_gfx_buffer.eo.c"
|
2015-04-03 07:23:22 -07:00
|
|
|
#include "interfaces/efl_gfx_stack.eo.c"
|
2015-04-03 07:23:24 -07:00
|
|
|
#include "interfaces/efl_gfx_fill.eo.c"
|
2015-04-03 07:23:26 -07:00
|
|
|
#include "interfaces/efl_gfx_view.eo.c"
|
2019-05-22 11:16:16 -07:00
|
|
|
#include "interfaces/efl_gfx_image_orientable.eo.c"
|
2015-04-03 07:23:26 -07:00
|
|
|
|
2017-11-08 02:04:26 -08:00
|
|
|
#include "interfaces/efl_gfx_text_class.eo.c"
|
|
|
|
#include "interfaces/efl_gfx_size_class.eo.c"
|
|
|
|
|
2016-05-10 07:06:04 -07:00
|
|
|
#include "interfaces/efl_gfx_gradient.eo.c"
|
2015-04-03 07:23:16 -07:00
|
|
|
#include "interfaces/efl_gfx_gradient_linear.eo.c"
|
|
|
|
#include "interfaces/efl_gfx_gradient_radial.eo.c"
|
2015-04-03 07:30:39 -07:00
|
|
|
|
2015-06-17 00:26:30 -07:00
|
|
|
#include "interfaces/efl_gfx_filter.eo.c"
|
2017-12-14 00:23:46 -08:00
|
|
|
#include "interfaces/efl_gfx_blur.eo.c"
|
2015-06-17 00:26:30 -07:00
|
|
|
|
2019-02-21 09:19:45 -08:00
|
|
|
#include "interfaces/efl_gfx_hint.eo.c"
|
2018-03-26 06:21:21 -07:00
|
|
|
#include "interfaces/efl_canvas_scene.eo.c"
|
2017-12-05 21:34:51 -08:00
|
|
|
#include "interfaces/efl_canvas_pointer.eo.c"
|
2016-06-02 01:18:17 -07:00
|
|
|
|
2016-05-31 23:47:31 -07:00
|
|
|
#include "interfaces/efl_screen.eo.c"
|
|
|
|
|
2016-04-28 01:08:14 -07:00
|
|
|
/* Packing & containers */
|
2016-04-19 22:55:26 -07:00
|
|
|
#include "interfaces/efl_container.eo.c"
|
2017-11-19 22:41:07 -08:00
|
|
|
#include "interfaces/efl_content.eo.c"
|
2016-04-11 22:08:35 -07:00
|
|
|
#include "interfaces/efl_pack.eo.c"
|
2016-04-19 01:43:28 -07:00
|
|
|
#include "interfaces/efl_pack_layout.eo.c"
|
2016-04-11 22:08:35 -07:00
|
|
|
#include "interfaces/efl_pack_linear.eo.c"
|
2017-12-18 21:13:58 -08:00
|
|
|
#include "interfaces/efl_pack_table.eo.c"
|
2019-04-24 06:41:39 -07:00
|
|
|
#include "interfaces/efl_gfx_arrangement.eo.c"
|
2016-05-10 03:36:13 -07:00
|
|
|
#include "interfaces/efl_model.eo.c"
|
2018-11-23 02:30:36 -08:00
|
|
|
#include "interfaces/efl_interpolator.eo.c"
|
2018-12-21 14:13:40 -08:00
|
|
|
#include "interfaces/efl_ui_i18n.eo.c"
|
2019-05-24 09:30:31 -07:00
|
|
|
#include "interfaces/efl_ui_layout_orientable.eo.c"
|
2017-05-30 07:13:02 -07:00
|
|
|
#include "interfaces/efl_ui_drag.eo.c"
|
2019-01-21 07:22:32 -08:00
|
|
|
#include "interfaces/efl_ui_range_display.eo.c"
|
|
|
|
#include "interfaces/efl_ui_range_interactive.eo.c"
|
2017-05-16 04:43:58 -07:00
|
|
|
#include "interfaces/efl_ui_autorepeat.eo.c"
|
2017-01-31 12:17:58 -08:00
|
|
|
#include "interfaces/efl_ui_view.eo.c"
|
|
|
|
#include "interfaces/efl_ui_factory.eo.c"
|
2019-08-16 15:59:36 -07:00
|
|
|
#include "interfaces/efl_ui_property_bind.eo.c"
|
2019-01-31 03:59:19 -08:00
|
|
|
#include "interfaces/efl_ui_factory_bind.eo.c"
|
2016-04-06 22:40:10 -07:00
|
|
|
|
2017-08-02 11:32:30 -07:00
|
|
|
#include "interfaces/efl_ui_draggable.eo.c"
|
|
|
|
#include "interfaces/efl_ui_scrollable.eo.c"
|
2017-12-18 04:08:25 -08:00
|
|
|
#include "interfaces/efl_ui_scrollbar.eo.c"
|
efl_ui_selectable: split this up
i dont know why, but something got badly mixed up, the selection APIs
for text and item ended up in the same interface, which seems ... weird
?
This commit splits that up into container_selectable and
text_selectable, there is no future plan on my list for text_selection.
The rest of this series is working towards removing
container_selectable, replacing it with a new interface. However, the
interface will stay until list_view is replaced.
The changes in the legacy code are removing the efl.ui.selection
interface from it, item emission is not depending on the inherited
interfaces, additionally, this interface does not provide any API, so
this should not be an issue.
ref T7766
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9498
2019-08-05 09:35:13 -07:00
|
|
|
#include "interfaces/efl_ui_container_selectable.eo.c"
|
|
|
|
#include "interfaces/efl_ui_text_selectable.eo.c"
|
2019-08-06 10:55:40 -07:00
|
|
|
|
2017-08-02 11:32:30 -07:00
|
|
|
#include "interfaces/efl_ui_zoom.eo.c"
|
|
|
|
|
2018-12-06 16:38:47 -08:00
|
|
|
#include "interfaces/efl_cached_item.eo.c"
|
|
|
|
|
2018-05-03 16:34:17 -07:00
|
|
|
static void
|
|
|
|
_noref_death(void *data EINA_UNUSED, const Efl_Event *event)
|
|
|
|
{
|
|
|
|
efl_event_callback_del(event->object, EFL_EVENT_NOREF, _noref_death, NULL);
|
|
|
|
efl_del(event->object);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Efl_Object *
|
|
|
|
efl_part(const Eo *obj, const char *name)
|
|
|
|
{
|
|
|
|
Efl_Object *r;
|
|
|
|
|
|
|
|
r = efl_part_get(obj, name);
|
|
|
|
if (!r) return NULL;
|
|
|
|
|
|
|
|
efl_event_callback_add(r, EFL_EVENT_NOREF, _noref_death, NULL);
|
2018-06-10 07:30:07 -07:00
|
|
|
|
|
|
|
//ensure that the parts that we have here are never leaked
|
|
|
|
//by checking theire references and ownership details
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(efl_parent_get(r), r);
|
|
|
|
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_ref_count(r) == 1, r);
|
|
|
|
|
2018-05-03 16:34:17 -07:00
|
|
|
___efl_auto_unref_set(r, EINA_TRUE);
|
|
|
|
|
|
|
|
return efl_ref(r);
|
|
|
|
}
|
|
|
|
|
2016-04-06 22:40:10 -07:00
|
|
|
EAPI void
|
|
|
|
__efl_internal_init(void)
|
|
|
|
{
|
2016-04-20 13:07:53 -07:00
|
|
|
efl_model_init();
|
2016-04-06 22:40:10 -07:00
|
|
|
}
|
2018-12-07 15:51:09 -08:00
|
|
|
|
|
|
|
static Eina_Value
|
|
|
|
_efl_ui_view_factory_item_created(Eo *factory, void *data EINA_UNUSED, const Eina_Value v)
|
|
|
|
{
|
|
|
|
Efl_Ui_Factory_Item_Created_Event event = { NULL, NULL };
|
2019-08-15 20:45:09 -07:00
|
|
|
int len, i;
|
2018-12-07 15:51:09 -08:00
|
|
|
|
2019-08-15 20:45:09 -07:00
|
|
|
EINA_VALUE_ARRAY_FOREACH(&v, len, i, event.item)
|
|
|
|
{
|
|
|
|
event.model = efl_ui_view_model_get(event.item);
|
2018-12-07 15:51:09 -08:00
|
|
|
|
2019-08-15 20:45:09 -07:00
|
|
|
efl_event_callback_call(factory, EFL_UI_FACTORY_EVENT_CREATED, &event);
|
|
|
|
}
|
2018-12-07 15:51:09 -08:00
|
|
|
|
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
2019-08-16 15:59:36 -07:00
|
|
|
static Eina_Future *
|
|
|
|
_efl_ui_view_factory_create_with_event(Efl_Ui_Factory *factory, Eina_Iterator *models, Efl_Gfx_Entity *parent)
|
2018-12-07 15:51:09 -08:00
|
|
|
{
|
2019-08-15 20:45:09 -07:00
|
|
|
return efl_future_then(factory, efl_ui_factory_create(factory, models, parent),
|
|
|
|
.success_type = EINA_VALUE_TYPE_ARRAY,
|
2018-12-07 15:51:09 -08:00
|
|
|
.success = _efl_ui_view_factory_item_created);
|
|
|
|
}
|
2019-08-16 15:59:36 -07:00
|
|
|
|
|
|
|
#include "efl_ui_view_factory.eo.c"
|