2016-10-11 19:31:17 -07:00
|
|
|
#define EFL_CANVAS_GROUP_PROTECTED
|
|
|
|
|
2019-03-15 03:42:41 -07:00
|
|
|
#include "eo_internal.h"
|
2013-06-20 03:53:29 -07:00
|
|
|
#include "evas_common_private.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
#include "evas_private.h"
|
|
|
|
|
2016-06-17 01:26:08 -07:00
|
|
|
#define MY_CLASS EFL_CANVAS_GROUP_CLASS
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2013-11-07 03:16:01 -08:00
|
|
|
#define MY_CLASS_NAME "Evas_Smart"
|
|
|
|
#define MY_CLASS_NAME_LEGACY "Evas_Object_Smart"
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2016-06-16 01:33:42 -07:00
|
|
|
#define EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, ...) \
|
2019-01-31 12:06:46 -08:00
|
|
|
Evas_Smart_Data *o = efl_data_scope_safe_get(eo_obj, MY_CLASS); \
|
2019-10-14 06:29:43 -07:00
|
|
|
do { if (!o) { ERR("calling smart object API on non-smart object!"); return __VA_ARGS__; } } while (0)
|
2016-06-16 01:33:42 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
extern Eina_Hash* signals_hash_table;
|
|
|
|
|
2013-02-09 23:52:17 -08:00
|
|
|
static Eina_Hash *_evas_smart_class_names_hash_table = NULL;
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
struct _Evas_Smart_Data
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-04-06 23:11:56 -07:00
|
|
|
struct {
|
2017-09-13 00:38:33 -07:00
|
|
|
Eina_Rectangle bounding_box;
|
2013-04-06 23:11:56 -07:00
|
|
|
} cur, prev;
|
2013-02-12 00:58:59 -08:00
|
|
|
Evas_Object *object;
|
2020-01-21 02:28:59 -08:00
|
|
|
Evas_Object *filter_img;
|
2002-11-08 00:02:15 -08:00
|
|
|
void *engine_data;
|
2008-04-30 22:48:03 -07:00
|
|
|
void *data;
|
2013-04-11 13:45:15 -07:00
|
|
|
Eina_Inlist *callbacks;
|
2013-04-01 01:27:54 -07:00
|
|
|
Eina_Inlist *contained; /** list of smart member objects */
|
2013-02-11 23:59:53 -08:00
|
|
|
|
2016-11-25 17:47:34 -08:00
|
|
|
void *render_cache;
|
2013-02-11 23:59:53 -08:00
|
|
|
/* ptr array + data blob holding all interfaces private data for
|
|
|
|
* this object */
|
|
|
|
void **interface_privates;
|
2013-02-12 00:58:59 -08:00
|
|
|
Eina_Clist calc_entry;
|
2013-02-11 23:59:53 -08:00
|
|
|
|
2010-01-11 06:24:41 -08:00
|
|
|
Evas_Smart_Cb_Description_Array callbacks_descriptions;
|
2013-02-11 23:59:53 -08:00
|
|
|
|
2017-08-31 22:50:29 -07:00
|
|
|
int x, y;
|
2008-04-30 22:48:03 -07:00
|
|
|
int walking_list;
|
2013-04-01 01:27:54 -07:00
|
|
|
int member_count; /** number of smart member objects */
|
2013-02-12 00:58:59 -08:00
|
|
|
|
2016-02-02 02:25:28 -08:00
|
|
|
unsigned short recalculate_cycle;
|
2013-02-12 00:58:59 -08:00
|
|
|
|
2015-11-19 03:37:07 -08:00
|
|
|
Evas_BiDi_Direction paragraph_direction : 2;
|
|
|
|
Eina_Bool inherit_paragraph_direction : 1;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool deletions_waiting : 1;
|
|
|
|
Eina_Bool need_recalculate : 1;
|
2012-06-07 00:10:36 -07:00
|
|
|
Eina_Bool update_boundingbox_needed : 1;
|
2017-02-15 03:07:11 -08:00
|
|
|
Eina_Bool group_del_called : 1;
|
2017-09-05 20:13:58 -07:00
|
|
|
Eina_Bool clipped : 1; /* If true, smart clipped */
|
2017-08-31 23:21:22 -07:00
|
|
|
Eina_Bool data_nofree : 1; /* If true, do NOT free the data */
|
2017-09-05 18:31:08 -07:00
|
|
|
Eina_Bool constructed : 1; /* constructor finished */
|
2019-10-14 06:29:37 -07:00
|
|
|
Eina_Bool cb_move : 1; /* has "move" cb added */
|
|
|
|
Eina_Bool cb_resize : 1; /* has "resize" cb added */
|
|
|
|
Eina_Bool cb_restack : 1; /* has "restack" cb added */
|
2019-10-14 06:29:57 -07:00
|
|
|
Eina_Bool cb_member_added : 1; /* has "member,added" cb added */
|
|
|
|
Eina_Bool cb_member_removed : 1; /* has "member,removed" cb added */
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
2013-04-11 13:45:15 -07:00
|
|
|
typedef struct
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-04-11 13:45:15 -07:00
|
|
|
EINA_INLIST;
|
2011-04-12 02:23:57 -07:00
|
|
|
Evas_Smart_Cb func;
|
2013-04-11 13:45:15 -07:00
|
|
|
void *data;
|
2016-08-10 07:23:04 -07:00
|
|
|
const Efl_Event_Description *event;
|
2013-04-11 13:45:15 -07:00
|
|
|
} _eo_evas_smart_cb_info;
|
|
|
|
|
2013-09-05 01:15:58 -07:00
|
|
|
|
|
|
|
typedef struct _Evas_Object_Smart_Iterator Evas_Object_Smart_Iterator;
|
|
|
|
struct _Evas_Object_Smart_Iterator
|
|
|
|
{
|
|
|
|
Eina_Iterator iterator;
|
|
|
|
|
|
|
|
const Eina_Inlist *current;
|
|
|
|
Evas_Object *parent;
|
|
|
|
};
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_eo_evas_smart_cb(void *data, const Efl_Event *event)
|
2013-04-11 13:45:15 -07:00
|
|
|
{
|
|
|
|
_eo_evas_smart_cb_info *info = data;
|
2016-05-18 08:17:36 -07:00
|
|
|
if (info->func) info->func(info->data, event->object, event->info);
|
2013-04-11 13:45:15 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/* private methods for smart objects */
|
2013-07-08 17:46:15 -07:00
|
|
|
static void evas_object_smart_render(Evas_Object *eo_obj,
|
2017-05-12 15:03:05 -07:00
|
|
|
Evas_Object_Protected_Data *obj,
|
|
|
|
void *type_private_data,
|
|
|
|
void *engine, void *output, void *context, void *surface,
|
|
|
|
int x, int y, Eina_Bool do_async);
|
2013-07-08 17:46:15 -07:00
|
|
|
static void evas_object_smart_render_pre(Evas_Object *eo_obj,
|
|
|
|
Evas_Object_Protected_Data *obj,
|
|
|
|
void *type_private_data);
|
|
|
|
static void evas_object_smart_render_post(Evas_Object *eo_obj,
|
|
|
|
Evas_Object_Protected_Data *obj,
|
|
|
|
void *type_private_data);
|
2012-10-08 18:58:41 -07:00
|
|
|
|
|
|
|
static void *evas_object_smart_engine_data_get(Evas_Object *eo_obj);
|
2016-06-17 01:26:08 -07:00
|
|
|
static void _efl_canvas_group_group_paragraph_direction_set_internal(Eo *eo_obj,
|
2015-11-19 03:37:07 -08:00
|
|
|
Evas_BiDi_Direction dir);
|
2008-08-25 22:45:04 -07:00
|
|
|
|
2007-05-06 04:29:37 -07:00
|
|
|
static const Evas_Object_Func object_func =
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
/* methods (compulsory) */
|
2012-10-08 18:58:41 -07:00
|
|
|
NULL,
|
2011-05-07 01:01:42 -07:00
|
|
|
evas_object_smart_render,
|
|
|
|
evas_object_smart_render_pre,
|
|
|
|
evas_object_smart_render_post,
|
|
|
|
evas_object_smart_engine_data_get,
|
|
|
|
/* these are optional. NULL = nothing */
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2018-09-03 17:08:26 -07:00
|
|
|
NULL // render_prepare
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
2017-09-05 18:31:08 -07:00
|
|
|
/* helpers */
|
|
|
|
static inline Evas_Object *
|
|
|
|
_smart_clipper_get(Evas_Smart_Data *o)
|
|
|
|
{
|
2017-09-05 20:13:58 -07:00
|
|
|
Evas_Object_Smart_Clipped_Data *cso = o->clipped ? o->data : NULL;
|
2017-09-05 18:31:08 -07:00
|
|
|
return cso ? cso->clipper : NULL;
|
|
|
|
}
|
2010-11-26 02:01:18 -08:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/* public funcs */
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2016-06-16 22:30:44 -07:00
|
|
|
evas_object_smart_data_set(Evas_Object *eo_obj, void *data)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-06-16 22:30:44 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
|
2017-08-31 23:21:22 -07:00
|
|
|
if (o->data != data)
|
|
|
|
{
|
|
|
|
if (o->data && !o->data_nofree)
|
|
|
|
free(o->data);
|
|
|
|
o->data = data;
|
|
|
|
o->data_nofree = EINA_TRUE;
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void *
|
2016-06-16 22:30:44 -07:00
|
|
|
evas_object_smart_data_get(const Evas_Object *eo_obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-06-16 22:30:44 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
|
2014-03-10 02:55:22 -07:00
|
|
|
return o->data;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API const void *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_interface_get(const Evas_Object *eo_obj,
|
2012-07-04 14:23:03 -07:00
|
|
|
const char *name)
|
|
|
|
{
|
|
|
|
Evas_Smart *s;
|
2012-08-06 09:19:25 -07:00
|
|
|
unsigned int i;
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2017-08-02 04:28:09 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
|
2012-10-08 18:58:41 -07:00
|
|
|
s = evas_object_smart_smart_get(eo_obj);
|
2012-08-06 17:57:09 -07:00
|
|
|
if (!s) return NULL;
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2017-07-28 05:07:39 -07:00
|
|
|
for (i = 0; i < s->interfaces.size; i++)
|
2012-07-04 14:23:03 -07:00
|
|
|
{
|
2017-07-28 05:07:39 -07:00
|
|
|
const Evas_Smart_Interface *iface;
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2017-07-28 05:07:39 -07:00
|
|
|
iface = s->interfaces.array[i];
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2017-07-28 05:07:39 -07:00
|
|
|
if (iface->name == name)
|
|
|
|
return iface;
|
2012-07-04 14:23:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_interface_data_get(const Evas_Object *eo_obj,
|
2012-07-04 14:23:03 -07:00
|
|
|
const Evas_Smart_Interface *iface)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
Evas_Smart *s;
|
|
|
|
|
2017-08-02 04:28:09 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
|
2012-10-08 18:58:41 -07:00
|
|
|
s = evas_object_smart_smart_get(eo_obj);
|
2012-08-06 17:57:09 -07:00
|
|
|
if (!s) return NULL;
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (s)
|
2012-07-04 14:23:03 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
for (i = 0; i < s->interfaces.size; i++)
|
|
|
|
{
|
|
|
|
if (iface == s->interfaces.array[i])
|
2017-08-02 04:28:09 -07:00
|
|
|
return o->interface_privates[i];
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
2012-07-04 14:23:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API Evas_Smart*
|
2016-06-17 01:26:08 -07:00
|
|
|
evas_object_smart_smart_get(const Efl_Canvas_Group *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2016-06-16 21:42:09 -07:00
|
|
|
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, NULL);
|
2014-03-10 02:55:22 -07:00
|
|
|
return obj->smart.smart;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
2005-05-21 19:49:50 -07:00
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_add(Evas_Object *eo_obj, Evas_Object *smart_obj)
|
|
|
|
{
|
2016-06-17 01:26:08 -07:00
|
|
|
efl_canvas_group_member_add(smart_obj, eo_obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2019-02-11 11:13:33 -08:00
|
|
|
static void
|
|
|
|
_evas_object_smart_member_cache_invalidate(Evas_Object_Protected_Data *obj, Evas_Smart_Data *sd)
|
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *member;
|
|
|
|
Evas_Smart_Data *msd;
|
|
|
|
|
|
|
|
obj->parent_cache.pass_events_valid = EINA_FALSE;
|
|
|
|
obj->parent_cache.freeze_events_valid = EINA_FALSE;
|
|
|
|
obj->parent_cache.src_invisible_valid = EINA_FALSE;
|
|
|
|
if (!sd) return;
|
|
|
|
|
|
|
|
EINA_INLIST_FOREACH(sd->contained, member)
|
|
|
|
{
|
|
|
|
if (member->is_smart)
|
|
|
|
msd = efl_data_scope_get(member->object, MY_CLASS);
|
|
|
|
else msd = NULL;
|
|
|
|
_evas_object_smart_member_cache_invalidate(member, msd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Object *eo_obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
|
|
|
|
2017-08-31 22:29:10 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *smart = efl_data_scope_get(smart_obj, EFL_CANVAS_OBJECT_CLASS);
|
2016-05-06 17:01:10 -07:00
|
|
|
Evas_Smart_Data *member_o = NULL;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2016-08-14 19:40:31 -07:00
|
|
|
if ((!obj) || (!smart)) return;
|
2006-07-30 07:30:24 -07:00
|
|
|
if (obj->delete_me)
|
|
|
|
{
|
2013-12-25 19:22:05 -08:00
|
|
|
CRI("Adding deleted object %p to smart obj %p", eo_obj, smart_obj);
|
2011-05-07 01:01:42 -07:00
|
|
|
return;
|
2006-07-30 07:30:24 -07:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if (smart->delete_me)
|
2006-07-30 07:30:24 -07:00
|
|
|
{
|
2013-12-25 19:22:05 -08:00
|
|
|
CRI("Adding object %p to deleted smart obj %p", eo_obj, smart_obj);
|
2011-05-07 01:01:42 -07:00
|
|
|
return;
|
2006-07-30 07:30:24 -07:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!smart->layer)
|
2009-10-07 05:47:01 -07:00
|
|
|
{
|
2013-12-25 19:22:05 -08:00
|
|
|
CRI("No evas surface associated with smart object (%p)", smart_obj);
|
2011-05-07 01:01:42 -07:00
|
|
|
return;
|
2009-10-07 05:47:01 -07:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((obj->layer && smart->layer) &&
|
|
|
|
(obj->layer->evas != smart->layer->evas))
|
2009-03-17 10:45:37 -07:00
|
|
|
{
|
2013-12-25 19:22:05 -08:00
|
|
|
CRI("Adding object %p from Evas (%p) from another Evas (%p)", eo_obj, obj->layer->evas, smart->layer->evas);
|
2011-05-07 01:01:42 -07:00
|
|
|
return;
|
2009-03-17 10:45:37 -07:00
|
|
|
}
|
|
|
|
|
2006-07-30 07:30:24 -07:00
|
|
|
if (obj->smart.parent == smart_obj) return;
|
2009-09-03 22:13:19 -07:00
|
|
|
|
2015-02-10 03:44:38 -08:00
|
|
|
evas_object_async_block(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->smart.parent) evas_object_smart_member_del(eo_obj);
|
2009-03-17 10:45:37 -07:00
|
|
|
|
2017-03-06 06:01:07 -08:00
|
|
|
if (obj->layer != smart->layer)
|
|
|
|
{
|
|
|
|
if (obj->in_layer)
|
|
|
|
evas_object_release(eo_obj, obj, 1);
|
2017-03-08 22:45:03 -08:00
|
|
|
else if (obj->layer && ((--obj->layer->usage) == 0))
|
2017-03-06 06:01:07 -08:00
|
|
|
evas_layer_del(obj->layer);
|
|
|
|
}
|
|
|
|
else if (obj->in_layer)
|
|
|
|
{
|
|
|
|
evas_object_release(eo_obj, obj, 1);
|
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->layer = smart->layer;
|
2017-03-06 06:01:07 -08:00
|
|
|
obj->layer->usage++;
|
|
|
|
if (obj->layer->layer != obj->cur->layer)
|
2013-03-12 05:58:19 -07:00
|
|
|
{
|
2017-03-06 06:01:07 -08:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
state_write->layer = obj->layer->layer;
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
2013-03-12 05:58:19 -07:00
|
|
|
}
|
|
|
|
|
2017-03-06 06:01:07 -08:00
|
|
|
o->member_count++;
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->smart.parent = smart_obj;
|
2016-05-06 16:47:07 -07:00
|
|
|
obj->smart.parent_data = o;
|
|
|
|
obj->smart.parent_object_data = smart;
|
2008-10-17 04:23:18 -07:00
|
|
|
o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj));
|
2019-02-11 11:13:33 -08:00
|
|
|
|
|
|
|
if (obj->is_smart) member_o = efl_data_scope_get(eo_obj, MY_CLASS);
|
|
|
|
_evas_object_smart_member_cache_invalidate(obj, member_o);
|
2005-10-26 19:44:36 -07:00
|
|
|
obj->restack = 1;
|
2015-11-19 03:37:07 -08:00
|
|
|
|
|
|
|
if (obj->is_smart)
|
|
|
|
{
|
|
|
|
if ((member_o->inherit_paragraph_direction) &&
|
|
|
|
(member_o->paragraph_direction != o->paragraph_direction))
|
|
|
|
{
|
|
|
|
member_o->paragraph_direction = o->paragraph_direction;
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_paragraph_direction_set_internal(eo_obj, o->paragraph_direction);
|
2015-11-19 03:37:07 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-16 01:09:37 -08:00
|
|
|
if (!smart->is_frame_top && (smart->is_frame != obj->is_frame))
|
|
|
|
efl_canvas_object_is_frame_object_set(eo_obj, smart->is_frame);
|
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
if (o->clipped)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
Evas_Object *clipper = _smart_clipper_get(o);
|
2019-02-27 10:17:37 -08:00
|
|
|
Eina_Bool had_clippees = evas_object_clipees_has(clipper);
|
2017-09-05 18:31:08 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
if (EINA_UNLIKELY(!clipper && !o->constructed))
|
|
|
|
{
|
|
|
|
_evas_object_smart_clipped_init(smart_obj);
|
|
|
|
clipper = _smart_clipper_get(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (clipper != eo_obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(clipper);
|
2019-02-27 10:17:37 -08:00
|
|
|
efl_canvas_object_clipper_set(eo_obj, clipper);
|
2017-09-06 05:26:57 -07:00
|
|
|
if (!had_clippees && smart->cur->visible)
|
2018-04-05 01:47:26 -07:00
|
|
|
efl_gfx_entity_visible_set(clipper, 1);
|
2017-09-06 05:26:57 -07:00
|
|
|
}
|
2017-09-05 18:31:08 -07:00
|
|
|
}
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
|
|
|
if (smart->smart.smart && smart->smart.smart->smart_class->member_add)
|
|
|
|
smart->smart.smart->smart_class->member_add(smart_obj, eo_obj);
|
2016-05-06 17:01:10 -07:00
|
|
|
evas_object_update_bounding_box(eo_obj, obj, member_o);
|
2019-10-14 06:29:57 -07:00
|
|
|
if (o->cb_member_added)
|
|
|
|
efl_event_callback_call(smart_obj, EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED, eo_obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_del(Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2018-05-23 23:12:02 -07:00
|
|
|
Evas_Object_Protected_Data *obj;
|
|
|
|
|
|
|
|
if (!eo_obj) return ;
|
|
|
|
obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj) return;
|
|
|
|
if (!obj->smart.parent) return;
|
|
|
|
Evas_Object *smart_obj = obj->smart.parent;
|
2019-02-27 10:17:28 -08:00
|
|
|
efl_canvas_group_member_remove(smart_obj, eo_obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static void
|
2019-10-14 06:29:57 -07:00
|
|
|
_efl_canvas_group_group_member_remove(Eo *smart_obj, Evas_Smart_Data *sd, Evas_Object *eo_obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2017-08-31 22:29:10 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2017-09-05 18:31:08 -07:00
|
|
|
Evas_Object_Protected_Data *smart;
|
2019-02-11 11:13:33 -08:00
|
|
|
Evas_Smart_Data *member_o = NULL, *o;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2017-08-31 22:29:10 -07:00
|
|
|
if (!obj || !obj->smart.parent) return;
|
2008-04-30 22:48:03 -07:00
|
|
|
|
2015-02-10 03:44:38 -08:00
|
|
|
evas_object_async_block(obj);
|
2017-09-05 18:31:08 -07:00
|
|
|
|
2019-10-14 06:29:57 -07:00
|
|
|
if (sd->cb_member_removed)
|
|
|
|
efl_event_callback_call(smart_obj, EFL_CANVAS_GROUP_EVENT_MEMBER_REMOVED, eo_obj);
|
2019-02-27 10:17:22 -08:00
|
|
|
|
2017-09-05 18:31:08 -07:00
|
|
|
smart = efl_data_scope_get(smart_obj, EFL_CANVAS_OBJECT_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (smart->smart.smart && smart->smart.smart->smart_class->member_del)
|
|
|
|
smart->smart.smart->smart_class->member_del(smart_obj, eo_obj);
|
2008-10-24 19:49:19 -07:00
|
|
|
|
2017-09-05 18:31:08 -07:00
|
|
|
o = efl_data_scope_get(smart_obj, MY_CLASS);
|
|
|
|
|
2017-09-05 20:13:58 -07:00
|
|
|
if (o->clipped)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
Evas_Object *clipper = _smart_clipper_get(o);
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(clipper);
|
2019-02-27 10:17:37 -08:00
|
|
|
efl_canvas_object_clipper_set(eo_obj, NULL);
|
|
|
|
if (!evas_object_clipees_has(clipper))
|
2018-04-05 01:47:26 -07:00
|
|
|
efl_gfx_entity_visible_set(clipper, 0);
|
2017-09-05 18:31:08 -07:00
|
|
|
}
|
|
|
|
|
2008-10-17 04:23:18 -07:00
|
|
|
o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj));
|
2012-05-06 19:11:35 -07:00
|
|
|
o->member_count--;
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->smart.parent = NULL;
|
2019-02-11 11:13:33 -08:00
|
|
|
|
|
|
|
if (obj->is_smart) member_o = efl_data_scope_get(eo_obj, MY_CLASS);
|
|
|
|
_evas_object_smart_member_cache_invalidate(obj, member_o);
|
2013-03-12 05:58:19 -07:00
|
|
|
|
2017-03-06 06:01:07 -08:00
|
|
|
if (obj->layer->layer != obj->cur->layer)
|
2013-03-12 05:58:19 -07:00
|
|
|
{
|
2017-03-06 06:01:07 -08:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
state_write->layer = obj->layer->layer;
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
2013-03-12 05:58:19 -07:00
|
|
|
}
|
|
|
|
|
2015-11-19 03:37:07 -08:00
|
|
|
if (obj->is_smart)
|
|
|
|
{
|
|
|
|
if ((member_o->inherit_paragraph_direction) &&
|
|
|
|
(member_o->paragraph_direction != EVAS_BIDI_DIRECTION_NEUTRAL))
|
|
|
|
{
|
|
|
|
member_o->paragraph_direction = EVAS_BIDI_DIRECTION_NEUTRAL;
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_paragraph_direction_set_internal(eo_obj, EVAS_BIDI_DIRECTION_NEUTRAL);
|
2015-11-19 03:37:07 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-06 06:01:07 -08:00
|
|
|
if (EINA_UNLIKELY(obj->in_layer))
|
|
|
|
{
|
|
|
|
ERR("Invalid internal state of object %p (child marked as being a"
|
|
|
|
"top-level object)!", obj->object);
|
|
|
|
evas_object_release(obj->object, obj, 1);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Layer usage shouldn't reach 0 here (as parent is still in layer)
|
|
|
|
obj->layer->usage--;
|
|
|
|
}
|
2017-06-23 14:43:58 -07:00
|
|
|
/* layer may be destroyed in evas_object_release() call */
|
|
|
|
if (obj->layer)
|
|
|
|
evas_object_inject(eo_obj, obj, obj->layer->evas->evas);
|
2005-10-26 19:44:36 -07:00
|
|
|
obj->restack = 1;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API Eina_Bool
|
2016-06-16 01:50:20 -07:00
|
|
|
evas_object_smart_type_check(const Evas_Object *eo_obj, const char *type)
|
2013-02-09 23:52:17 -08:00
|
|
|
{
|
|
|
|
const Evas_Smart_Class *sc;
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl_Class *klass;
|
2014-03-10 02:55:22 -07:00
|
|
|
Eina_Bool type_check = EINA_FALSE;
|
2013-02-09 23:52:17 -08:00
|
|
|
|
2016-06-16 01:50:20 -07:00
|
|
|
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
|
2013-02-09 23:52:17 -08:00
|
|
|
|
|
|
|
klass = eina_hash_find(_evas_smart_class_names_hash_table, type);
|
2016-08-15 06:44:41 -07:00
|
|
|
if (klass) type_check = efl_isa(eo_obj, klass);
|
2013-02-09 23:52:17 -08:00
|
|
|
|
|
|
|
/* Backward compatibility - walk over smart classes and compare type */
|
2014-03-10 02:55:22 -07:00
|
|
|
if (EINA_FALSE == type_check)
|
2013-02-09 23:52:17 -08:00
|
|
|
{
|
|
|
|
if (obj->smart.smart)
|
|
|
|
{
|
|
|
|
sc = obj->smart.smart->smart_class;
|
|
|
|
while (sc)
|
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
if (!strcmp(sc->name, type)) return EINA_TRUE;
|
2013-02-09 23:52:17 -08:00
|
|
|
sc = sc->parent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-03-10 02:55:22 -07:00
|
|
|
|
|
|
|
return type_check;
|
2013-02-09 23:52:17 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API Eina_Bool
|
2016-06-16 01:50:20 -07:00
|
|
|
evas_object_smart_type_check_ptr(const Eo *eo_obj, const char* type)
|
2013-02-09 23:52:17 -08:00
|
|
|
{
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl_Class *klass;
|
2013-02-09 23:52:17 -08:00
|
|
|
const Evas_Smart_Class *sc;
|
2014-03-10 02:55:22 -07:00
|
|
|
Eina_Bool type_check = EINA_FALSE;
|
2013-02-09 23:52:17 -08:00
|
|
|
|
2016-06-16 01:50:20 -07:00
|
|
|
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
|
2013-02-09 23:52:17 -08:00
|
|
|
|
|
|
|
klass = eina_hash_find(_evas_smart_class_names_hash_table, type);
|
2016-08-15 06:44:41 -07:00
|
|
|
if (klass) type_check = efl_isa(eo_obj, klass);
|
2013-02-09 23:52:17 -08:00
|
|
|
|
|
|
|
/* Backward compatibility - walk over smart classes and compare type */
|
2014-03-10 02:55:22 -07:00
|
|
|
if (EINA_FALSE == type_check)
|
2013-02-09 23:52:17 -08:00
|
|
|
{
|
|
|
|
if (obj->smart.smart)
|
|
|
|
{
|
|
|
|
sc = obj->smart.smart->smart_class;
|
|
|
|
while (sc)
|
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
if (sc->name == type) return EINA_TRUE;
|
2013-02-09 23:52:17 -08:00
|
|
|
sc = sc->parent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-03-10 02:55:22 -07:00
|
|
|
|
|
|
|
return type_check;
|
2013-02-09 23:52:17 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2016-08-10 07:23:04 -07:00
|
|
|
evas_smart_legacy_type_register(const char *type, const Efl_Class *klass)
|
2013-02-09 23:52:17 -08:00
|
|
|
{
|
|
|
|
eina_hash_set(_evas_smart_class_names_hash_table, type, klass);
|
|
|
|
}
|
|
|
|
|
2013-09-05 01:15:58 -07:00
|
|
|
static Eina_Bool
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_iterator_next(Evas_Object_Smart_Iterator *it, void **data)
|
2013-09-05 01:15:58 -07:00
|
|
|
{
|
|
|
|
Evas_Object *eo;
|
|
|
|
|
|
|
|
if (!it->current) return EINA_FALSE;
|
|
|
|
|
|
|
|
eo = ((const Evas_Object_Protected_Data*)(it->current))->object;
|
|
|
|
if (data) *data = eo;
|
|
|
|
|
|
|
|
it->current = it->current->next;
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_iterator_get_container(Evas_Object_Smart_Iterator *it)
|
2013-09-05 01:15:58 -07:00
|
|
|
{
|
|
|
|
return it->parent;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_iterator_free(Evas_Object_Smart_Iterator *it)
|
2013-09-05 01:15:58 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_unref(it->parent);
|
2013-09-05 01:15:58 -07:00
|
|
|
free(it);
|
|
|
|
}
|
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
// Should we have an efl_children_iterator_new API and just inherit from it ?
|
2017-09-12 18:56:55 -07:00
|
|
|
// No, because each hierarchy is different (Eo, Smart, Widget) -- jpeg
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static Eina_Iterator*
|
2017-09-12 18:56:55 -07:00
|
|
|
_efl_canvas_group_group_members_iterate(const Eo *eo_obj, Evas_Smart_Data *priv)
|
2013-09-05 01:15:58 -07:00
|
|
|
{
|
|
|
|
Evas_Object_Smart_Iterator *it;
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2013-09-05 01:15:58 -07:00
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
if (!priv->contained) return NULL;
|
2013-09-05 01:15:58 -07:00
|
|
|
|
2015-02-10 03:44:38 -08:00
|
|
|
evas_object_async_block(obj);
|
2013-09-05 01:15:58 -07:00
|
|
|
it = calloc(1, sizeof(Evas_Object_Smart_Iterator));
|
2014-03-10 02:55:22 -07:00
|
|
|
if (!it) return NULL;
|
2013-09-05 01:15:58 -07:00
|
|
|
|
|
|
|
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
|
2016-08-15 06:44:41 -07:00
|
|
|
it->parent = efl_ref(eo_obj);
|
2013-09-05 01:15:58 -07:00
|
|
|
it->current = priv->contained;
|
|
|
|
|
2016-06-17 01:26:08 -07:00
|
|
|
it->iterator.next = FUNC_ITERATOR_NEXT(_efl_canvas_group_group_iterator_next);
|
|
|
|
it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_efl_canvas_group_group_iterator_get_container);
|
|
|
|
it->iterator.free = FUNC_ITERATOR_FREE(_efl_canvas_group_group_iterator_free);
|
2013-09-05 01:15:58 -07:00
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
return &it->iterator;
|
2013-09-05 01:15:58 -07:00
|
|
|
}
|
|
|
|
|
2017-09-12 18:56:55 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_group_group_member_is(const Eo *eo_obj, Evas_Smart_Data *pd EINA_UNUSED, const Eo *sub_obj)
|
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
Evas_Object_Protected_Data *sub = efl_data_scope_safe_get(sub_obj, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
|
|
|
|
evas_object_async_block(obj);
|
|
|
|
|
|
|
|
if (!sub) return EINA_FALSE;
|
|
|
|
return (sub->smart.parent == eo_obj);
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API Eina_List*
|
2016-06-16 22:42:07 -07:00
|
|
|
evas_object_smart_members_get(const Evas_Object *eo_obj)
|
2006-08-02 19:14:53 -07:00
|
|
|
{
|
2016-06-16 22:42:07 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
|
2015-02-10 03:44:38 -08:00
|
|
|
Eina_List *members = NULL;
|
2012-10-08 18:58:41 -07:00
|
|
|
Eina_Inlist *member;
|
2008-04-30 22:48:03 -07:00
|
|
|
|
|
|
|
for (member = o->contained; member; member = member->next)
|
2012-10-08 18:58:41 -07:00
|
|
|
members = eina_list_append(members, ((Evas_Object_Protected_Data *)member)->object);
|
2009-09-03 22:13:19 -07:00
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
return members;
|
2006-08-02 19:14:53 -07:00
|
|
|
}
|
|
|
|
|
2016-11-25 17:47:34 -08:00
|
|
|
void
|
|
|
|
evas_object_smart_render_cache_clear(Evas_Object *eo_obj)
|
|
|
|
{
|
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
|
|
|
if (!o) return;
|
|
|
|
if (!o->render_cache) return;
|
|
|
|
evas_render_object_render_cache_free(eo_obj, o->render_cache);
|
|
|
|
o->render_cache = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
|
|
|
evas_object_smart_render_cache_get(const Evas_Object *eo_obj)
|
|
|
|
{
|
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
|
|
|
if (!o) return NULL;
|
|
|
|
return o->render_cache;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
evas_object_smart_render_cache_set(Evas_Object *eo_obj, void *data)
|
|
|
|
{
|
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
|
|
|
if (!o) return;
|
|
|
|
o->render_cache = data;
|
|
|
|
}
|
|
|
|
|
2008-10-17 04:23:18 -07:00
|
|
|
const Eina_Inlist *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_members_get_direct(const Evas_Object *eo_obj)
|
2008-04-30 22:48:03 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
2016-11-25 17:47:34 -08:00
|
|
|
if (!o) return NULL;
|
2008-04-30 22:48:03 -07:00
|
|
|
return o->contained;
|
|
|
|
}
|
|
|
|
|
2017-08-31 23:21:22 -07:00
|
|
|
static void
|
|
|
|
_efl_canvas_group_group_members_all_del_internal(Evas_Smart_Data *o)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
2018-09-21 00:46:03 -07:00
|
|
|
Evas_Object *clipper;
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object_Protected_Data *memobj;
|
2012-06-13 00:55:24 -07:00
|
|
|
Eina_Inlist *itrn;
|
2017-09-05 18:31:08 -07:00
|
|
|
|
2018-09-21 00:46:03 -07:00
|
|
|
clipper = _smart_clipper_get(o);
|
|
|
|
if (clipper)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
2018-09-21 00:46:03 -07:00
|
|
|
EINA_INLIST_FOREACH_SAFE(o->contained, itrn, memobj)
|
|
|
|
{
|
|
|
|
if (memobj->object != clipper)
|
|
|
|
_evas_wrap_del(&memobj->object, memobj);
|
|
|
|
}
|
|
|
|
_evas_wrap_del(&clipper, efl_data_scope_get(clipper, EFL_CANVAS_OBJECT_CLASS));
|
2017-09-05 18:31:08 -07:00
|
|
|
}
|
2018-09-21 00:46:03 -07:00
|
|
|
|
2017-02-15 03:07:11 -08:00
|
|
|
o->group_del_called = EINA_TRUE;
|
2010-10-06 20:54:51 -07:00
|
|
|
}
|
|
|
|
|
2017-08-31 23:21:22 -07:00
|
|
|
void
|
|
|
|
_efl_canvas_group_group_members_all_del(Evas_Object *eo_obj)
|
|
|
|
{
|
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
|
|
|
_efl_canvas_group_group_members_all_del_internal(o);
|
|
|
|
}
|
|
|
|
|
2012-07-04 14:23:03 -07:00
|
|
|
static void
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_smart_class_ifaces_private_data_alloc(Evas_Object *eo_obj,
|
2012-07-04 14:23:03 -07:00
|
|
|
Evas_Smart *s)
|
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *obj;
|
2012-07-04 14:23:03 -07:00
|
|
|
const Evas_Smart_Class *sc;
|
|
|
|
unsigned char *ptr;
|
2013-02-11 23:59:53 -08:00
|
|
|
unsigned int i, total_priv_sz = 0;
|
2012-07-04 14:23:03 -07:00
|
|
|
|
|
|
|
/* get total size of interfaces private data */
|
|
|
|
for (sc = s->smart_class; sc; sc = sc->parent)
|
|
|
|
{
|
|
|
|
const Evas_Smart_Interface **ifaces_array = sc->interfaces;
|
|
|
|
if (!ifaces_array) continue;
|
|
|
|
|
|
|
|
while (*ifaces_array)
|
|
|
|
{
|
|
|
|
const Evas_Smart_Interface *iface = *ifaces_array;
|
|
|
|
|
|
|
|
if (!iface->name) break;
|
|
|
|
|
|
|
|
if (iface->private_size > 0)
|
|
|
|
{
|
|
|
|
unsigned int size = iface->private_size;
|
|
|
|
|
|
|
|
if (size % sizeof(void *) != 0)
|
|
|
|
size += sizeof(void *) - (size % sizeof(void *));
|
|
|
|
total_priv_sz += size;
|
|
|
|
}
|
|
|
|
|
|
|
|
ifaces_array++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-12 01:47:13 -07:00
|
|
|
if (!s->interfaces.size && !total_priv_sz) return;
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
obj = efl_data_scope_get(eo_obj, MY_CLASS);
|
2013-02-11 23:59:53 -08:00
|
|
|
obj->interface_privates = malloc(s->interfaces.size * sizeof(void *) + total_priv_sz);
|
2012-07-04 14:23:03 -07:00
|
|
|
if (!obj->interface_privates)
|
|
|
|
{
|
|
|
|
ERR("malloc failed!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* make private data array ptrs point to right places, WHICH LIE ON
|
|
|
|
* THE SAME STRUCT, AFTER THE # OF INTERFACES COUNT */
|
|
|
|
ptr = (unsigned char *)(obj->interface_privates + s->interfaces.size);
|
|
|
|
for (i = 0; i < s->interfaces.size; i++)
|
|
|
|
{
|
|
|
|
unsigned int size;
|
|
|
|
|
|
|
|
size = s->interfaces.array[i]->private_size;
|
|
|
|
|
|
|
|
if (size == 0)
|
|
|
|
{
|
|
|
|
obj->interface_privates[i] = NULL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
obj->interface_privates[i] = ptr;
|
|
|
|
memset(ptr, 0, size);
|
|
|
|
|
|
|
|
if (size % sizeof(void *) != 0)
|
|
|
|
size += sizeof(void *) - (size % sizeof(void *));
|
|
|
|
ptr += size;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API Evas_Object *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_add(Evas *eo_e, Evas_Smart *s)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *eo_obj;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2018-08-29 05:11:00 -07:00
|
|
|
eo_e = evas_find(eo_e);
|
2018-08-16 10:01:26 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
|
2019-01-31 12:06:46 -08:00
|
|
|
eo_obj = efl_add(MY_CLASS, eo_e, efl_canvas_object_legacy_ctor(efl_added));
|
2016-06-16 21:42:09 -07:00
|
|
|
evas_object_smart_attach(eo_obj, s);
|
2012-10-08 18:58:41 -07:00
|
|
|
return eo_obj;
|
|
|
|
}
|
|
|
|
|
2015-05-19 03:41:27 -07:00
|
|
|
EOLIAN static Eo *
|
2017-08-31 20:30:49 -07:00
|
|
|
_efl_canvas_group_efl_object_constructor(Eo *eo_obj, Evas_Smart_Data *sd)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2017-09-05 18:31:08 -07:00
|
|
|
Evas_Object_Protected_Data *obj;
|
|
|
|
|
2017-08-31 20:30:49 -07:00
|
|
|
sd->object = eo_obj;
|
|
|
|
sd->inherit_paragraph_direction = EINA_TRUE;
|
2013-02-12 00:58:59 -08:00
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
|
2017-09-05 18:31:08 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
|
|
|
|
|
|
|
|
obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
obj->is_smart = EINA_TRUE;
|
|
|
|
obj->func = &object_func;
|
|
|
|
obj->private_data = efl_data_ref(eo_obj, MY_CLASS);
|
2017-09-06 05:26:57 -07:00
|
|
|
if (sd->clipped && !sd->data)
|
2017-09-05 18:31:08 -07:00
|
|
|
_evas_object_smart_clipped_init(eo_obj);
|
2013-09-24 21:32:56 -07:00
|
|
|
|
2016-06-20 21:26:15 -07:00
|
|
|
efl_canvas_object_type_set(eo_obj, MY_CLASS_NAME_LEGACY);
|
2016-06-17 01:26:08 -07:00
|
|
|
efl_canvas_group_add(eo_obj);
|
2015-05-19 03:41:27 -07:00
|
|
|
|
2017-09-05 18:31:08 -07:00
|
|
|
sd->constructed = EINA_TRUE;
|
2015-05-19 03:41:27 -07:00
|
|
|
return eo_obj;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2017-02-15 03:07:11 -08:00
|
|
|
EOLIAN static void
|
|
|
|
_efl_canvas_group_efl_object_destructor(Eo *eo_obj, Evas_Smart_Data *o)
|
|
|
|
{
|
|
|
|
efl_destructor(efl_super(eo_obj, MY_CLASS));
|
2017-08-31 23:21:22 -07:00
|
|
|
if (o->data && !o->data_nofree)
|
|
|
|
free(o->data);
|
2017-02-15 03:07:11 -08:00
|
|
|
if (!o->group_del_called)
|
|
|
|
{
|
|
|
|
ERR("efl_canvas_group_del() was not called on this object: %p (%s)",
|
|
|
|
eo_obj, efl_class_name_get(eo_obj));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-12 18:54:54 -07:00
|
|
|
EOLIAN static void
|
2017-07-20 23:24:08 -07:00
|
|
|
_efl_canvas_group_efl_object_debug_name_override(Eo *eo_obj, Evas_Smart_Data *o, Eina_Strbuf *sb)
|
2017-07-14 00:55:10 -07:00
|
|
|
{
|
2017-07-26 23:33:22 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
const char *smart_class = NULL;
|
|
|
|
|
|
|
|
if (obj->smart.smart && obj->smart.smart->smart_class)
|
|
|
|
smart_class = obj->smart.smart->smart_class->name;
|
|
|
|
|
2017-10-12 18:54:54 -07:00
|
|
|
efl_debug_name_override(efl_super(eo_obj, MY_CLASS), sb);
|
2017-08-31 22:29:10 -07:00
|
|
|
if (smart_class)
|
|
|
|
{
|
|
|
|
eina_strbuf_append_printf(sb, ":children=%d:smart_class=%s",
|
|
|
|
eina_inlist_count(o->contained), smart_class);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
eina_strbuf_append_printf(sb, ":children=%d", eina_inlist_count(o->contained));
|
|
|
|
}
|
2017-07-14 00:55:10 -07:00
|
|
|
}
|
|
|
|
|
2017-02-20 00:59:50 -08:00
|
|
|
static inline void
|
|
|
|
_evas_object_smart_move_relative_internal(Evas_Smart_Data *o, Evas_Coord dx, Evas_Coord dy)
|
2016-10-10 20:02:20 -07:00
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *child;
|
|
|
|
|
2017-02-20 00:59:50 -08:00
|
|
|
EINA_INLIST_FOREACH(o->contained, child)
|
2016-10-10 20:02:20 -07:00
|
|
|
{
|
|
|
|
Evas_Coord orig_x, orig_y;
|
|
|
|
|
|
|
|
if (child->delete_me) continue;
|
|
|
|
if (child->is_static_clip) continue;
|
|
|
|
orig_x = child->cur->geometry.x;
|
|
|
|
orig_y = child->cur->geometry.y;
|
|
|
|
evas_object_move(child->object, orig_x + dx, orig_y + dy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2017-02-20 00:59:50 -08:00
|
|
|
evas_object_smart_move_children_relative(Eo *eo_obj, Evas_Coord dx, Evas_Coord dy)
|
|
|
|
{
|
2017-08-02 04:28:09 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
|
2017-02-20 00:59:50 -08:00
|
|
|
|
|
|
|
if ((dx == 0) && (dy == 0)) return;
|
|
|
|
_evas_object_smart_move_relative_internal(o, dx, dy);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_evas_object_smart_clipped_smart_move_internal(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y)
|
|
|
|
{
|
2019-01-31 12:06:46 -08:00
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
2017-02-20 00:59:50 -08:00
|
|
|
Evas_Coord orig_x, orig_y;
|
|
|
|
|
|
|
|
orig_x = o->x;
|
|
|
|
orig_y = o->y;
|
|
|
|
o->x = x;
|
|
|
|
o->y = y;
|
|
|
|
_evas_object_smart_move_relative_internal(o, x - orig_x, y - orig_y);
|
|
|
|
}
|
|
|
|
|
2017-08-31 23:35:33 -07:00
|
|
|
void
|
|
|
|
_evas_object_smart_clipped_init(Evas_Object *eo_obj)
|
|
|
|
{
|
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
|
|
|
|
Evas_Object_Smart_Clipped_Data *cso;
|
|
|
|
Evas_Object *clipper;
|
|
|
|
|
|
|
|
// user may realloc this... (legacy only!)
|
|
|
|
cso = o->data;
|
|
|
|
if (!cso)
|
|
|
|
{
|
|
|
|
cso = calloc(1, sizeof(*cso));
|
2017-09-06 05:26:57 -07:00
|
|
|
o->data = cso;
|
2017-08-31 23:35:33 -07:00
|
|
|
o->data_nofree = EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
cso->evas = evas_object_evas_get(eo_obj);
|
|
|
|
clipper = evas_object_rectangle_add(cso->evas);
|
|
|
|
evas_object_static_clip_set(clipper, 1);
|
|
|
|
cso->clipper = clipper;
|
2017-09-06 05:26:57 -07:00
|
|
|
o->clipped = 0;
|
|
|
|
evas_object_smart_member_add(clipper, eo_obj);
|
|
|
|
o->clipped = 1;
|
2017-08-31 23:35:33 -07:00
|
|
|
evas_object_color_set(cso->clipper, 255, 255, 255, 255);
|
|
|
|
evas_object_move(cso->clipper, -100000, -100000);
|
|
|
|
evas_object_resize(cso->clipper, 200000, 200000);
|
|
|
|
evas_object_pass_events_set(cso->clipper, 1);
|
|
|
|
evas_object_hide(cso->clipper); /* show when have something clipped to it */
|
|
|
|
efl_canvas_object_no_render_set(cso->clipper, 1);
|
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static void
|
2017-09-05 18:31:08 -07:00
|
|
|
_efl_canvas_group_group_add(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o EINA_UNUSED)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static void
|
2017-08-31 23:21:22 -07:00
|
|
|
_efl_canvas_group_group_del(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2017-09-05 20:13:58 -07:00
|
|
|
if (o->clipped)
|
2017-08-31 23:21:22 -07:00
|
|
|
{
|
|
|
|
_efl_canvas_group_group_members_all_del_internal(o);
|
|
|
|
}
|
2017-02-15 03:07:11 -08:00
|
|
|
o->group_del_called = EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2016-03-28 01:47:02 -07:00
|
|
|
EOLIAN static void
|
2017-09-05 18:31:08 -07:00
|
|
|
_efl_canvas_group_efl_canvas_object_no_render_set(Eo *eo_obj, Evas_Smart_Data *o, Eina_Bool enable)
|
2016-03-28 01:47:02 -07:00
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *obj2;
|
2017-09-05 18:31:08 -07:00
|
|
|
Eo *clipper;
|
2016-04-05 01:19:55 -07:00
|
|
|
|
2016-09-06 04:02:34 -07:00
|
|
|
enable = !!enable;
|
|
|
|
if (efl_canvas_object_no_render_get(eo_obj) == enable) return;
|
2017-09-05 18:31:08 -07:00
|
|
|
|
2016-09-06 04:02:34 -07:00
|
|
|
efl_canvas_object_no_render_set(efl_super(eo_obj, MY_CLASS), enable);
|
2016-03-28 01:47:02 -07:00
|
|
|
|
2017-09-05 20:13:58 -07:00
|
|
|
clipper = (o->clipped) ? _smart_clipper_get(o) : NULL;
|
2017-09-05 18:31:08 -07:00
|
|
|
EINA_INLIST_FOREACH(o->contained, obj2)
|
|
|
|
{
|
|
|
|
if (obj2->object != clipper)
|
|
|
|
efl_canvas_object_no_render_set(obj2->object, enable);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2017-12-19 23:34:01 -08:00
|
|
|
_efl_canvas_group_efl_gfx_color_color_set(Eo *eo_obj, Evas_Smart_Data *o, int r, int g, int b, int a)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_COLOR_SET, 0, r, g, b, a))
|
|
|
|
return;
|
|
|
|
|
|
|
|
efl_gfx_color_set(efl_super(eo_obj, MY_CLASS), r, g, b, a);
|
|
|
|
|
2017-09-05 20:13:58 -07:00
|
|
|
if (o->clipped)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
Evas_Object *clipper = _smart_clipper_get(o);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(clipper);
|
|
|
|
|
|
|
|
efl_gfx_color_set(clipper, r, g, b, a);
|
|
|
|
// Note: Legacy impl (and Widget) didn't call super in this case...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_canvas_group_efl_gfx_entity_visible_set(Eo *eo_obj, Evas_Smart_Data *o, Eina_Bool vis)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis))
|
|
|
|
return;
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
efl_gfx_entity_visible_set(efl_super(eo_obj, MY_CLASS), vis);
|
2017-09-05 18:31:08 -07:00
|
|
|
|
2017-09-05 20:13:58 -07:00
|
|
|
if (o->clipped)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
Evas_Object *clipper = _smart_clipper_get(o);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(clipper);
|
|
|
|
|
|
|
|
// note: maybe this is not necessary with no_render set on the clipper
|
|
|
|
if (vis && !evas_object_clipees_has(clipper))
|
|
|
|
return;
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
efl_gfx_entity_visible_set(clipper, vis);
|
2017-09-05 18:31:08 -07:00
|
|
|
}
|
2020-01-21 02:28:59 -08:00
|
|
|
|
|
|
|
if (o->filter_img)
|
|
|
|
efl_gfx_entity_visible_set(o->filter_img, vis);
|
2017-09-05 18:31:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_canvas_group_efl_gfx_entity_position_set(Eo *eo_obj, Evas_Smart_Data *o, Eina_Position2D pos)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
2018-08-02 06:10:41 -07:00
|
|
|
Eina_Bool is_overridden;
|
|
|
|
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
|
|
|
|
|
2017-09-14 20:14:32 -07:00
|
|
|
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
|
2017-09-05 18:31:08 -07:00
|
|
|
return;
|
|
|
|
|
2018-08-02 06:10:41 -07:00
|
|
|
is_overridden = (obj->is_smart && obj->smart.smart &&
|
|
|
|
obj->smart.smart->smart_class->move !=
|
|
|
|
(void *)evas_object_smart_clipped_smart_move);
|
|
|
|
|
|
|
|
if (o->clipped && !is_overridden)
|
2017-09-14 20:14:32 -07:00
|
|
|
_evas_object_smart_clipped_smart_move_internal(eo_obj, pos.x, pos.y);
|
2018-04-05 01:47:26 -07:00
|
|
|
efl_gfx_entity_position_set(efl_super(eo_obj, MY_CLASS), pos);
|
2020-02-04 22:11:28 -08:00
|
|
|
if (o->filter_img) efl_gfx_entity_position_set(o->filter_img, pos);
|
2020-01-21 02:28:59 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
|
|
|
_efl_canvas_group_efl_gfx_entity_size_set(Eo *obj, Evas_Smart_Data *o, Eina_Size2D size)
|
|
|
|
{
|
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, size.w, size.h))
|
|
|
|
return;
|
|
|
|
|
|
|
|
efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), size);
|
2020-02-04 22:11:28 -08:00
|
|
|
if (o->filter_img) efl_gfx_entity_size_set(o->filter_img, size);
|
2020-01-21 02:28:59 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
|
|
|
_efl_canvas_group_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Smart_Data *o,
|
|
|
|
const char *code, const char *name)
|
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *obj, *fobj;
|
|
|
|
obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
|
|
|
|
|
|
|
|
if (!code && !name)
|
|
|
|
{
|
|
|
|
if (o->filter_img)
|
|
|
|
{
|
|
|
|
evas_object_del(o->filter_img);
|
|
|
|
o->filter_img = NULL;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (o->filter_img)
|
|
|
|
{
|
|
|
|
efl_gfx_filter_program_set(o->filter_img, code, name);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
o->filter_img = efl_add(EFL_CANVAS_PROXY_CLASS, eo_obj,
|
|
|
|
efl_gfx_fill_auto_set(efl_added, EINA_TRUE),
|
|
|
|
efl_canvas_group_member_add(obj->object, efl_added),
|
|
|
|
efl_canvas_proxy_source_events_set(efl_added, EINA_TRUE),
|
|
|
|
efl_canvas_proxy_source_set(efl_added, eo_obj),
|
|
|
|
evas_object_repeat_events_set(efl_added, EINA_TRUE),
|
|
|
|
efl_gfx_filter_program_set(efl_added, code, name),
|
|
|
|
efl_gfx_entity_geometry_set(efl_added, (Eina_Rect)obj->cur->geometry),
|
|
|
|
efl_gfx_entity_visible_set(efl_added, obj->cur->visible));
|
|
|
|
|
|
|
|
fobj = efl_data_scope_get(o->filter_img, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
if (!fobj) return;
|
|
|
|
fobj->is_filter_object = EINA_TRUE;
|
2017-09-05 18:31:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2019-02-27 10:17:37 -08:00
|
|
|
_efl_canvas_group_efl_canvas_object_clipper_set(Eo *eo_obj, Evas_Smart_Data *o, Evas_Object *clip)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(!clip || efl_isa(clip, EFL_CANVAS_OBJECT_CLASS));
|
|
|
|
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_CLIP_SET, 0, clip))
|
|
|
|
return;
|
|
|
|
|
2019-02-27 10:17:37 -08:00
|
|
|
efl_canvas_object_clipper_set(efl_super(eo_obj, MY_CLASS), clip);
|
2017-09-05 18:31:08 -07:00
|
|
|
|
2017-09-05 20:13:58 -07:00
|
|
|
if (o->clipped)
|
2017-09-05 18:31:08 -07:00
|
|
|
{
|
|
|
|
Evas_Object *clipper = _smart_clipper_get(o);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(clipper);
|
|
|
|
|
2019-02-27 10:17:37 -08:00
|
|
|
efl_canvas_object_clipper_set(clipper, clip);
|
2017-09-05 18:31:08 -07:00
|
|
|
}
|
2016-03-28 01:47:02 -07:00
|
|
|
}
|
|
|
|
|
2016-06-16 21:42:09 -07:00
|
|
|
void
|
|
|
|
evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-06-16 21:42:09 -07:00
|
|
|
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
unsigned int i;
|
2016-06-16 21:42:09 -07:00
|
|
|
|
2018-03-06 17:32:24 -08:00
|
|
|
MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
obj->smart.smart = s;
|
2003-10-08 20:05:17 -07:00
|
|
|
obj->type = s->smart_class->name;
|
2002-11-08 00:02:15 -08:00
|
|
|
evas_object_smart_use(s);
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_smart_class_ifaces_private_data_alloc(eo_obj, s);
|
2012-07-04 14:23:03 -07:00
|
|
|
|
|
|
|
for (i = 0; i < s->interfaces.size; i++)
|
|
|
|
{
|
|
|
|
const Evas_Smart_Interface *iface;
|
|
|
|
|
|
|
|
iface = s->interfaces.array[i];
|
|
|
|
if (iface->add)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!iface->add(eo_obj))
|
2012-07-04 14:23:03 -07:00
|
|
|
{
|
|
|
|
ERR("failed to create interface %s\n", iface->name);
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_del(eo_obj);
|
|
|
|
return;
|
2012-07-04 14:23:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-31 23:35:33 -07:00
|
|
|
//efl_canvas_group_add(eo_obj);
|
|
|
|
if (s->smart_class->add) s->smart_class->add(eo_obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_callback_add(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func, const void *data)
|
2011-08-17 04:55:29 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_callback_priority_add(eo_obj, event,
|
2011-08-17 04:55:29 -07:00
|
|
|
EVAS_CALLBACK_PRIORITY_DEFAULT, func, data);
|
|
|
|
}
|
|
|
|
|
2019-10-14 06:29:37 -07:00
|
|
|
static void
|
|
|
|
_smart_cb_check(Evas_Smart_Data *o, const char *event)
|
|
|
|
{
|
|
|
|
if (!o->cb_move)
|
|
|
|
{
|
|
|
|
if (eina_streq(event, "move"))
|
|
|
|
{
|
|
|
|
o->cb_move = EINA_TRUE;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!o->cb_resize)
|
|
|
|
{
|
|
|
|
if (eina_streq(event, "resize"))
|
|
|
|
{
|
|
|
|
o->cb_resize = EINA_TRUE;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!o->cb_restack)
|
|
|
|
{
|
|
|
|
if (eina_streq(event, "restack"))
|
|
|
|
{
|
|
|
|
o->cb_restack = EINA_TRUE;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_callback_priority_add(Evas_Object *eo_obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2017-08-02 04:28:09 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
|
2013-04-11 13:45:15 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
if (!event) return;
|
|
|
|
if (!func) return;
|
2013-04-11 13:45:15 -07:00
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
const Efl_Event_Description *eo_desc = efl_object_legacy_only_event_description_get(event);
|
2013-04-11 13:45:15 -07:00
|
|
|
_eo_evas_smart_cb_info *cb_info = calloc(1, sizeof(*cb_info));
|
|
|
|
cb_info->func = func;
|
|
|
|
cb_info->data = (void *)data;
|
2014-05-19 07:17:08 -07:00
|
|
|
cb_info->event = eo_desc;
|
2019-10-14 06:29:37 -07:00
|
|
|
_smart_cb_check(o, event);
|
2013-04-11 13:45:15 -07:00
|
|
|
|
|
|
|
o->callbacks = eina_inlist_append(o->callbacks,
|
|
|
|
EINA_INLIST_GET(cb_info));
|
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_priority_add(eo_obj, eo_desc, priority, _eo_evas_smart_cb, cb_info);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_callback_del(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-04-11 13:45:15 -07:00
|
|
|
_eo_evas_smart_cb_info *info;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2017-08-02 04:28:09 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2003-10-17 20:34:00 -07:00
|
|
|
if (!event) return NULL;
|
2017-08-02 04:28:09 -07:00
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
const Efl_Event_Description *eo_desc = efl_object_legacy_only_event_description_get(event);
|
2013-04-11 13:45:15 -07:00
|
|
|
|
|
|
|
EINA_INLIST_FOREACH(o->callbacks, info)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2014-05-19 07:17:08 -07:00
|
|
|
if ((info->func == func) && (info->event == eo_desc))
|
2011-05-07 01:01:42 -07:00
|
|
|
{
|
2013-04-11 13:45:15 -07:00
|
|
|
void *tmp = info->data;
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_del(eo_obj, eo_desc, _eo_evas_smart_cb, info);
|
2013-04-11 13:45:15 -07:00
|
|
|
|
|
|
|
o->callbacks =
|
|
|
|
eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info));
|
|
|
|
free(info);
|
|
|
|
return tmp;
|
2011-05-07 01:01:42 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_callback_del_full(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func, const void *data)
|
2012-01-16 09:25:40 -08:00
|
|
|
{
|
2013-04-11 13:45:15 -07:00
|
|
|
_eo_evas_smart_cb_info *info;
|
2012-01-16 09:25:40 -08:00
|
|
|
|
2017-08-02 04:28:09 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
|
|
|
|
|
2012-01-16 09:25:40 -08:00
|
|
|
if (!event) return NULL;
|
2013-04-11 13:45:15 -07:00
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
const Efl_Event_Description *eo_desc = efl_object_legacy_only_event_description_get(event);
|
2013-04-11 13:45:15 -07:00
|
|
|
|
|
|
|
EINA_INLIST_FOREACH(o->callbacks, info)
|
2012-01-16 09:25:40 -08:00
|
|
|
{
|
2014-05-19 07:17:08 -07:00
|
|
|
if ((info->func == func) && (info->event == eo_desc) && (info->data == data))
|
2012-01-16 09:25:40 -08:00
|
|
|
{
|
2013-04-11 13:45:15 -07:00
|
|
|
void *tmp = info->data;
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_del(eo_obj, eo_desc, _eo_evas_smart_cb, info);
|
2013-04-11 13:45:15 -07:00
|
|
|
|
|
|
|
o->callbacks =
|
|
|
|
eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info));
|
|
|
|
free(info);
|
|
|
|
return tmp;
|
2012-01-16 09:25:40 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_callback_call(Evas_Object *eo_obj, const char *event, void *event_info)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
if (!event) return;
|
2016-08-10 07:23:04 -07:00
|
|
|
const Efl_Event_Description *eo_desc = efl_object_legacy_only_event_description_get(event);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(eo_obj, eo_desc, event_info);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2019-10-14 06:29:37 -07:00
|
|
|
void
|
|
|
|
_evas_object_smart_callback_call_internal(Evas_Object *eo_obj, const Efl_Event_Description *efl_event_desc)
|
|
|
|
{
|
|
|
|
const char *event = NULL;
|
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
|
|
|
|
|
|
|
|
if (efl_event_desc == EFL_GFX_ENTITY_EVENT_POSITION_CHANGED)
|
|
|
|
{
|
|
|
|
if (!o->cb_move) return;
|
|
|
|
event = "move";
|
|
|
|
}
|
|
|
|
else if (efl_event_desc == EFL_GFX_ENTITY_EVENT_SIZE_CHANGED)
|
|
|
|
{
|
|
|
|
if (!o->cb_resize) return;
|
|
|
|
event = "resize";
|
|
|
|
}
|
|
|
|
else if (efl_event_desc == EFL_GFX_ENTITY_EVENT_STACKING_CHANGED)
|
|
|
|
{
|
|
|
|
if (!o->cb_restack) return;
|
|
|
|
event = "restack";
|
|
|
|
}
|
|
|
|
else //invalidate
|
|
|
|
return;
|
|
|
|
const Efl_Event_Description *eo_desc = efl_object_legacy_only_event_description_get(event);
|
|
|
|
efl_event_callback_legacy_call(eo_obj, eo_desc, NULL);
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API Eina_Bool
|
2016-06-16 22:12:02 -07:00
|
|
|
evas_object_smart_callbacks_descriptions_set(Eo *eo_obj, const Evas_Smart_Cb_Description *descriptions)
|
2010-01-11 06:24:41 -08:00
|
|
|
{
|
2016-06-16 22:12:02 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, EINA_FALSE);
|
2012-10-08 18:58:41 -07:00
|
|
|
const Evas_Smart_Cb_Description *d;
|
|
|
|
unsigned int i, count = 0;
|
2010-01-11 06:24:41 -08:00
|
|
|
|
|
|
|
if ((!descriptions) || (!descriptions->name))
|
|
|
|
{
|
2011-05-07 01:01:42 -07:00
|
|
|
evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
|
2014-03-10 02:55:22 -07:00
|
|
|
return EINA_TRUE;
|
2010-01-11 06:24:41 -08:00
|
|
|
}
|
|
|
|
|
2010-08-21 06:52:25 -07:00
|
|
|
for (count = 0, d = descriptions; d->name; d++)
|
2010-01-11 06:24:41 -08:00
|
|
|
count++;
|
|
|
|
|
|
|
|
evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, count);
|
2014-03-10 02:55:22 -07:00
|
|
|
if (count == 0) return EINA_TRUE;
|
2010-04-01 08:56:06 -07:00
|
|
|
|
2010-01-11 06:24:41 -08:00
|
|
|
for (i = 0, d = descriptions; i < count; d++, i++)
|
|
|
|
o->callbacks_descriptions.array[i] = d;
|
|
|
|
|
|
|
|
evas_smart_cb_descriptions_fix(&o->callbacks_descriptions);
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
return EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2016-06-16 22:12:02 -07:00
|
|
|
evas_object_smart_callbacks_descriptions_get(const Eo *eo_obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-06-16 22:12:02 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
|
2010-01-11 06:24:41 -08:00
|
|
|
if (class_descriptions) *class_descriptions = NULL;
|
|
|
|
if (class_count) *class_count = 0;
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->smart.smart && class_descriptions)
|
|
|
|
*class_descriptions = obj->smart.smart->callbacks.array;
|
|
|
|
if (obj->smart.smart && class_count)
|
2010-01-11 06:24:41 -08:00
|
|
|
*class_count = obj->smart.smart->callbacks.size;
|
|
|
|
|
|
|
|
if (instance_descriptions)
|
|
|
|
*instance_descriptions = o->callbacks_descriptions.array;
|
|
|
|
if (instance_count)
|
|
|
|
*instance_count = o->callbacks_descriptions.size;
|
|
|
|
}
|
|
|
|
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API void
|
2016-06-16 22:12:02 -07:00
|
|
|
evas_object_smart_callback_description_find(const Eo *eo_obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-06-16 22:12:02 -07:00
|
|
|
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
|
2010-01-11 06:24:41 -08:00
|
|
|
|
|
|
|
if (!name)
|
|
|
|
{
|
2011-05-07 01:01:42 -07:00
|
|
|
if (class_description) *class_description = NULL;
|
|
|
|
if (instance_description) *instance_description = NULL;
|
|
|
|
return;
|
2010-01-11 06:24:41 -08:00
|
|
|
}
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2010-01-11 06:24:41 -08:00
|
|
|
if (class_description)
|
|
|
|
*class_description = evas_smart_cb_description_find
|
2011-05-07 01:01:42 -07:00
|
|
|
(&obj->smart.smart->callbacks, name);
|
2010-01-11 06:24:41 -08:00
|
|
|
|
|
|
|
if (instance_description)
|
|
|
|
*instance_description = evas_smart_cb_description_find
|
2011-05-07 01:01:42 -07:00
|
|
|
(&o->callbacks_descriptions, name);
|
2010-01-11 06:24:41 -08:00
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_need_recalculate_set(Eo *eo_obj, Evas_Smart_Data *o, Eina_Bool value)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2008-09-06 18:25:49 -07:00
|
|
|
|
2011-08-29 16:45:24 -07:00
|
|
|
// XXX: do i need this?
|
2014-10-12 01:11:26 -07:00
|
|
|
if (!obj || !obj->layer || obj->delete_me) return;
|
2011-10-12 19:22:29 -07:00
|
|
|
|
2015-02-10 03:44:38 -08:00
|
|
|
evas_object_async_block(obj);
|
2011-10-12 19:22:29 -07:00
|
|
|
/* remove this entry from calc_list or processed list */
|
2013-02-12 00:58:59 -08:00
|
|
|
if (eina_clist_element_is_linked(&o->calc_entry))
|
|
|
|
eina_clist_remove(&o->calc_entry);
|
2011-10-12 19:22:29 -07:00
|
|
|
|
2008-09-06 18:25:49 -07:00
|
|
|
value = !!value;
|
2011-08-29 16:45:24 -07:00
|
|
|
if (value)
|
2013-02-12 00:58:59 -08:00
|
|
|
eina_clist_add_tail(&obj->layer->evas->calc_list, &o->calc_entry);
|
2011-11-16 20:31:43 -08:00
|
|
|
else
|
2013-02-12 00:58:59 -08:00
|
|
|
eina_clist_add_tail(&obj->layer->evas->calc_done, &o->calc_entry);
|
2011-10-12 19:22:29 -07:00
|
|
|
|
2016-02-02 01:09:01 -08:00
|
|
|
if (o->need_recalculate == value) return;
|
|
|
|
|
2016-02-02 02:25:28 -08:00
|
|
|
if (o->recalculate_cycle > 16382)
|
2011-07-20 02:14:41 -07:00
|
|
|
{
|
2013-11-19 06:30:56 -08:00
|
|
|
ERR("Object %p is not stable during recalc loop", eo_obj);
|
2011-08-29 16:45:24 -07:00
|
|
|
return;
|
2011-07-20 02:14:41 -07:00
|
|
|
}
|
2013-02-12 00:58:59 -08:00
|
|
|
if (obj->layer->evas->in_smart_calc) o->recalculate_cycle++;
|
2008-09-06 18:25:49 -07:00
|
|
|
o->need_recalculate = value;
|
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_canvas_group_group_need_recalculate_get(const Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
return o->need_recalculate;
|
2008-09-06 18:25:49 -07:00
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_calculate(Eo *eo_obj, Evas_Smart_Data *o)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2008-09-06 18:25:49 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->smart.smart || !obj->smart.smart->smart_class->calculate)
|
2008-12-11 13:55:22 -08:00
|
|
|
return;
|
|
|
|
|
2015-02-10 03:44:38 -08:00
|
|
|
evas_object_async_block(obj);
|
2011-07-07 08:24:16 -07:00
|
|
|
o->need_recalculate = 0;
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->smart.smart->smart_class->calculate(eo_obj);
|
2008-09-06 18:25:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Call calculate() on all smart objects that need_recalculate.
|
|
|
|
*
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_call_smarts_calculate(Evas *eo_e)
|
2008-09-06 18:25:49 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *o;
|
2011-10-12 19:22:29 -07:00
|
|
|
Eina_Clist *elem;
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
|
2008-09-06 18:25:49 -07:00
|
|
|
|
2015-02-10 03:44:38 -08:00
|
|
|
evas_canvas_async_block(e);
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_freeze(eo_e);
|
2011-07-20 02:14:41 -07:00
|
|
|
e->in_smart_calc++;
|
2011-10-12 19:22:29 -07:00
|
|
|
|
|
|
|
while (NULL != (elem = eina_clist_head(&e->calc_list)))
|
2008-09-06 18:25:49 -07:00
|
|
|
{
|
2013-02-12 00:58:59 -08:00
|
|
|
Evas_Object_Protected_Data *obj;
|
2011-10-12 19:22:29 -07:00
|
|
|
|
|
|
|
/* move the item to the processed list */
|
2014-03-10 02:55:22 -07:00
|
|
|
o = EINA_CLIST_ENTRY(elem, Evas_Smart_Data, calc_entry);
|
2013-02-12 00:58:59 -08:00
|
|
|
eina_clist_remove(&o->calc_entry);
|
2016-08-15 06:44:41 -07:00
|
|
|
obj = efl_data_scope_get(o->object, EFL_CANVAS_OBJECT_CLASS);
|
2011-10-12 19:22:29 -07:00
|
|
|
|
2013-02-12 00:58:59 -08:00
|
|
|
if (obj->delete_me) continue;
|
|
|
|
eina_clist_add_tail(&e->calc_done, &o->calc_entry);
|
2011-10-12 19:22:29 -07:00
|
|
|
|
2011-05-07 01:01:42 -07:00
|
|
|
if (o->need_recalculate)
|
|
|
|
{
|
2011-07-07 08:24:16 -07:00
|
|
|
o->need_recalculate = 0;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->smart.smart && obj->smart.smart->smart_class->calculate)
|
|
|
|
obj->smart.smart->smart_class->calculate(obj->object);
|
|
|
|
else
|
2016-06-17 01:26:08 -07:00
|
|
|
efl_canvas_group_calculate(obj->object);
|
2011-05-07 01:01:42 -07:00
|
|
|
}
|
2008-09-06 18:25:49 -07:00
|
|
|
}
|
2011-10-12 19:22:29 -07:00
|
|
|
|
2011-11-16 20:31:43 -08:00
|
|
|
while (NULL != (elem = eina_clist_head(&e->calc_done)))
|
2011-07-20 02:14:41 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
o = EINA_CLIST_ENTRY(elem, Evas_Smart_Data, calc_entry);
|
2013-02-12 00:58:59 -08:00
|
|
|
o->recalculate_cycle = 0;
|
|
|
|
eina_clist_remove(&o->calc_entry);
|
2011-07-20 02:14:41 -07:00
|
|
|
}
|
2011-10-12 19:22:29 -07:00
|
|
|
|
2011-07-20 02:14:41 -07:00
|
|
|
e->in_smart_calc--;
|
2011-08-29 16:45:24 -07:00
|
|
|
if (e->in_smart_calc == 0) e->smart_calc_count++;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_thaw(eo_e);
|
|
|
|
evas_event_thaw_eval(eo_e);
|
2008-09-06 18:25:49 -07:00
|
|
|
}
|
|
|
|
|
2014-03-10 02:55:22 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_change(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2015-02-10 03:44:38 -08:00
|
|
|
evas_object_async_block(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
2016-06-17 01:26:08 -07:00
|
|
|
efl_canvas_group_need_recalculate_set(eo_obj, 1);
|
2008-09-06 18:25:49 -07:00
|
|
|
}
|
|
|
|
|
2013-11-24 23:05:12 -08:00
|
|
|
Eina_Bool
|
2018-10-24 16:29:48 -07:00
|
|
|
evas_object_smart_changed_get(Evas_Object_Protected_Data *obj)
|
2013-07-01 23:28:56 -07:00
|
|
|
{
|
2014-08-06 23:32:39 -07:00
|
|
|
Eina_Bool has_map = EINA_FALSE;
|
2013-07-01 23:28:56 -07:00
|
|
|
|
2016-06-24 02:51:38 -07:00
|
|
|
/* If object is invisible, it's meaningless to figure out changed state
|
|
|
|
for rendering. */
|
|
|
|
|
|
|
|
//a. Object itself visibility
|
2016-10-11 05:08:29 -07:00
|
|
|
if (obj->no_render || (!obj->prev->visible && !obj->cur->visible) ||
|
2016-06-24 02:51:38 -07:00
|
|
|
((obj->prev->color.a == 0) && (obj->cur->color.a == 0)))
|
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
//b. Object clipper visibility
|
2021-03-02 23:44:28 -08:00
|
|
|
if (obj->prev->clipper && obj->cur->clipper)
|
|
|
|
{
|
|
|
|
if (obj->prev->clipper != obj->cur->clipper)
|
|
|
|
{
|
|
|
|
/* check between prev clipper and current clipper */
|
|
|
|
if ((!obj->prev->clipper->cur->visible &&
|
|
|
|
!obj->cur->clipper->cur->visible) ||
|
|
|
|
((obj->prev->clipper->cur->color.a == 0) &&
|
|
|
|
(obj->cur->clipper->cur->color.a == 0)))
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* check between prev value and current value of clipper */
|
|
|
|
if ((!obj->cur->clipper->prev->visible &&
|
|
|
|
!obj->cur->clipper->cur->visible) ||
|
|
|
|
((obj->cur->clipper->prev->color.a == 0) &&
|
|
|
|
(obj->cur->clipper->cur->color.a == 0)))
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
}
|
2013-07-01 23:28:56 -07:00
|
|
|
|
2013-11-24 23:05:12 -08:00
|
|
|
if (!obj->clip.clipees)
|
2013-10-15 06:24:27 -07:00
|
|
|
{
|
2016-01-06 04:52:46 -08:00
|
|
|
has_map = _evas_render_has_map(obj) && !_evas_render_can_map(obj);
|
2014-08-06 23:32:39 -07:00
|
|
|
if (obj->changed && !obj->is_smart && !has_map) return EINA_TRUE;
|
|
|
|
|
|
|
|
if (has_map)
|
2013-11-24 23:05:12 -08:00
|
|
|
{
|
2015-09-10 05:27:47 -07:00
|
|
|
if ((obj->need_surface_clear && obj->changed && !obj->is_smart) ||
|
2020-09-23 20:16:49 -07:00
|
|
|
((obj->changed_pchange) && (obj->changed_map)) ||
|
|
|
|
/* A condition for a rare case which has obj->changed is FALSE,
|
|
|
|
but Efl_Canvas_Vg_Object_Data.changed is TRUE. */
|
|
|
|
(obj->is_vg_object && evas_object_vg_changed_get(obj)))
|
2014-08-06 23:32:39 -07:00
|
|
|
return EINA_TRUE;
|
2013-11-24 23:05:12 -08:00
|
|
|
}
|
2013-10-15 06:24:27 -07:00
|
|
|
}
|
|
|
|
|
2017-02-20 01:07:00 -08:00
|
|
|
if (obj->is_smart)
|
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *o2;
|
|
|
|
|
2018-10-24 16:29:48 -07:00
|
|
|
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj->object), o2)
|
|
|
|
if (evas_object_smart_changed_get(o2)) return EINA_TRUE;
|
2017-02-20 01:07:00 -08:00
|
|
|
}
|
2013-09-29 01:30:55 -07:00
|
|
|
|
|
|
|
return EINA_FALSE;
|
2013-07-01 23:28:56 -07:00
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_del(Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *sobj;
|
2002-11-08 00:02:15 -08:00
|
|
|
Evas_Smart *s;
|
2012-07-04 14:23:03 -07:00
|
|
|
unsigned int i;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2006-10-15 05:15:36 -07:00
|
|
|
if (obj->delete_me) return;
|
2017-02-19 18:11:34 -08:00
|
|
|
|
|
|
|
sobj = efl_data_scope_get(eo_obj, MY_CLASS);
|
2011-07-28 23:49:25 -07:00
|
|
|
s = obj->smart.smart;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (s && s->smart_class->del)
|
2017-02-19 18:11:34 -08:00
|
|
|
{
|
|
|
|
s->smart_class->del(eo_obj);
|
2017-11-19 19:03:52 -08:00
|
|
|
//this is legacy, this will never be called..., smart things dont have inheritance
|
2017-02-19 18:11:34 -08:00
|
|
|
sobj->group_del_called = EINA_TRUE;
|
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
else
|
2016-06-17 01:26:08 -07:00
|
|
|
efl_canvas_group_del(eo_obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->smart.parent) evas_object_smart_member_del(eo_obj);
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (s)
|
2012-07-04 14:23:03 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
for (i = 0; i < s->interfaces.size; i++)
|
|
|
|
{
|
|
|
|
const Evas_Smart_Interface *iface;
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
iface = s->interfaces.array[i];
|
|
|
|
if (iface->del) iface->del(eo_obj);
|
|
|
|
}
|
2012-07-04 14:23:03 -07:00
|
|
|
}
|
|
|
|
|
2013-02-11 23:59:53 -08:00
|
|
|
free(sobj->interface_privates);
|
|
|
|
sobj->interface_privates = NULL;
|
2012-07-04 14:23:03 -07:00
|
|
|
|
2022-03-26 16:03:14 -07:00
|
|
|
sobj->data = NULL;
|
2002-11-08 00:02:15 -08:00
|
|
|
if (s) evas_object_smart_unuse(s);
|
|
|
|
}
|
|
|
|
|
2013-04-06 23:11:56 -07:00
|
|
|
void
|
2017-02-20 02:34:58 -08:00
|
|
|
evas_object_update_bounding_box(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Smart_Data *s)
|
2013-04-06 23:11:56 -07:00
|
|
|
{
|
|
|
|
Eina_Bool propagate = EINA_FALSE;
|
|
|
|
Eina_Bool computeminmax = EINA_FALSE;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
Evas_Coord px, py, pw, ph;
|
|
|
|
Eina_Bool noclip;
|
|
|
|
|
2013-06-20 04:28:18 -07:00
|
|
|
if (!obj->smart.parent) return;
|
2013-04-07 07:44:44 -07:00
|
|
|
|
2013-06-20 04:28:18 -07:00
|
|
|
if (obj->child_has_map) return; /* Disable bounding box computation for this object and its parent */
|
2013-04-06 23:11:56 -07:00
|
|
|
/* We could also remove object that are not visible from the bounding box, use the clipping information
|
|
|
|
to reduce the bounding of the object they are clipping, but for the moment this will do it's jobs */
|
|
|
|
noclip = !(obj->clip.clipees || obj->is_static_clip);
|
|
|
|
|
|
|
|
if (obj->is_smart)
|
|
|
|
{
|
2017-02-20 02:34:58 -08:00
|
|
|
if (!s) s = obj->private_data;
|
2013-04-06 23:11:56 -07:00
|
|
|
|
|
|
|
x = s->cur.bounding_box.x;
|
|
|
|
y = s->cur.bounding_box.y;
|
|
|
|
w = s->cur.bounding_box.w;
|
|
|
|
h = s->cur.bounding_box.h;
|
|
|
|
px = s->prev.bounding_box.x;
|
|
|
|
py = s->prev.bounding_box.y;
|
|
|
|
pw = s->prev.bounding_box.w;
|
|
|
|
ph = s->prev.bounding_box.h;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
x = obj->cur->geometry.x;
|
|
|
|
y = obj->cur->geometry.y;
|
|
|
|
w = obj->cur->geometry.w;
|
|
|
|
h = obj->cur->geometry.h;
|
|
|
|
px = obj->prev->geometry.x;
|
|
|
|
py = obj->prev->geometry.y;
|
|
|
|
pw = obj->prev->geometry.w;
|
|
|
|
ph = obj->prev->geometry.h;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We are not yet trying to find the smallest bounding box, but we want to find a good approximation quickly.
|
|
|
|
* That's why we initialiaze min and max search to geometry of the parent object.
|
|
|
|
*/
|
2016-05-06 17:01:10 -07:00
|
|
|
Evas_Object_Protected_Data *smart_obj = obj->smart.parent_object_data;
|
|
|
|
Evas_Smart_Data *smart_parent = obj->smart.parent_data;
|
2013-04-06 23:11:56 -07:00
|
|
|
if (!smart_parent || !smart_obj) return;
|
|
|
|
|
|
|
|
if (smart_obj->cur->valid_bounding_box)
|
|
|
|
{
|
|
|
|
/* Update left limit */
|
|
|
|
if (noclip && x < smart_parent->cur.bounding_box.x)
|
|
|
|
{
|
2016-07-04 23:40:12 -07:00
|
|
|
smart_parent->cur.bounding_box.w += smart_parent->cur.bounding_box.x - x;
|
|
|
|
smart_parent->cur.bounding_box.x = x;
|
2013-04-06 23:11:56 -07:00
|
|
|
|
|
|
|
propagate = EINA_TRUE;
|
|
|
|
}
|
|
|
|
else if ((px == smart_parent->prev.bounding_box.x &&
|
2016-07-04 23:40:12 -07:00
|
|
|
x > smart_parent->cur.bounding_box.x)
|
2013-04-06 23:11:56 -07:00
|
|
|
|| (!noclip && x == smart_parent->cur.bounding_box.x))
|
|
|
|
{
|
|
|
|
computeminmax = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Update top limit */
|
|
|
|
if (noclip && y < smart_parent->cur.bounding_box.y)
|
|
|
|
{
|
2016-02-02 04:14:43 -08:00
|
|
|
smart_parent->cur.bounding_box.h += smart_parent->cur.bounding_box.y - y;
|
|
|
|
smart_parent->cur.bounding_box.y = y;
|
2013-04-06 23:11:56 -07:00
|
|
|
|
|
|
|
propagate = EINA_TRUE;
|
|
|
|
}
|
|
|
|
else if ((py == smart_parent->prev.bounding_box.y &&
|
2016-07-04 23:40:12 -07:00
|
|
|
y > smart_parent->cur.bounding_box.y)
|
2013-04-06 23:11:56 -07:00
|
|
|
|| (!noclip && y == smart_parent->cur.bounding_box.y))
|
|
|
|
{
|
|
|
|
computeminmax = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Update right limit */
|
|
|
|
if (noclip && x + w > smart_parent->cur.bounding_box.x + smart_parent->cur.bounding_box.w)
|
|
|
|
{
|
2016-07-04 23:40:12 -07:00
|
|
|
smart_parent->cur.bounding_box.w = x + w - smart_parent->cur.bounding_box.x;
|
2013-04-06 23:11:56 -07:00
|
|
|
propagate = EINA_TRUE;
|
|
|
|
}
|
|
|
|
else if ((px + pw == smart_parent->prev.bounding_box.x + smart_parent->prev.bounding_box.w &&
|
|
|
|
x + w < smart_parent->cur.bounding_box.x + smart_parent->cur.bounding_box.w)
|
|
|
|
|| (!noclip && x + w == smart_parent->cur.bounding_box.x + smart_parent->cur.bounding_box.w))
|
|
|
|
{
|
|
|
|
computeminmax = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Update bottom limit */
|
|
|
|
if (noclip && y + h > smart_parent->cur.bounding_box.y + smart_parent->cur.bounding_box.h)
|
|
|
|
{
|
2016-07-04 23:40:12 -07:00
|
|
|
smart_parent->cur.bounding_box.h = y + h - smart_parent->cur.bounding_box.y;
|
2013-04-06 23:11:56 -07:00
|
|
|
|
|
|
|
propagate = EINA_TRUE;
|
|
|
|
}
|
|
|
|
else if ((py + ph == smart_parent->prev.bounding_box.y + smart_parent->prev.bounding_box.h &&
|
|
|
|
y + h < smart_parent->cur.bounding_box.y + smart_parent->cur.bounding_box.h) ||
|
|
|
|
(!noclip && y + h == smart_parent->cur.bounding_box.y + smart_parent->cur.bounding_box.h))
|
|
|
|
{
|
|
|
|
computeminmax = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
2016-07-04 23:40:12 -07:00
|
|
|
if (computeminmax)
|
2013-04-06 23:11:56 -07:00
|
|
|
{
|
2017-02-20 02:34:58 -08:00
|
|
|
evas_object_smart_need_bounding_box_update(obj->smart.parent_data,
|
2016-05-06 16:47:07 -07:00
|
|
|
obj->smart.parent_object_data);
|
2013-04-06 23:11:56 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (noclip)
|
|
|
|
{
|
2016-07-04 23:40:12 -07:00
|
|
|
smart_parent->cur.bounding_box.x = x;
|
|
|
|
smart_parent->cur.bounding_box.y = y;
|
|
|
|
smart_parent->cur.bounding_box.w = w;
|
|
|
|
smart_parent->cur.bounding_box.h = h;
|
2013-04-06 23:11:56 -07:00
|
|
|
|
2016-07-04 23:40:12 -07:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(smart_obj, smart_write, cur)
|
|
|
|
smart_write->valid_bounding_box = EINA_TRUE;
|
|
|
|
EINA_COW_STATE_WRITE_END(smart_obj, smart_write, cur);
|
2013-04-06 23:11:56 -07:00
|
|
|
|
|
|
|
propagate = EINA_TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (propagate)
|
2016-05-06 17:01:10 -07:00
|
|
|
evas_object_update_bounding_box(obj->smart.parent, smart_obj, smart_parent);
|
2013-04-06 23:11:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-02-20 02:34:58 -08:00
|
|
|
evas_object_smart_bounding_box_get(Evas_Object_Protected_Data *obj,
|
2017-09-13 00:38:33 -07:00
|
|
|
Eina_Rectangle *cur_bounding_box,
|
|
|
|
Eina_Rectangle *prev_bounding_box)
|
2013-04-06 23:11:56 -07:00
|
|
|
{
|
2017-02-20 02:34:58 -08:00
|
|
|
Evas_Smart_Data *s = obj->private_data;
|
2013-04-06 23:11:56 -07:00
|
|
|
|
|
|
|
if (cur_bounding_box) memcpy(cur_bounding_box,
|
2016-07-04 23:40:12 -07:00
|
|
|
&s->cur.bounding_box,
|
|
|
|
sizeof (*cur_bounding_box));
|
2013-04-06 23:11:56 -07:00
|
|
|
if (prev_bounding_box) memcpy(prev_bounding_box,
|
2016-07-04 23:40:12 -07:00
|
|
|
&s->prev.bounding_box,
|
|
|
|
sizeof (*prev_bounding_box));
|
2013-04-06 23:11:56 -07:00
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_cleanup(Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2005-04-26 19:35:48 -07:00
|
|
|
if (obj->smart.parent)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_del(eo_obj);
|
2008-04-30 22:48:03 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
2013-02-12 00:58:59 -08:00
|
|
|
if (o->calc_entry.next)
|
|
|
|
eina_clist_remove(&o->calc_entry);
|
2011-08-29 16:45:24 -07:00
|
|
|
|
2016-12-02 19:43:11 -08:00
|
|
|
if (o->render_cache)
|
|
|
|
{
|
|
|
|
evas_render_object_render_cache_free(eo_obj, o->render_cache);
|
|
|
|
o->render_cache = NULL;
|
|
|
|
}
|
|
|
|
|
2011-05-07 01:01:42 -07:00
|
|
|
while (o->contained)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2016-08-09 08:30:55 -07:00
|
|
|
Evas_Object_Protected_Data *contained =
|
|
|
|
(Evas_Object_Protected_Data *)o->contained;
|
|
|
|
Evas_Object *contained_obj = contained->object;
|
|
|
|
|
2018-05-23 23:12:02 -07:00
|
|
|
if (!contained_obj)
|
|
|
|
{
|
|
|
|
ERR("Found an undefined object %p in %s.", contained, efl_debug_name_get(eo_obj));
|
|
|
|
o->contained = eina_inlist_remove
|
|
|
|
(o->contained, EINA_INLIST_GET(contained));
|
|
|
|
}
|
|
|
|
else if (contained->smart.parent != eo_obj)
|
2016-08-09 08:30:55 -07:00
|
|
|
{
|
|
|
|
Evas_Layer *lay = obj->layer;
|
|
|
|
|
|
|
|
ERR("This is bad - object %p in child list for %p has parent %p", contained_obj, eo_obj, contained->smart.parent);
|
|
|
|
o->contained = eina_inlist_remove
|
|
|
|
(o->contained, EINA_INLIST_GET(contained));
|
|
|
|
if (lay)
|
|
|
|
{
|
|
|
|
// this SHOULD be eina_inlist_append() BUT seemingly
|
2017-11-19 19:03:52 -08:00
|
|
|
// if we call this this object gets magically added
|
|
|
|
// back to o->contained above NOT lay->objects. this
|
|
|
|
// is utterly bizarre and the only explanation i
|
2016-08-09 08:30:55 -07:00
|
|
|
// can come up with right now is a compiler bug.
|
|
|
|
lay->objects = (Evas_Object_Protected_Data *)
|
|
|
|
eina_inlist_prepend(EINA_INLIST_GET(lay->objects),
|
|
|
|
EINA_INLIST_GET(contained));
|
|
|
|
if (contained->layer != lay)
|
|
|
|
{
|
|
|
|
if (contained->layer) contained->layer->usage--;
|
|
|
|
contained->layer = lay;
|
|
|
|
contained->in_layer = 1;
|
|
|
|
lay->usage++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else evas_object_smart_member_del(contained_obj);
|
2022-04-03 13:10:25 -07:00
|
|
|
// EEK ... it qasn't removed? remove it forcibly...
|
|
|
|
if ((Evas_Object_Protected_Data *)o->contained == contained)
|
|
|
|
{
|
|
|
|
o->contained = eina_inlist_remove
|
|
|
|
(o->contained, EINA_INLIST_GET(contained));
|
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
2008-04-30 22:48:03 -07:00
|
|
|
|
2011-05-07 01:01:42 -07:00
|
|
|
while (o->callbacks)
|
|
|
|
{
|
2013-04-11 13:45:15 -07:00
|
|
|
_eo_evas_smart_cb_info *info = (_eo_evas_smart_cb_info *)o->callbacks;
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_del(eo_obj, info->event, _eo_evas_smart_cb, info);
|
2013-04-11 13:45:15 -07:00
|
|
|
o->callbacks = eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info));
|
|
|
|
free(info);
|
2011-05-07 01:01:42 -07:00
|
|
|
}
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2016-11-25 17:47:34 -08:00
|
|
|
if (o->render_cache)
|
|
|
|
{
|
|
|
|
evas_render_object_render_cache_free(eo_obj, o->render_cache);
|
|
|
|
o->render_cache = NULL;
|
|
|
|
}
|
|
|
|
|
2011-05-07 01:01:42 -07:00
|
|
|
evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
|
2019-10-14 06:29:43 -07:00
|
|
|
if (o->data) evas_object_smart_data_set(eo_obj, NULL);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2008-04-30 22:48:03 -07:00
|
|
|
|
2003-10-17 20:34:00 -07:00
|
|
|
obj->smart.parent = NULL;
|
2003-01-19 19:54:00 -08:00
|
|
|
obj->smart.smart = NULL;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2005-07-22 03:28:11 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_cache_invalidate(Evas_Object *eo_obj,
|
2011-10-27 03:36:09 -07:00
|
|
|
Eina_Bool pass_events,
|
2012-10-18 04:30:04 -07:00
|
|
|
Eina_Bool freeze_events,
|
|
|
|
Eina_Bool source_invisible)
|
2005-07-22 03:28:11 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2011-05-06 04:04:32 -07:00
|
|
|
return;
|
2011-05-06 03:55:24 -07:00
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object_Protected_Data *member;
|
|
|
|
|
2011-10-27 03:36:09 -07:00
|
|
|
if (pass_events)
|
|
|
|
obj->parent_cache.pass_events_valid = EINA_FALSE;
|
|
|
|
if (freeze_events)
|
|
|
|
obj->parent_cache.freeze_events_valid = EINA_FALSE;
|
2012-10-18 04:30:04 -07:00
|
|
|
if (source_invisible)
|
2012-10-25 08:24:27 -07:00
|
|
|
obj->parent_cache.src_invisible_valid = EINA_FALSE;
|
2011-05-06 04:04:32 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart) return;
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
2011-10-27 03:36:09 -07:00
|
|
|
EINA_INLIST_FOREACH(o->contained, member)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
|
|
|
Evas_Object *eo_member = member->object;
|
2012-10-18 04:30:04 -07:00
|
|
|
evas_object_smart_member_cache_invalidate(eo_member, pass_events,
|
|
|
|
freeze_events,
|
|
|
|
source_invisible);
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
2005-07-22 03:28:11 -07:00
|
|
|
}
|
|
|
|
|
2008-04-30 22:48:03 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_raise(Evas_Object *eo_member)
|
2008-04-30 22:48:03 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *o;
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *member = efl_data_scope_get(eo_member, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
o = efl_data_scope_get(member->smart.parent, MY_CLASS);
|
2008-10-17 04:23:18 -07:00
|
|
|
o->contained = eina_inlist_demote(o->contained, EINA_INLIST_GET(member));
|
2008-04-30 22:48:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_lower(Evas_Object *eo_member)
|
2008-04-30 22:48:03 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *o;
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *member = efl_data_scope_get(eo_member, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
o = efl_data_scope_get(member->smart.parent, MY_CLASS);
|
2008-10-17 04:23:18 -07:00
|
|
|
o->contained = eina_inlist_promote(o->contained, EINA_INLIST_GET(member));
|
2008-04-30 22:48:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_stack_above(Evas_Object *eo_member, Evas_Object *eo_other)
|
2008-04-30 22:48:03 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *o;
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *member = efl_data_scope_get(eo_member, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
Evas_Object_Protected_Data *other = efl_data_scope_get(eo_other, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
o = efl_data_scope_get(member->smart.parent, MY_CLASS);
|
2008-10-17 04:23:18 -07:00
|
|
|
o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member));
|
|
|
|
o->contained = eina_inlist_append_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other));
|
2008-04-30 22:48:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_stack_below(Evas_Object *eo_member, Evas_Object *eo_other)
|
2008-04-30 22:48:03 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *o;
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *member = efl_data_scope_get(eo_member, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
Evas_Object_Protected_Data *other = efl_data_scope_get(eo_other, EFL_CANVAS_OBJECT_CLASS);
|
|
|
|
o = efl_data_scope_get(member->smart.parent, MY_CLASS);
|
2008-10-17 04:23:18 -07:00
|
|
|
o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member));
|
|
|
|
o->contained = eina_inlist_prepend_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other));
|
2008-04-30 22:48:03 -07:00
|
|
|
}
|
|
|
|
|
2012-06-07 00:10:36 -07:00
|
|
|
void
|
2017-02-20 02:34:58 -08:00
|
|
|
evas_object_smart_need_bounding_box_update(Evas_Smart_Data *o, Evas_Object_Protected_Data *obj)
|
2012-06-07 00:10:36 -07:00
|
|
|
{
|
2013-06-20 04:28:18 -07:00
|
|
|
if (o->update_boundingbox_needed) return;
|
2012-06-07 00:10:36 -07:00
|
|
|
o->update_boundingbox_needed = EINA_TRUE;
|
2017-02-20 02:34:58 -08:00
|
|
|
if (!obj->cur->cache.clip.dirty)
|
2016-07-06 22:10:24 -07:00
|
|
|
{
|
2017-02-20 02:34:58 -08:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
state_write->cache.clip.dirty = EINA_TRUE;
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
2016-07-06 22:10:24 -07:00
|
|
|
}
|
2012-06-07 00:10:36 -07:00
|
|
|
|
2016-05-06 16:47:07 -07:00
|
|
|
if (obj->smart.parent)
|
2017-02-20 02:34:58 -08:00
|
|
|
evas_object_smart_need_bounding_box_update(obj->smart.parent_data,
|
2016-05-06 16:47:07 -07:00
|
|
|
obj->smart.parent_object_data);
|
2012-06-07 00:10:36 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-02-20 02:34:58 -08:00
|
|
|
evas_object_smart_bounding_box_update(Evas_Object_Protected_Data *obj)
|
2012-06-07 00:10:36 -07:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *os;
|
2012-06-07 00:10:36 -07:00
|
|
|
Eina_Inlist *list;
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object_Protected_Data *o;
|
2016-07-06 22:10:24 -07:00
|
|
|
Evas_Coord minx = 0x7fffffff;
|
|
|
|
Evas_Coord miny = 0x7fffffff;
|
|
|
|
Evas_Coord maxx = 0x80000000;
|
|
|
|
Evas_Coord maxy = 0x80000000;
|
|
|
|
Evas_Coord tx1, ty1, tx2, ty2;
|
|
|
|
Eina_Bool none = EINA_TRUE;
|
2012-06-07 00:10:36 -07:00
|
|
|
|
2017-02-20 02:34:58 -08:00
|
|
|
os = obj->private_data;
|
2012-06-07 00:10:36 -07:00
|
|
|
|
2013-06-20 04:28:18 -07:00
|
|
|
if (!os->update_boundingbox_needed) return;
|
2012-06-07 00:10:36 -07:00
|
|
|
os->update_boundingbox_needed = EINA_FALSE;
|
|
|
|
|
|
|
|
list = os->contained;
|
|
|
|
EINA_INLIST_FOREACH(list, o)
|
|
|
|
{
|
|
|
|
if (o == obj) continue ;
|
2012-06-07 20:45:40 -07:00
|
|
|
if (o->clip.clipees || o->is_static_clip) continue ;
|
2016-07-04 23:40:12 -07:00
|
|
|
if (!o->cur->visible) continue;
|
2012-06-07 00:10:36 -07:00
|
|
|
|
2016-07-06 22:10:24 -07:00
|
|
|
none = EINA_FALSE;
|
|
|
|
|
2016-07-04 23:40:12 -07:00
|
|
|
if (o->is_smart)
|
2012-06-07 00:10:36 -07:00
|
|
|
{
|
2017-02-20 02:34:58 -08:00
|
|
|
Evas_Smart_Data *s = o->private_data;
|
2013-04-07 07:44:44 -07:00
|
|
|
|
2017-02-20 02:34:58 -08:00
|
|
|
evas_object_smart_bounding_box_update(o);
|
2012-06-07 00:10:36 -07:00
|
|
|
|
2016-07-06 22:10:24 -07:00
|
|
|
tx1 = s->cur.bounding_box.x;
|
|
|
|
ty1 = s->cur.bounding_box.y;
|
|
|
|
tx2 = tx1 + s->cur.bounding_box.w;
|
|
|
|
ty2 = ty1 + s->cur.bounding_box.h;
|
2012-06-07 00:10:36 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-07-06 22:10:24 -07:00
|
|
|
tx1 = o->cur->geometry.x;
|
|
|
|
ty1 = o->cur->geometry.y;
|
|
|
|
tx2 = tx1 + o->cur->geometry.w;
|
|
|
|
ty2 = ty1 + o->cur->geometry.h;
|
2012-06-07 00:10:36 -07:00
|
|
|
}
|
|
|
|
|
2016-07-06 22:10:24 -07:00
|
|
|
if (tx1 < minx) minx = tx1;
|
|
|
|
if (ty1 < miny) miny = ty1;
|
|
|
|
if (tx2 > maxx) maxx = tx2;
|
|
|
|
if (ty2 > maxy) maxy = ty2;
|
2012-06-07 00:10:36 -07:00
|
|
|
}
|
2016-07-06 22:10:24 -07:00
|
|
|
if (none)
|
2012-06-07 00:10:36 -07:00
|
|
|
{
|
2016-07-06 22:10:24 -07:00
|
|
|
minx = obj->cur->geometry.x;
|
|
|
|
miny = obj->cur->geometry.y;
|
|
|
|
maxx = obj->cur->geometry.x + obj->cur->geometry.w;
|
|
|
|
maxy = obj->cur->geometry.y + obj->cur->geometry.h;
|
2012-06-07 00:10:36 -07:00
|
|
|
}
|
|
|
|
|
2016-07-06 22:10:24 -07:00
|
|
|
os->cur.bounding_box.x = minx;
|
|
|
|
os->cur.bounding_box.y = miny;
|
|
|
|
os->cur.bounding_box.w = maxx - minx;
|
|
|
|
os->cur.bounding_box.h = maxy - miny;
|
2012-06-07 00:10:36 -07:00
|
|
|
|
2016-07-06 22:10:24 -07:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
2012-06-07 00:10:36 -07:00
|
|
|
{
|
2016-07-06 22:10:24 -07:00
|
|
|
state_write->cache.clip.dirty = EINA_TRUE;
|
2012-06-07 00:10:36 -07:00
|
|
|
}
|
2016-07-06 22:10:24 -07:00
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
evas_object_clip_recalc(obj);
|
|
|
|
if (obj->cur->clipper) evas_object_clip_recalc(obj->cur->clipper);
|
2012-06-07 00:10:36 -07:00
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/* all nice and private */
|
2005-05-21 19:49:50 -07:00
|
|
|
static void
|
2017-05-12 15:03:05 -07:00
|
|
|
evas_object_smart_render(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, void *type_private_data EINA_UNUSED, void *engine EINA_UNUSED, void *output EINA_UNUSED, void *context EINA_UNUSED, void *surface EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, Eina_Bool do_async EINA_UNUSED)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2003-10-17 20:34:00 -07:00
|
|
|
return;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-07-08 17:46:15 -07:00
|
|
|
evas_object_smart_render_pre(Evas_Object *eo_obj,
|
|
|
|
Evas_Object_Protected_Data *obj,
|
|
|
|
void *type_private_data EINA_UNUSED)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
if (obj->pre_render_done) return;
|
2012-07-19 04:07:54 -07:00
|
|
|
|
2012-10-25 08:24:27 -07:00
|
|
|
if (obj->changed_map || obj->changed_src_visible)
|
2018-06-05 04:58:35 -07:00
|
|
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
|
|
|
eo_obj, obj);
|
2012-05-29 23:29:14 -07:00
|
|
|
|
|
|
|
obj->pre_render_done = EINA_TRUE;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2017-02-03 18:31:55 -08:00
|
|
|
evas_object_smart_render_post(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, void *type_private_data)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2014-03-10 02:55:22 -07:00
|
|
|
Evas_Smart_Data *o = type_private_data;
|
2017-02-03 18:31:55 -08:00
|
|
|
evas_object_cur_prev(obj);
|
2013-04-07 23:05:58 -07:00
|
|
|
o->prev = o->cur;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2008-08-25 22:45:04 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
static void *evas_object_smart_engine_data_get(Evas_Object *eo_obj)
|
2008-08-25 22:45:04 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
|
2008-08-25 22:45:04 -07:00
|
|
|
if (!o) return NULL;
|
|
|
|
return o->engine_data;
|
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
|
|
|
|
static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_efl_canvas_group_class_constructor(Efl_Class *klass EINA_UNUSED)
|
2014-03-10 02:55:22 -07:00
|
|
|
{
|
2013-02-09 23:52:17 -08:00
|
|
|
_evas_smart_class_names_hash_table = eina_hash_string_small_new(NULL);
|
2013-11-07 03:16:01 -08:00
|
|
|
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
2013-02-09 23:52:17 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_efl_canvas_group_class_destructor(Efl_Class *klass EINA_UNUSED)
|
2013-02-09 23:52:17 -08:00
|
|
|
{
|
|
|
|
eina_hash_free(_evas_smart_class_names_hash_table);
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2015-11-19 03:37:07 -08:00
|
|
|
static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_paragraph_direction_set_internal(Eo *eo_obj,
|
2015-11-19 03:37:07 -08:00
|
|
|
Evas_BiDi_Direction dir)
|
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *o;
|
|
|
|
Evas_Smart_Data *member_o;
|
|
|
|
|
|
|
|
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), o)
|
|
|
|
{
|
|
|
|
evas_object_change(o->object, o);
|
|
|
|
|
|
|
|
if (o->is_smart)
|
|
|
|
{
|
2019-01-31 12:06:46 -08:00
|
|
|
member_o = efl_data_scope_get(o->object, MY_CLASS);
|
2015-11-19 03:37:07 -08:00
|
|
|
|
|
|
|
if ((member_o->inherit_paragraph_direction) &&
|
|
|
|
(member_o->paragraph_direction != dir))
|
|
|
|
{
|
|
|
|
member_o->paragraph_direction = dir;
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_paragraph_direction_set_internal(o->object, dir);
|
2015-11-19 03:37:07 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2016-06-20 21:26:15 -07:00
|
|
|
_efl_canvas_group_efl_canvas_object_paragraph_direction_set(Eo *eo_obj, Evas_Smart_Data *o,
|
2019-03-07 14:42:43 -08:00
|
|
|
Efl_Text_Bidirectional_Type dir)
|
2015-11-19 03:37:07 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
2015-11-19 03:37:07 -08:00
|
|
|
Evas_Smart_Data *parent;
|
|
|
|
|
2019-03-07 14:42:43 -08:00
|
|
|
if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == (Evas_BiDi_Direction)dir)) ||
|
|
|
|
(o->inherit_paragraph_direction && ((Evas_BiDi_Direction)dir == EVAS_BIDI_DIRECTION_INHERIT)))
|
2015-11-19 03:37:07 -08:00
|
|
|
return;
|
|
|
|
|
2019-03-07 14:42:43 -08:00
|
|
|
if (dir == (Efl_Text_Bidirectional_Type)EVAS_BIDI_DIRECTION_INHERIT)
|
2015-11-19 03:37:07 -08:00
|
|
|
{
|
|
|
|
o->inherit_paragraph_direction = EINA_TRUE;
|
|
|
|
Evas_BiDi_Direction parent_dir = EVAS_BIDI_DIRECTION_NEUTRAL;
|
|
|
|
|
|
|
|
if (obj->smart.parent)
|
|
|
|
{
|
2019-01-31 12:06:46 -08:00
|
|
|
parent = efl_data_scope_get(obj->smart.parent, MY_CLASS);
|
2015-11-19 03:37:07 -08:00
|
|
|
|
|
|
|
if (parent)
|
|
|
|
parent_dir = parent->paragraph_direction;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (parent_dir != o->paragraph_direction)
|
|
|
|
{
|
|
|
|
o->paragraph_direction = parent_dir;
|
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
o->inherit_paragraph_direction = EINA_FALSE;
|
|
|
|
o->paragraph_direction = dir;
|
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
}
|
|
|
|
|
2016-06-17 01:26:08 -07:00
|
|
|
_efl_canvas_group_group_paragraph_direction_set_internal(eo_obj, o->paragraph_direction);
|
2015-11-19 03:37:07 -08:00
|
|
|
}
|
|
|
|
|
2019-03-07 14:42:43 -08:00
|
|
|
EOLIAN static Efl_Text_Bidirectional_Type
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_canvas_group_efl_canvas_object_paragraph_direction_get(const Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
|
2015-11-19 03:37:07 -08:00
|
|
|
{
|
2019-03-07 14:42:43 -08:00
|
|
|
return (Efl_Text_Bidirectional_Type)o->paragraph_direction;
|
2015-11-19 03:37:07 -08:00
|
|
|
}
|
|
|
|
|
2017-09-05 23:02:07 -07:00
|
|
|
EOLIAN static const Eo *
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_canvas_group_group_clipper_get(const Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
|
2017-09-05 23:02:07 -07:00
|
|
|
{
|
|
|
|
// NOTE: This may be NULL until all EO smart objects are clipped!
|
|
|
|
return _smart_clipper_get(o);
|
|
|
|
}
|
|
|
|
|
2017-08-31 20:30:49 -07:00
|
|
|
/* Internal EO */
|
|
|
|
static void
|
2017-09-05 20:13:58 -07:00
|
|
|
_efl_canvas_group_group_clipped_set(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *sd, Eina_Bool clipped)
|
2017-08-31 20:30:49 -07:00
|
|
|
{
|
|
|
|
// We must call this function BEFORE the constructor (yes, it's hacky)
|
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(!sd->object);
|
2017-09-05 20:13:58 -07:00
|
|
|
sd->clipped = !!clipped;
|
2017-08-31 20:30:49 -07:00
|
|
|
}
|
|
|
|
|
2017-05-18 01:52:17 -07:00
|
|
|
/* Internal EO APIs */
|
2019-10-14 06:29:57 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_group_efl_object_event_callback_priority_add(Eo *obj, Evas_Smart_Data *sd, const Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb func, const void *user_data)
|
|
|
|
{
|
|
|
|
if (desc == EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED)
|
|
|
|
{
|
|
|
|
sd->cb_member_added = EINA_TRUE;
|
|
|
|
}
|
|
|
|
else if (desc == EFL_CANVAS_GROUP_EVENT_MEMBER_REMOVED)
|
|
|
|
{
|
|
|
|
sd->cb_member_added = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return efl_event_callback_priority_add(efl_super(obj, MY_CLASS), desc, priority, func, user_data);
|
|
|
|
}
|
2017-05-18 01:52:17 -07:00
|
|
|
|
2019-10-14 06:29:57 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_group_efl_object_event_callback_array_priority_add(Eo *obj, Evas_Smart_Data *sd, const Efl_Callback_Array_Item *array, Efl_Callback_Priority priority, const void *user_data)
|
|
|
|
{
|
|
|
|
for (int i = 0; array[i].desc; ++i)
|
|
|
|
{
|
|
|
|
if (array[i].desc == EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED)
|
|
|
|
{
|
|
|
|
sd->cb_member_added = EINA_TRUE;
|
|
|
|
}
|
|
|
|
else if (array[i].desc == EFL_CANVAS_GROUP_EVENT_MEMBER_REMOVED)
|
|
|
|
{
|
|
|
|
sd->cb_member_removed = EINA_TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return efl_event_callback_array_priority_add(efl_super(obj, MY_CLASS), array, priority, user_data);
|
|
|
|
}
|
evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 18:02:20 -08:00
|
|
|
EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(efl_canvas_group_add)
|
|
|
|
EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(efl_canvas_group_del)
|
|
|
|
EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_canvas_group_clipped_set, EFL_FUNC_CALL(enable), Eina_Bool enable)
|
2017-05-18 01:52:17 -07:00
|
|
|
|
|
|
|
#define EFL_CANVAS_GROUP_EXTRA_OPS \
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_canvas_group_add, _efl_canvas_group_group_add), \
|
2017-08-31 20:30:49 -07:00
|
|
|
EFL_OBJECT_OP_FUNC(efl_canvas_group_del, _efl_canvas_group_group_del), \
|
2019-10-14 06:29:57 -07:00
|
|
|
EFL_OBJECT_OP_FUNC(efl_event_callback_priority_add, _efl_canvas_group_efl_object_event_callback_priority_add), \
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_event_callback_array_priority_add, _efl_canvas_group_efl_object_event_callback_array_priority_add), \
|
2017-09-05 20:13:58 -07:00
|
|
|
EFL_OBJECT_OP_FUNC(efl_canvas_group_clipped_set, _efl_canvas_group_group_clipped_set)
|
2017-05-18 01:52:17 -07:00
|
|
|
|
2016-06-17 01:26:08 -07:00
|
|
|
#include "canvas/efl_canvas_group.eo.c"
|
2019-03-05 08:15:40 -08:00
|
|
|
#include "canvas/efl_canvas_group_eo.legacy.c"
|