2011-12-30 03:46:29 -08:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2016-06-20 21:26:15 -07:00
|
|
|
#define EFL_CANVAS_OBJECT_PROTECTED
|
2016-10-11 19:31:17 -07:00
|
|
|
#define EFL_CANVAS_GROUP_PROTECTED
|
2016-06-16 00:05:00 -07:00
|
|
|
|
2011-12-30 03:46:29 -08:00
|
|
|
#include <Evas.h>
|
|
|
|
#include <Ecore.h>
|
2004-06-18 08:38:03 -07:00
|
|
|
|
2011-06-29 06:58:42 -07:00
|
|
|
#ifdef HAVE_EIO
|
2011-06-29 10:30:19 -07:00
|
|
|
# include <math.h>
|
2011-06-29 06:58:42 -07:00
|
|
|
# include <Eio.h>
|
|
|
|
#endif
|
|
|
|
|
2019-10-31 10:20:33 -07:00
|
|
|
#define EFL_INTERNAL_UNSTABLE
|
2017-05-18 01:41:37 -07:00
|
|
|
#include <Evas_Internal.h>
|
|
|
|
|
2011-12-30 03:46:29 -08:00
|
|
|
#include "Emotion.h"
|
|
|
|
#include "emotion_private.h"
|
|
|
|
|
2019-03-05 08:15:40 -08:00
|
|
|
#include "canvas/evas_canvas_eo.h"
|
2018-08-16 10:01:26 -07:00
|
|
|
|
2011-12-30 03:46:29 -08:00
|
|
|
#ifdef _WIN32
|
|
|
|
# define FMT_UCHAR "%c"
|
|
|
|
#else
|
|
|
|
# define FMT_UCHAR "%hhu"
|
|
|
|
#endif
|
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
#define E_SMART_OBJ_GET(smart, o, type) \
|
|
|
|
{ \
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!o) return; \
|
2016-08-15 06:44:41 -07:00
|
|
|
if (!efl_isa(o, MY_CLASS)) { \
|
2014-08-06 05:36:06 -07:00
|
|
|
ERR("Tried calling on a non-emotion object."); \
|
|
|
|
return; \
|
|
|
|
} \
|
2016-08-15 06:44:41 -07:00
|
|
|
smart = efl_data_scope_get(o, MY_CLASS); \
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!smart) return; \
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#define E_SMART_OBJ_GET_RETURN(smart, o, type, ret) \
|
|
|
|
{ \
|
|
|
|
if (!o) return ret; \
|
2016-08-15 06:44:41 -07:00
|
|
|
if (!efl_isa(o, MY_CLASS)) { \
|
2014-08-06 05:36:06 -07:00
|
|
|
ERR("Tried calling on a non-emotion object."); \
|
|
|
|
return ret; \
|
|
|
|
} \
|
2016-08-15 06:44:41 -07:00
|
|
|
smart = efl_data_scope_get(o, MY_CLASS); \
|
2004-06-18 08:38:03 -07:00
|
|
|
if (!smart) return ret; \
|
|
|
|
}
|
|
|
|
|
2016-09-21 10:37:59 -07:00
|
|
|
#define E_OBJ_NAME "efl_canvas_video"
|
2004-06-18 08:38:03 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
#ifdef MY_CLASS
|
|
|
|
# undef MY_CLASS
|
|
|
|
#endif
|
|
|
|
|
2016-09-21 10:37:59 -07:00
|
|
|
#define MY_CLASS EFL_CANVAS_VIDEO_CLASS
|
2004-06-18 08:38:03 -07:00
|
|
|
|
2016-09-21 10:37:59 -07:00
|
|
|
typedef struct _Efl_Canvas_Video_Data Efl_Canvas_Video_Data;
|
2017-09-06 05:26:57 -07:00
|
|
|
typedef struct _Emotion_Xattr_Data Emotion_Xattr_Data;
|
2014-08-06 05:36:06 -07:00
|
|
|
|
2016-09-21 10:37:59 -07:00
|
|
|
struct _Efl_Canvas_Video_Data
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2013-01-10 16:27:35 -08:00
|
|
|
Emotion_Engine_Instance *engine_instance;
|
2005-10-02 00:34:36 -07:00
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
const char *engine;
|
2011-06-29 06:58:42 -07:00
|
|
|
const char *file;
|
2004-06-18 08:38:03 -07:00
|
|
|
Evas_Object *obj;
|
2011-09-15 11:51:27 -07:00
|
|
|
Evas_Object *bg;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-07-21 21:13:28 -07:00
|
|
|
Ecore_Job *job;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr;
|
2017-02-12 22:29:09 -08:00
|
|
|
|
2014-04-27 11:42:50 -07:00
|
|
|
const char *title;
|
2011-07-01 01:57:54 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
struct {
|
2014-04-27 11:42:50 -07:00
|
|
|
const char *info;
|
2006-12-19 06:15:17 -08:00
|
|
|
double stat;
|
2004-06-24 03:55:43 -07:00
|
|
|
} progress;
|
|
|
|
struct {
|
2014-04-27 11:42:50 -07:00
|
|
|
const char *file;
|
2006-12-19 06:15:17 -08:00
|
|
|
int num;
|
2004-06-24 03:55:43 -07:00
|
|
|
} ref;
|
|
|
|
struct {
|
|
|
|
int button_num;
|
|
|
|
int button;
|
|
|
|
} spu;
|
2011-09-15 11:51:23 -07:00
|
|
|
struct {
|
|
|
|
int l; /* left */
|
|
|
|
int r; /* right */
|
|
|
|
int t; /* top */
|
|
|
|
int b; /* bottom */
|
|
|
|
Evas_Object *clipper;
|
|
|
|
} crop;
|
2011-10-21 07:59:22 -07:00
|
|
|
|
|
|
|
struct {
|
|
|
|
int w, h;
|
|
|
|
} video;
|
|
|
|
struct {
|
|
|
|
double w, h;
|
|
|
|
} fill;
|
2007-03-12 19:30:14 -07:00
|
|
|
|
2011-07-01 01:57:54 -07:00
|
|
|
double ratio;
|
|
|
|
double pos;
|
2011-08-02 09:22:30 -07:00
|
|
|
double remember_jump;
|
2011-07-01 01:57:54 -07:00
|
|
|
double seek_pos;
|
|
|
|
double len;
|
2011-06-29 06:58:42 -07:00
|
|
|
|
2007-03-12 19:30:14 -07:00
|
|
|
Emotion_Module_Options module_options;
|
2011-07-01 01:57:54 -07:00
|
|
|
|
|
|
|
Emotion_Suspend state;
|
2011-09-15 11:51:33 -07:00
|
|
|
Emotion_Aspect aspect;
|
2011-07-01 01:57:54 -07:00
|
|
|
|
2012-06-18 23:52:29 -07:00
|
|
|
Ecore_Animator *anim;
|
|
|
|
|
2011-08-02 09:22:30 -07:00
|
|
|
Eina_Bool open : 1;
|
2011-07-01 01:57:54 -07:00
|
|
|
Eina_Bool play : 1;
|
2019-09-24 08:18:57 -07:00
|
|
|
Eina_Bool pause : 1;
|
2011-08-02 09:22:30 -07:00
|
|
|
Eina_Bool remember_play : 1;
|
2011-07-01 01:57:54 -07:00
|
|
|
Eina_Bool seek : 1;
|
|
|
|
Eina_Bool seeking : 1;
|
2019-02-27 10:17:09 -08:00
|
|
|
Eina_Bool loaded : 1;
|
2004-06-18 08:38:03 -07:00
|
|
|
};
|
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
struct _Emotion_Xattr_Data
|
|
|
|
{
|
|
|
|
EINA_REFCOUNT;
|
|
|
|
Eo *obj_wref;
|
|
|
|
#ifdef HAVE_EIO
|
|
|
|
Eio_File *load;
|
|
|
|
Eio_File *save;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
static void _mouse_move(void *data, Evas *ev, Evas_Object *obj, void *event_info);
|
|
|
|
static void _mouse_down(void *data, Evas *ev, Evas_Object *obj, void *event_info);
|
2004-07-21 21:13:28 -07:00
|
|
|
static void _pos_set_job(void *data);
|
2004-06-18 08:38:03 -07:00
|
|
|
static void _pixels_get(void *data, Evas_Object *obj);
|
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
static void
|
2016-09-21 10:37:59 -07:00
|
|
|
_engine_init(Eo *obj, Efl_Canvas_Video_Data *sd)
|
2014-08-22 01:37:50 -07:00
|
|
|
{
|
|
|
|
if (sd->engine_instance) return;
|
|
|
|
sd->engine_instance = emotion_engine_instance_new(sd->engine, obj,
|
|
|
|
&(sd->module_options));
|
|
|
|
}
|
|
|
|
|
2010-10-10 16:39:32 -07:00
|
|
|
static void
|
|
|
|
_emotion_image_data_zero(Evas_Object *img)
|
|
|
|
{
|
2013-02-24 16:32:58 -08:00
|
|
|
void *data = NULL;
|
2011-09-02 06:10:22 -07:00
|
|
|
|
2010-10-10 16:39:32 -07:00
|
|
|
data = evas_object_image_data_get(img, 1);
|
|
|
|
if (data)
|
|
|
|
{
|
2011-02-27 08:21:39 -08:00
|
|
|
int w, h, sz = 0;
|
|
|
|
Evas_Colorspace cs;
|
2011-09-02 06:10:22 -07:00
|
|
|
|
2010-10-10 16:39:32 -07:00
|
|
|
evas_object_image_size_get(img, &w, &h);
|
2011-02-27 08:21:39 -08:00
|
|
|
cs = evas_object_image_colorspace_get(img);
|
|
|
|
if (cs == EVAS_COLORSPACE_ARGB8888)
|
|
|
|
sz = w * h * 4;
|
|
|
|
if ((cs == EVAS_COLORSPACE_YCBCR422P601_PL) ||
|
|
|
|
(cs == EVAS_COLORSPACE_YCBCR422P709_PL))
|
|
|
|
sz = h * 2 * sizeof(unsigned char *);
|
|
|
|
if (sz != 0) memset(data, 0, sz);
|
2010-10-10 16:39:32 -07:00
|
|
|
}
|
|
|
|
evas_object_image_data_set(img, data);
|
|
|
|
}
|
2010-03-31 20:59:39 -07:00
|
|
|
|
2011-06-29 10:30:19 -07:00
|
|
|
static void
|
2017-09-06 05:26:57 -07:00
|
|
|
_xattr_data_cancel(Emotion_Xattr_Data *xattr)
|
2011-06-29 10:30:19 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
(void) xattr;
|
2013-03-10 23:53:28 -07:00
|
|
|
#ifdef HAVE_EIO
|
|
|
|
/* Only cancel the load_xattr or we will loose ref to time_seek stringshare */
|
2017-09-06 05:26:57 -07:00
|
|
|
if (xattr->load) eio_file_cancel(xattr->load);
|
|
|
|
xattr->load = NULL;
|
|
|
|
if (xattr->save) eio_file_cancel(xattr->save);
|
|
|
|
xattr->save = NULL;
|
2013-03-10 23:53:28 -07:00
|
|
|
#endif
|
2017-09-06 05:26:57 -07:00
|
|
|
}
|
2014-08-22 01:37:50 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
static void
|
|
|
|
_xattr_data_unref(Emotion_Xattr_Data *xattr)
|
|
|
|
{
|
|
|
|
EINA_REFCOUNT_UNREF(xattr) {} else return;
|
2011-06-29 10:30:19 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
_xattr_data_cancel(xattr);
|
|
|
|
efl_wref_del_safe(&xattr->obj_wref);
|
|
|
|
free(xattr);
|
2011-06-29 10:30:19 -07:00
|
|
|
}
|
|
|
|
|
2011-09-15 11:51:23 -07:00
|
|
|
static void
|
2011-09-20 03:54:53 -07:00
|
|
|
_clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int vid_w, int vid_h)
|
2011-09-15 11:51:23 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-09-15 11:51:23 -07:00
|
|
|
double scale_w, scale_h;
|
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
|
2011-09-20 03:54:53 -07:00
|
|
|
if (vid_w == 0 || vid_h == 0)
|
|
|
|
{
|
|
|
|
evas_object_image_fill_set(sd->obj, 0, 0, 0, 0);
|
|
|
|
evas_object_move(sd->obj, x, y);
|
|
|
|
evas_object_resize(sd->obj, 0, 0);
|
2019-05-29 06:31:33 -07:00
|
|
|
if (!sd->crop.clipper) return;
|
2011-09-20 03:54:53 -07:00
|
|
|
evas_object_move(sd->crop.clipper, x, y);
|
|
|
|
evas_object_resize(sd->crop.clipper, 0, 0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
scale_w = (double)w / (double)(vid_w - sd->crop.l - sd->crop.r);
|
|
|
|
scale_h = (double)h / (double)(vid_h - sd->crop.t - sd->crop.b);
|
|
|
|
|
2011-10-21 07:59:22 -07:00
|
|
|
if (sd->fill.w < 0 && sd->fill.h < 0)
|
|
|
|
evas_object_image_fill_set(sd->obj, 0, 0, vid_w * scale_w, vid_h * scale_h);
|
|
|
|
else
|
|
|
|
evas_object_image_fill_set(sd->obj, 0, 0, sd->fill.w * w, sd->fill.h * h);
|
2011-09-20 03:54:53 -07:00
|
|
|
evas_object_resize(sd->obj, vid_w * scale_w, vid_h * scale_h);
|
|
|
|
evas_object_move(sd->obj, x - sd->crop.l * scale_w, y - sd->crop.t * scale_h);
|
2019-05-29 06:31:33 -07:00
|
|
|
if (!sd->crop.clipper) return;
|
|
|
|
evas_object_move(sd->crop.clipper, x, y);
|
2011-09-20 03:54:53 -07:00
|
|
|
evas_object_resize(sd->crop.clipper, w, h);
|
|
|
|
}
|
2011-09-15 11:51:23 -07:00
|
|
|
}
|
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
/*******************************/
|
|
|
|
/* Externally accessible calls */
|
|
|
|
/*******************************/
|
2005-10-02 00:34:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Evas_Object *
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_add(Evas *evas)
|
|
|
|
{
|
2018-08-29 05:11:00 -07:00
|
|
|
evas = evas_find(evas);
|
2018-08-16 10:01:26 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(evas, EVAS_CANVAS_CLASS), NULL);
|
2018-08-29 05:11:00 -07:00
|
|
|
return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
|
|
|
|
2015-05-19 03:41:27 -07:00
|
|
|
EOLIAN static Eo *
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_efl_object_constructor(Eo *obj, Efl_Canvas_Video_Data *pd EINA_UNUSED)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2017-09-06 07:03:30 -07:00
|
|
|
efl_canvas_group_clipped_set(obj, EINA_TRUE);
|
2016-08-15 06:44:41 -07:00
|
|
|
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
2016-06-20 21:26:15 -07:00
|
|
|
efl_canvas_object_type_set(obj, E_OBJ_NAME);
|
2015-05-19 03:41:27 -07:00
|
|
|
|
|
|
|
return obj;
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Evas_Object *
|
2011-08-04 03:24:32 -07:00
|
|
|
emotion_object_image_get(const Evas_Object *obj)
|
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
Efl_Canvas_Video_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
|
2011-08-04 03:24:32 -07:00
|
|
|
if (!sd) return NULL;
|
|
|
|
return sd->obj;
|
|
|
|
}
|
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_option_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *pd, const char *opt, const char *val)
|
2007-03-12 19:30:14 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd = pd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2007-03-12 19:30:14 -07:00
|
|
|
if ((!opt) || (!val)) return;
|
2011-09-01 12:04:15 -07:00
|
|
|
|
2013-01-10 19:06:42 -08:00
|
|
|
if (strcmp(opt, "video") == 0)
|
|
|
|
{
|
|
|
|
if (strcmp(val, "off") == 0)
|
|
|
|
sd->module_options.no_video = EINA_TRUE;
|
|
|
|
else if (strcmp(val, "on") == 0)
|
|
|
|
sd->module_options.no_video = EINA_FALSE;
|
|
|
|
else
|
|
|
|
sd->module_options.no_video = !!atoi(val);
|
|
|
|
|
|
|
|
ERR("Deprecated. Use emotion_object_video_mute_set()");
|
|
|
|
}
|
|
|
|
else if (strcmp(opt, "audio") == 0)
|
|
|
|
{
|
|
|
|
if (strcmp(val, "off") == 0)
|
|
|
|
sd->module_options.no_audio = EINA_TRUE;
|
|
|
|
else if (strcmp(val, "on") == 0)
|
|
|
|
sd->module_options.no_audio = EINA_FALSE;
|
|
|
|
else
|
|
|
|
sd->module_options.no_audio = !!atoi(val);
|
|
|
|
|
|
|
|
ERR("Deprecated. Use emotion_object_audio_mute_set()");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
ERR("Unsupported %s=%s", opt, val);
|
2007-03-12 19:30:14 -07:00
|
|
|
}
|
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_engine_set(Eo *obj, Efl_Canvas_Video_Data *pd, const char *engine)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd = pd;
|
2011-06-29 06:58:42 -07:00
|
|
|
const char *file;
|
2010-03-31 19:17:40 -07:00
|
|
|
|
2005-08-30 16:40:34 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2005-05-04 14:32:37 -07:00
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!engine) engine = "gstreamer1";
|
|
|
|
if (!strcmp(engine, sd->engine)) return EINA_TRUE;
|
|
|
|
|
|
|
|
eina_stringshare_replace(&(sd->engine), engine);
|
2010-03-31 19:17:40 -07:00
|
|
|
|
|
|
|
file = sd->file;
|
2004-06-18 08:38:03 -07:00
|
|
|
sd->file = NULL;
|
2010-03-31 19:17:40 -07:00
|
|
|
|
2014-04-27 04:10:25 -07:00
|
|
|
eina_stringshare_del(sd->title);
|
2004-06-24 03:55:43 -07:00
|
|
|
sd->title = NULL;
|
2014-04-27 04:10:25 -07:00
|
|
|
eina_stringshare_del(sd->progress.info);
|
2004-06-24 03:55:43 -07:00
|
|
|
sd->progress.info = NULL;
|
|
|
|
sd->progress.stat = 0.0;
|
2014-04-27 04:10:25 -07:00
|
|
|
eina_stringshare_del(sd->ref.file);
|
2004-06-24 03:55:43 -07:00
|
|
|
sd->ref.file = NULL;
|
|
|
|
sd->ref.num = 0;
|
|
|
|
sd->spu.button_num = 0;
|
|
|
|
sd->spu.button = -1;
|
|
|
|
sd->ratio = 1.0;
|
|
|
|
sd->pos = 0;
|
2011-08-02 09:22:30 -07:00
|
|
|
sd->remember_jump = 0;
|
2004-06-24 03:55:43 -07:00
|
|
|
sd->seek_pos = 0;
|
|
|
|
sd->len = 0;
|
2011-08-02 09:22:30 -07:00
|
|
|
sd->remember_play = 0;
|
2005-05-04 14:32:37 -07:00
|
|
|
|
2012-06-18 23:52:29 -07:00
|
|
|
if (sd->anim) ecore_animator_del(sd->anim);
|
|
|
|
sd->anim = NULL;
|
|
|
|
|
2013-01-10 16:27:35 -08:00
|
|
|
if (sd->engine_instance) emotion_engine_instance_del(sd->engine_instance);
|
2014-08-22 01:37:50 -07:00
|
|
|
sd->engine_instance = NULL;
|
|
|
|
_engine_init(obj, sd);
|
2013-01-10 16:27:35 -08:00
|
|
|
if (!sd->engine_instance)
|
|
|
|
{
|
|
|
|
sd->file = file;
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
2010-08-30 06:25:35 -07:00
|
|
|
|
2010-03-31 19:17:40 -07:00
|
|
|
if (file)
|
2007-03-12 19:30:14 -07:00
|
|
|
{
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_object_file_set(obj, file);
|
|
|
|
eina_stringshare_del(file);
|
2007-03-12 19:30:14 -07:00
|
|
|
}
|
2007-10-04 22:12:38 -07:00
|
|
|
|
2009-06-18 01:01:23 -07:00
|
|
|
return EINA_TRUE;
|
2005-05-04 14:32:37 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2005-05-04 14:32:37 -07:00
|
|
|
emotion_object_file_set(Evas_Object *obj, const char *file)
|
|
|
|
{
|
2019-02-27 10:17:09 -08:00
|
|
|
return efl_file_simple_load(obj, file, NULL);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2019-02-27 10:17:09 -08:00
|
|
|
EOLIAN static Eina_Error
|
|
|
|
_efl_canvas_video_efl_file_file_set(Eo *obj, Efl_Canvas_Video_Data *sd, const char *file)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("file=%s", file);
|
2013-01-10 16:27:35 -08:00
|
|
|
|
2019-02-27 10:17:09 -08:00
|
|
|
eina_stringshare_replace(&sd->file, file);
|
|
|
|
sd->loaded = 0;
|
|
|
|
return efl_file_set(efl_super(obj, MY_CLASS), file);
|
|
|
|
}
|
2013-01-10 16:27:35 -08:00
|
|
|
|
2019-02-27 10:17:09 -08:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_video_efl_file_loaded_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
|
|
|
{
|
|
|
|
return sd->open && sd->loaded;
|
|
|
|
}
|
|
|
|
|
2019-08-29 06:26:15 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_efl_canvas_video_efl_file_unload(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
|
|
|
{
|
|
|
|
if (sd->engine_instance) emotion_engine_instance_file_close(sd->engine_instance);
|
|
|
|
sd->engine_instance = NULL;
|
|
|
|
evas_object_image_data_set(sd->obj, NULL);
|
|
|
|
evas_object_image_size_set(sd->obj, 1, 1);
|
|
|
|
_emotion_image_data_zero(sd->obj);
|
|
|
|
|
|
|
|
if (sd->anim) ecore_animator_del(sd->anim);
|
|
|
|
sd->anim = NULL;
|
|
|
|
|
|
|
|
_xattr_data_cancel(sd->xattr);
|
|
|
|
sd->loaded = 0;
|
|
|
|
}
|
|
|
|
|
2019-02-27 10:17:09 -08:00
|
|
|
EOLIAN static Eina_Error
|
|
|
|
_efl_canvas_video_efl_file_load(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
|
|
|
{
|
|
|
|
const char *file = sd->file;
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) _engine_init(obj, sd);
|
2013-01-10 16:27:35 -08:00
|
|
|
if (!sd->engine_instance)
|
|
|
|
{
|
2017-12-13 09:53:33 -08:00
|
|
|
WRN("No engine chosen. Please set an engine.");
|
2019-02-27 10:17:09 -08:00
|
|
|
return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
|
2013-01-10 16:27:35 -08:00
|
|
|
}
|
2008-10-08 08:38:42 -07:00
|
|
|
|
2011-10-21 07:59:22 -07:00
|
|
|
sd->video.w = 0;
|
|
|
|
sd->video.h = 0;
|
2005-11-04 00:21:28 -08:00
|
|
|
if ((file) && (file[0] != 0))
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2018-02-22 14:55:31 -08:00
|
|
|
char *file2 = NULL;
|
2016-10-25 02:34:25 -07:00
|
|
|
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_file_close(sd->engine_instance);
|
2011-02-27 08:21:39 -08:00
|
|
|
evas_object_image_data_set(sd->obj, NULL);
|
2013-01-10 16:27:35 -08:00
|
|
|
evas_object_image_size_set(sd->obj, 1, 1);
|
2011-09-02 06:10:22 -07:00
|
|
|
_emotion_image_data_zero(sd->obj);
|
2011-08-02 09:22:30 -07:00
|
|
|
sd->open = 0;
|
2016-10-25 02:34:25 -07:00
|
|
|
|
2017-02-12 22:29:09 -08:00
|
|
|
if (file)
|
|
|
|
{
|
2018-02-21 01:06:02 -08:00
|
|
|
file2 = eina_vpath_resolve(file);
|
2017-02-12 22:29:09 -08:00
|
|
|
}
|
2016-10-25 02:34:25 -07:00
|
|
|
|
|
|
|
if (!emotion_engine_instance_file_open(sd->engine_instance, file2))
|
2013-01-10 16:27:35 -08:00
|
|
|
{
|
|
|
|
WRN("Couldn't open file=%s", sd->file);
|
2019-02-27 10:17:09 -08:00
|
|
|
return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
|
2013-01-10 16:27:35 -08:00
|
|
|
}
|
2018-02-21 01:06:02 -08:00
|
|
|
free(file2);
|
2013-01-10 16:27:35 -08:00
|
|
|
DBG("successfully opened file=%s", sd->file);
|
|
|
|
sd->pos = 0.0;
|
|
|
|
if (sd->play) emotion_engine_instance_play(sd->engine_instance, 0.0);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_file_close(sd->engine_instance);
|
|
|
|
evas_object_image_data_set(sd->obj, NULL);
|
|
|
|
evas_object_image_size_set(sd->obj, 1, 1);
|
|
|
|
_emotion_image_data_zero(sd->obj);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
2010-10-20 00:55:20 -07:00
|
|
|
|
2012-06-18 23:52:29 -07:00
|
|
|
if (sd->anim) ecore_animator_del(sd->anim);
|
|
|
|
sd->anim = NULL;
|
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
_xattr_data_cancel(sd->xattr);
|
2019-02-27 10:17:09 -08:00
|
|
|
sd->loaded = 1;
|
2011-06-30 02:49:24 -07:00
|
|
|
|
2019-02-27 10:17:09 -08:00
|
|
|
return 0;
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_file_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-02-27 10:17:09 -08:00
|
|
|
return efl_file_get(obj);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
2011-09-15 11:51:33 -07:00
|
|
|
static void
|
2016-09-21 10:37:59 -07:00
|
|
|
_emotion_aspect_borders_apply(Evas_Object *obj, Efl_Canvas_Video_Data *sd, int w, int h, int iw, int ih)
|
2011-09-15 11:51:23 -07:00
|
|
|
{
|
2011-09-20 03:54:53 -07:00
|
|
|
int x, y;
|
|
|
|
|
|
|
|
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
|
|
|
|
2011-09-15 11:51:33 -07:00
|
|
|
/* applying calculated borders */
|
2014-08-22 01:37:50 -07:00
|
|
|
if ((sd->crop.l == 0) && (sd->crop.r == 0) &&
|
|
|
|
(sd->crop.t == 0) && (sd->crop.b == 0))
|
2011-09-15 11:51:23 -07:00
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
Evas_Object *old_clipper;
|
|
|
|
if (sd->crop.clipper)
|
|
|
|
{
|
|
|
|
old_clipper = evas_object_clip_get(sd->crop.clipper);
|
|
|
|
evas_object_clip_unset(sd->obj);
|
|
|
|
evas_object_clip_set(sd->obj, old_clipper);
|
|
|
|
evas_object_del(sd->crop.clipper);
|
|
|
|
sd->crop.clipper = NULL;
|
|
|
|
}
|
2011-09-15 11:51:23 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->crop.clipper)
|
|
|
|
{
|
|
|
|
Evas_Object *old_clipper;
|
|
|
|
sd->crop.clipper = evas_object_rectangle_add
|
|
|
|
(evas_object_evas_get(obj));
|
|
|
|
evas_object_smart_member_add(sd->crop.clipper, obj);
|
|
|
|
old_clipper = evas_object_clip_get(sd->obj);
|
|
|
|
evas_object_clip_set(sd->obj, sd->crop.clipper);
|
|
|
|
evas_object_clip_set(sd->crop.clipper, old_clipper);
|
2017-09-06 07:03:30 -07:00
|
|
|
evas_object_show(sd->crop.clipper);
|
2014-08-22 01:37:50 -07:00
|
|
|
}
|
2011-09-15 11:51:23 -07:00
|
|
|
}
|
2011-09-20 03:54:53 -07:00
|
|
|
_clipper_position_size_update(obj, x, y, w, h, iw, ih);
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_aspect_border_apply(Evas_Object *obj, Efl_Canvas_Video_Data *sd, int w, int h)
|
2011-09-15 11:51:33 -07:00
|
|
|
{
|
|
|
|
int iw, ih;
|
|
|
|
double ir;
|
|
|
|
double r;
|
|
|
|
|
2011-12-30 03:46:29 -08:00
|
|
|
int aspect_opt = 0;
|
2011-10-21 07:59:22 -07:00
|
|
|
|
2016-10-15 11:59:57 -07:00
|
|
|
/* Prefer (if available) the video aspect ratio to calculate the sizes */
|
|
|
|
if (sd->ratio > 0.0)
|
|
|
|
{
|
|
|
|
ir = sd->ratio;
|
|
|
|
ih = sd->video.h;
|
|
|
|
iw = (double)ih * ir;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
iw = sd->video.w;
|
|
|
|
ih = sd->video.h;
|
|
|
|
ir = (double)iw / ih;
|
|
|
|
}
|
2011-09-15 11:51:33 -07:00
|
|
|
|
|
|
|
r = (double)w / h;
|
|
|
|
|
|
|
|
/* First check if we should fit the width or height of the video inside the
|
|
|
|
* width/height of the object. This check takes into account the original
|
|
|
|
* aspect ratio and the object aspect ratio, if we are keeping both sizes or
|
|
|
|
* cropping the exceding area.
|
|
|
|
*/
|
|
|
|
if (sd->aspect == EMOTION_ASPECT_KEEP_NONE)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
sd->crop.l = 0;
|
|
|
|
sd->crop.r = 0;
|
|
|
|
sd->crop.t = 0;
|
|
|
|
sd->crop.b = 0;
|
|
|
|
aspect_opt = 0; // just ignore keep_aspect
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
else if (sd->aspect == EMOTION_ASPECT_KEEP_WIDTH)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
aspect_opt = 1;
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
else if (sd->aspect == EMOTION_ASPECT_KEEP_HEIGHT)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
aspect_opt = 2;
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
else if (sd->aspect == EMOTION_ASPECT_KEEP_BOTH)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
if (ir > r) aspect_opt = 1;
|
|
|
|
else aspect_opt = 2;
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
else if (sd->aspect == EMOTION_ASPECT_CROP)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
if (ir > r) aspect_opt = 2;
|
|
|
|
else aspect_opt = 1;
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
else if (sd->aspect == EMOTION_ASPECT_CUSTOM)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
// nothing to do, just respect the border settings
|
|
|
|
aspect_opt = 0;
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* updating borders based on keep_aspect settings */
|
|
|
|
if (aspect_opt == 1) // keep width
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
int th, dh;
|
|
|
|
double scale;
|
|
|
|
|
|
|
|
sd->crop.l = 0;
|
|
|
|
sd->crop.r = 0;
|
|
|
|
scale = (double)iw / w;
|
|
|
|
th = h * scale;
|
|
|
|
dh = ih - th;
|
|
|
|
sd->crop.t = sd->crop.b = dh / 2;
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
else if (aspect_opt == 2) // keep height
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
int tw, dw;
|
|
|
|
double scale;
|
|
|
|
|
|
|
|
sd->crop.t = 0;
|
|
|
|
sd->crop.b = 0;
|
|
|
|
scale = (double)ih / h;
|
|
|
|
tw = w * scale;
|
|
|
|
dw = iw - tw;
|
|
|
|
sd->crop.l = sd->crop.r = dw / 2;
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
_emotion_aspect_borders_apply(obj, sd, w, h, iw, ih);
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-09-15 11:51:33 -07:00
|
|
|
emotion_object_border_set(Evas_Object *obj, int l, int r, int t, int b)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-09-15 11:51:33 -07:00
|
|
|
int w, h;
|
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
|
|
|
|
sd->aspect = EMOTION_ASPECT_CUSTOM;
|
|
|
|
sd->crop.l = -l;
|
|
|
|
sd->crop.r = -r;
|
|
|
|
sd->crop.t = -t;
|
|
|
|
sd->crop.b = -b;
|
|
|
|
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_aspect_border_apply(obj, sd, w, h);
|
2011-09-15 11:51:23 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-09-15 11:51:27 -07:00
|
|
|
emotion_object_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
|
2011-09-15 11:51:23 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-09-15 11:51:23 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
*l = -sd->crop.l;
|
|
|
|
*r = -sd->crop.r;
|
|
|
|
*t = -sd->crop.t;
|
|
|
|
*b = -sd->crop.b;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-09-15 11:51:27 -07:00
|
|
|
emotion_object_bg_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-09-15 11:51:27 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
evas_object_color_set(sd->bg, r, g, b, a);
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-09-15 11:51:27 -07:00
|
|
|
emotion_object_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-09-15 11:51:27 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
evas_object_color_get(sd->bg, r, g, b, a);
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-09-15 11:51:33 -07:00
|
|
|
emotion_object_keep_aspect_set(Evas_Object *obj, Emotion_Aspect a)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-09-15 11:51:33 -07:00
|
|
|
int w, h;
|
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (a == sd->aspect) return;
|
2011-09-15 11:51:33 -07:00
|
|
|
|
|
|
|
sd->aspect = a;
|
|
|
|
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_aspect_border_apply(obj, sd, w, h);
|
2011-09-15 11:51:33 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Emotion_Aspect
|
2011-09-15 11:51:33 -07:00
|
|
|
emotion_object_keep_aspect_get(const Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-09-15 11:51:33 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_ASPECT_KEEP_NONE);
|
|
|
|
return sd->aspect;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2009-06-18 01:01:23 -07:00
|
|
|
emotion_object_play_set(Evas_Object *obj, Eina_Bool play)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 08:18:57 -07:00
|
|
|
/* avoid calling playback_position_set(0) for legacy */
|
|
|
|
if (play)
|
|
|
|
efl_player_playing_set(obj, EINA_TRUE);
|
|
|
|
efl_player_paused_set(obj, !play);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2019-09-24 08:18:57 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_video_efl_player_playing_set(Eo *obj, Efl_Canvas_Video_Data *sd, Eina_Bool play)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2019-09-24 08:18:57 -07:00
|
|
|
play = !!play;
|
2011-12-30 03:46:29 -08:00
|
|
|
DBG("play=" FMT_UCHAR ", was=" FMT_UCHAR, play, sd->play);
|
2019-09-24 08:18:57 -07:00
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
|
|
|
/* always unset pause if playing is false */
|
|
|
|
if (!play) sd->pause = EINA_FALSE;
|
2011-08-02 09:22:30 -07:00
|
|
|
if (!sd->open)
|
|
|
|
{
|
|
|
|
sd->remember_play = play;
|
2019-09-24 08:18:57 -07:00
|
|
|
return EINA_TRUE;
|
2011-08-02 09:22:30 -07:00
|
|
|
}
|
2019-09-24 08:18:57 -07:00
|
|
|
if (play == sd->play) return EINA_TRUE;
|
2004-06-18 08:38:03 -07:00
|
|
|
sd->play = play;
|
2011-08-02 09:22:30 -07:00
|
|
|
sd->remember_play = play;
|
2011-07-01 01:57:54 -07:00
|
|
|
if (sd->state != EMOTION_WAKEUP) emotion_object_suspend_set(obj, EMOTION_WAKEUP);
|
2019-09-24 08:18:57 -07:00
|
|
|
if (sd->play) emotion_engine_instance_play(sd->engine_instance, 0.0);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
emotion_engine_instance_stop(sd->engine_instance);
|
|
|
|
efl_player_playback_position_set(obj, 0.0);
|
|
|
|
}
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_video_efl_player_paused_set(Eo *obj, Efl_Canvas_Video_Data *sd, Eina_Bool paused)
|
|
|
|
{
|
|
|
|
paused = !!paused;
|
|
|
|
DBG("paused=" FMT_UCHAR ", was=" FMT_UCHAR, paused, sd->pause);
|
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
|
|
|
if (!sd->open)
|
|
|
|
{
|
|
|
|
/* queue pause */
|
|
|
|
if (sd->remember_play)
|
|
|
|
sd->pause = paused;
|
|
|
|
return sd->remember_play;
|
|
|
|
}
|
|
|
|
if (!sd->play) return EINA_FALSE;
|
|
|
|
if (paused == sd->pause) return EINA_TRUE;
|
|
|
|
sd->pause = paused;
|
|
|
|
if (sd->pause)
|
|
|
|
emotion_engine_instance_stop(sd->engine_instance);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (sd->state != EMOTION_WAKEUP) emotion_object_suspend_set(obj, EMOTION_WAKEUP);
|
|
|
|
emotion_engine_instance_play(sd->engine_instance, sd->pos);
|
|
|
|
}
|
|
|
|
return EINA_TRUE;
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_play_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 08:18:57 -07:00
|
|
|
return efl_player_playing_get(obj) && !efl_player_paused_get(obj);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2019-09-24 08:18:57 -07:00
|
|
|
_efl_canvas_video_efl_player_playing_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2013-01-10 16:27:35 -08:00
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2004-06-18 08:38:03 -07:00
|
|
|
return sd->play;
|
|
|
|
}
|
|
|
|
|
2019-09-24 08:18:57 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_video_efl_player_paused_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
|
|
|
{
|
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
|
|
|
if (!sd->play) return EINA_FALSE;
|
|
|
|
return sd->pause;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_position_set(Evas_Object *obj, double sec)
|
|
|
|
{
|
2019-09-24 07:02:54 -07:00
|
|
|
efl_player_playback_position_set(obj, sec);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2019-09-24 07:02:54 -07:00
|
|
|
_efl_canvas_video_efl_player_playback_position_set(Eo *obj, Efl_Canvas_Video_Data *sd, double sec)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("sec=%f", sec);
|
2013-01-10 16:27:35 -08:00
|
|
|
if (!sd->engine_instance) return;
|
2014-10-05 17:13:14 -07:00
|
|
|
if (sec < 0.0) sec = 0.0;
|
2011-08-02 09:22:30 -07:00
|
|
|
if (!sd->open)
|
|
|
|
{
|
|
|
|
sd->remember_jump = sec;
|
2013-06-20 04:28:18 -07:00
|
|
|
return;
|
2011-08-02 09:22:30 -07:00
|
|
|
}
|
|
|
|
sd->remember_jump = 0;
|
2004-06-18 08:38:03 -07:00
|
|
|
sd->seek_pos = sec;
|
2004-07-21 21:13:28 -07:00
|
|
|
sd->seek = 1;
|
|
|
|
sd->pos = sd->seek_pos;
|
|
|
|
if (sd->job) ecore_job_del(sd->job);
|
|
|
|
sd->job = ecore_job_add(_pos_set_job, obj);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API double
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_position_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 07:02:54 -07:00
|
|
|
return efl_player_playback_position_get(obj);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static double
|
2019-09-24 07:02:54 -07:00
|
|
|
_efl_canvas_video_efl_player_playback_position_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0.0;
|
2013-01-10 16:27:35 -08:00
|
|
|
sd->pos = emotion_engine_instance_pos_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
return sd->pos;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API double
|
2012-03-05 01:33:05 -08:00
|
|
|
emotion_object_buffer_size_get(const Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2012-03-05 01:33:05 -08:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 1.0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0.0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_buffer_size_get(sd->engine_instance);
|
2012-03-05 01:33:05 -08:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_seekable_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 06:39:21 -07:00
|
|
|
return efl_playable_seekable_get(obj);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_video_handled_get(const Evas_Object *obj)
|
2005-04-24 07:42:50 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2005-04-24 07:42:50 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_video_handled(sd->engine_instance);
|
2005-04-24 07:42:50 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_audio_handled_get(const Evas_Object *obj)
|
2005-04-24 07:42:50 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2005-04-24 07:42:50 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_audio_handled(sd->engine_instance);
|
2005-04-24 07:42:50 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API double
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_play_length_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 06:39:21 -07:00
|
|
|
return efl_playable_length_get(obj);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2017-09-18 04:56:45 -07:00
|
|
|
Eina_Size2D sz;
|
2014-08-06 05:36:06 -07:00
|
|
|
|
2018-04-19 04:26:59 -07:00
|
|
|
sz = efl_gfx_image_load_controller_load_size_get(obj);
|
2017-09-18 04:56:45 -07:00
|
|
|
if (iw) *iw = sz.w;
|
|
|
|
if (ih) *ih = sz.h;
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
|
|
|
|
2017-09-18 04:56:45 -07:00
|
|
|
EOLIAN static Eina_Size2D
|
2018-04-19 04:26:59 -07:00
|
|
|
_efl_canvas_video_efl_gfx_image_load_controller_load_size_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2017-09-18 04:56:45 -07:00
|
|
|
// FIXME: Shouldn't this be efl_gfx_view_size instead?
|
|
|
|
return EINA_SIZE2D(sd->video.w, sd->video.h);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2009-06-18 01:01:23 -07:00
|
|
|
emotion_object_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2018-04-19 04:26:59 -07:00
|
|
|
efl_gfx_image_smooth_scale_set(obj, smooth);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2018-04-19 04:26:59 -07:00
|
|
|
_efl_canvas_video_efl_gfx_image_smooth_scale_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool smooth)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2004-06-18 08:38:03 -07:00
|
|
|
evas_object_image_smooth_scale_set(sd->obj, smooth);
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_smooth_scale_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2018-04-19 04:26:59 -07:00
|
|
|
return efl_gfx_image_smooth_scale_get(obj);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-19 04:26:59 -07:00
|
|
|
_efl_canvas_video_efl_gfx_image_smooth_scale_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2004-06-18 08:38:03 -07:00
|
|
|
return evas_object_image_smooth_scale_get(sd->obj);
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API double
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_ratio_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2018-04-19 04:26:59 -07:00
|
|
|
return efl_gfx_image_ratio_get(obj);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static double
|
2018-04-19 04:26:59 -07:00
|
|
|
_efl_canvas_video_efl_gfx_image_ratio_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2013-01-10 16:27:35 -08:00
|
|
|
if (!sd->engine_instance) return 0.0;
|
2004-06-18 08:38:03 -07:00
|
|
|
return sd->ratio;
|
|
|
|
}
|
|
|
|
|
2011-07-04 07:31:01 -07:00
|
|
|
/*
|
2010-07-25 11:29:01 -07:00
|
|
|
* Send a control event to the DVD.
|
|
|
|
*/
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_event_feed(sd->engine_instance, ev);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_audio_volume_set(Evas_Object *obj, double vol)
|
|
|
|
{
|
2019-09-24 11:22:11 -07:00
|
|
|
efl_audio_control_volume_set(obj, vol);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2019-09-24 11:22:11 -07:00
|
|
|
_efl_canvas_video_efl_audio_control_volume_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, double vol)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("vol=%f", vol);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_audio_channel_volume_set(sd->engine_instance, vol);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API double
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_audio_volume_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 11:22:11 -07:00
|
|
|
return efl_audio_control_volume_get(obj);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static double
|
2019-09-24 11:22:11 -07:00
|
|
|
_efl_canvas_video_efl_audio_control_volume_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0.0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_audio_channel_volume_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2009-06-18 01:01:23 -07:00
|
|
|
emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 11:22:11 -07:00
|
|
|
efl_audio_control_mute_set(obj, mute);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2019-09-24 11:22:11 -07:00
|
|
|
_efl_canvas_video_efl_audio_control_mute_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool mute)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2011-12-30 03:46:29 -08:00
|
|
|
DBG("mute=" FMT_UCHAR, mute);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_audio_channel_mute_set(sd->engine_instance, mute);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_audio_mute_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2019-09-24 11:22:11 -07:00
|
|
|
return efl_audio_control_mute_get(obj);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2019-09-24 11:22:11 -07:00
|
|
|
_efl_canvas_video_efl_audio_control_mute_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_audio_channel_mute_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_audio_channel_count(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_audio_channel_count(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_audio_channel_name_get(const Evas_Object *obj, int channel)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return NULL;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_audio_channel_name_get(sd->engine_instance, channel);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_audio_channel_set(Evas_Object *obj, int channel)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("channel=%d", channel);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_audio_channel_set(sd->engine_instance, channel);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_audio_channel_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_audio_channel_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2009-06-18 01:01:23 -07:00
|
|
|
emotion_object_video_mute_set(Evas_Object *obj, Eina_Bool mute)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2011-12-30 03:46:29 -08:00
|
|
|
DBG("mute=" FMT_UCHAR, mute);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_video_channel_mute_set(sd->engine_instance, mute);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_video_mute_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_video_channel_mute_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2013-01-02 13:03:30 -08:00
|
|
|
emotion_object_video_subtitle_file_set(Evas_Object *obj, const char *filepath)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2013-01-02 13:03:30 -08:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
DBG("subtitle=%s", filepath);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) _engine_init(obj, sd);
|
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_video_subtitle_file_set(sd->engine_instance, filepath);
|
2013-01-02 13:03:30 -08:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2013-01-02 13:03:30 -08:00
|
|
|
emotion_object_video_subtitle_file_get(const Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2013-01-02 13:03:30 -08:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return NULL;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_video_subtitle_file_get(sd->engine_instance);
|
2013-01-02 13:03:30 -08:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_video_channel_count(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_video_channel_count(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_video_channel_name_get(const Evas_Object *obj, int channel)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return NULL;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_video_channel_name_get(sd->engine_instance, channel);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_video_channel_set(Evas_Object *obj, int channel)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("channel=%d", channel);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_video_channel_set(sd->engine_instance, channel);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_video_channel_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_video_channel_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2009-06-18 01:01:23 -07:00
|
|
|
emotion_object_spu_mute_set(Evas_Object *obj, Eina_Bool mute)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2011-12-30 03:46:29 -08:00
|
|
|
DBG("mute=" FMT_UCHAR, mute);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_spu_channel_mute_set(sd->engine_instance, mute);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_spu_mute_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_spu_channel_mute_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_spu_channel_count(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_spu_channel_count(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_spu_channel_name_get(const Evas_Object *obj, int channel)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return NULL;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_spu_channel_name_get(sd->engine_instance, channel);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_spu_channel_set(Evas_Object *obj, int channel)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("channel=%d", channel);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_spu_channel_set(sd->engine_instance, channel);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_spu_channel_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_spu_channel_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_chapter_count(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_chapter_count(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_chapter_set(Evas_Object *obj, int chapter)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("chapter=%d", chapter);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_chapter_set(sd->engine_instance, chapter);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_chapter_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_chapter_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_chapter_name_get(const Evas_Object *obj, int chapter)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return NULL;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_chapter_name_get(sd->engine_instance, chapter);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_play_speed_set(Evas_Object *obj, double speed)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("speed=%f", speed);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_speed_set(sd->engine_instance, speed);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API double
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_play_speed_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0.0);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return 0.0;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_speed_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
emotion_object_eject(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_eject(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_title_get(const Evas_Object *obj)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
|
|
|
return sd->title;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_progress_info_get(const Evas_Object *obj)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
|
|
|
return sd->progress.info;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API double
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_progress_status_get(const Evas_Object *obj)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2019-09-24 11:21:04 -07:00
|
|
|
return efl_player_playback_progress_get(obj);
|
2014-08-06 05:36:06 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static double
|
2019-09-24 11:21:04 -07:00
|
|
|
_efl_canvas_video_efl_player_playback_progress_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2014-08-06 05:36:06 -07:00
|
|
|
{
|
2004-06-24 03:55:43 -07:00
|
|
|
return sd->progress.stat;
|
|
|
|
}
|
|
|
|
|
2019-12-31 06:53:10 -08:00
|
|
|
EOLIAN static void
|
|
|
|
_efl_canvas_video_efl_player_playback_progress_set(Eo *obj, Efl_Canvas_Video_Data *sd EINA_UNUSED, double progress)
|
|
|
|
{
|
|
|
|
const char *info = emotion_object_progress_info_get((const Evas_Object*)obj);
|
|
|
|
_emotion_progress_set(obj, (char*)info, progress);
|
|
|
|
}
|
|
|
|
|
2015-04-17 08:08:56 -07:00
|
|
|
EOLIAN static double
|
2019-09-24 06:39:21 -07:00
|
|
|
_efl_canvas_video_efl_playable_length_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2015-04-17 08:08:56 -07:00
|
|
|
{
|
|
|
|
if (!sd->engine_instance) return 0.0;
|
|
|
|
sd->len = emotion_engine_instance_len_get(sd->engine_instance);
|
|
|
|
return sd->len;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
2019-09-24 06:39:21 -07:00
|
|
|
_efl_canvas_video_efl_playable_seekable_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2015-04-17 08:08:56 -07:00
|
|
|
{
|
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
|
|
|
return emotion_engine_instance_seekable(sd->engine_instance);
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_ref_file_get(const Evas_Object *obj)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
|
|
|
return sd->ref.file;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_ref_num_get(const Evas_Object *obj)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
|
|
|
return sd->ref.num;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_spu_button_count_get(const Evas_Object *obj)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
|
|
|
return sd->spu.button_num;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API int
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_spu_button_get(const Evas_Object *obj)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
|
|
|
|
return sd->spu.button;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API const char *
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_meta_info_get(const Evas_Object *obj, Emotion_Meta_Info meta)
|
2004-07-24 02:53:00 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2013-01-10 16:27:35 -08:00
|
|
|
int id;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-07-24 02:53:00 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return NULL;
|
2004-07-24 02:53:00 -07:00
|
|
|
switch (meta)
|
|
|
|
{
|
|
|
|
case EMOTION_META_INFO_TRACK_TITLE:
|
2013-01-10 16:27:35 -08:00
|
|
|
id = META_TRACK_TITLE;
|
|
|
|
break;
|
2004-07-24 02:53:00 -07:00
|
|
|
case EMOTION_META_INFO_TRACK_ARTIST:
|
2013-01-10 16:27:35 -08:00
|
|
|
id = META_TRACK_ARTIST;
|
|
|
|
break;
|
2004-07-24 02:53:00 -07:00
|
|
|
case EMOTION_META_INFO_TRACK_ALBUM:
|
2013-01-10 16:27:35 -08:00
|
|
|
id = META_TRACK_ALBUM;
|
|
|
|
break;
|
2004-07-24 02:53:00 -07:00
|
|
|
case EMOTION_META_INFO_TRACK_YEAR:
|
2013-01-10 16:27:35 -08:00
|
|
|
id = META_TRACK_YEAR;
|
|
|
|
break;
|
2004-07-24 02:53:00 -07:00
|
|
|
case EMOTION_META_INFO_TRACK_GENRE:
|
2013-01-10 16:27:35 -08:00
|
|
|
id = META_TRACK_GENRE;
|
|
|
|
break;
|
2004-07-24 02:53:00 -07:00
|
|
|
case EMOTION_META_INFO_TRACK_COMMENT:
|
2013-01-10 16:27:35 -08:00
|
|
|
id = META_TRACK_COMMENT;
|
|
|
|
break;
|
2004-07-24 02:53:00 -07:00
|
|
|
case EMOTION_META_INFO_TRACK_DISC_ID:
|
2013-01-10 16:27:35 -08:00
|
|
|
id = META_TRACK_DISCID;
|
2013-07-08 05:44:39 -07:00
|
|
|
break;
|
2004-07-24 02:53:00 -07:00
|
|
|
default:
|
2013-01-10 16:27:35 -08:00
|
|
|
ERR("Unknown meta info id: %d", meta);
|
|
|
|
return NULL;
|
2004-07-24 02:53:00 -07:00
|
|
|
}
|
2013-01-10 16:27:35 -08:00
|
|
|
|
|
|
|
return emotion_engine_instance_meta_get(sd->engine_instance, id);
|
2004-07-24 02:53:00 -07:00
|
|
|
}
|
|
|
|
|
2017-01-12 14:09:49 -08:00
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Evas_Object *
|
2017-01-12 14:09:49 -08:00
|
|
|
emotion_file_meta_artwork_get(const Evas_Object *obj, const char *path, Emotion_Artwork_Info type)
|
|
|
|
{
|
|
|
|
Efl_Canvas_Video_Data *sd;
|
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
|
|
|
if (!sd->engine_instance) return NULL;
|
|
|
|
|
|
|
|
Evas *ev = evas_object_evas_get(obj);
|
|
|
|
Evas_Object *artwork = evas_object_image_add(ev);
|
|
|
|
|
|
|
|
Evas_Object *result = emotion_engine_instance_meta_artwork_get(sd->engine_instance, artwork, path, type);
|
|
|
|
if (!result) return NULL;
|
|
|
|
|
|
|
|
Evas_Load_Error _error = evas_object_image_load_error_get(result);
|
|
|
|
if (_error != EVAS_LOAD_ERROR_NONE) return NULL;
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2008-09-25 16:15:21 -07:00
|
|
|
emotion_object_vis_set(Evas_Object *obj, Emotion_Vis visualization)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2008-09-25 16:15:21 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2010-10-07 15:16:43 -07:00
|
|
|
DBG("visualization=%d", visualization);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_vis_set(sd->engine_instance, visualization);
|
2008-09-25 16:15:21 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Emotion_Vis
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_vis_get(const Evas_Object *obj)
|
2008-09-25 16:15:21 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2008-09-25 16:15:21 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_VIS_NONE);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return EMOTION_VIS_NONE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_vis_get(sd->engine_instance);
|
2008-09-25 16:15:21 -07:00
|
|
|
}
|
2004-06-24 03:55:43 -07:00
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2010-03-31 18:33:56 -07:00
|
|
|
emotion_object_vis_supported(const Evas_Object *obj, Emotion_Vis visualization)
|
2008-09-25 16:15:21 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2004-06-18 08:38:03 -07:00
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
|
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_vis_supported(sd->engine_instance, visualization);
|
2008-09-25 16:15:21 -07:00
|
|
|
}
|
2004-06-18 08:38:03 -07:00
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-10-02 20:30:39 -07:00
|
|
|
emotion_object_priority_set(Evas_Object *obj, Eina_Bool priority)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-10-02 20:30:39 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_priority_set(sd->engine_instance, priority);
|
2011-10-02 20:30:39 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Eina_Bool
|
2011-10-02 20:30:39 -07:00
|
|
|
emotion_object_priority_get(const Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-10-02 20:30:39 -07:00
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
|
|
|
|
if (!sd->engine_instance) return EINA_FALSE;
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_priority_get(sd->engine_instance);
|
2011-10-02 20:30:39 -07:00
|
|
|
}
|
|
|
|
|
2011-06-29 10:30:19 -07:00
|
|
|
#ifdef HAVE_EIO
|
|
|
|
static void
|
2017-09-06 05:26:57 -07:00
|
|
|
_eio_load_xattr_cleanup(Emotion_Xattr_Data *xattr, Eio_File *handler)
|
2011-06-29 10:30:19 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
if (handler == xattr->load) xattr->load = NULL;
|
|
|
|
_xattr_data_unref(xattr);
|
2011-06-29 10:30:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-09-20 02:40:55 -07:00
|
|
|
_eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
|
2011-06-29 10:30:19 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr = data;
|
2011-06-29 10:30:19 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
emotion_object_position_set(evas_object_smart_parent_get(xattr->obj_wref), xattr_double);
|
|
|
|
efl_event_callback_call(evas_object_smart_parent_get(xattr->obj_wref), EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_DONE, NULL);
|
|
|
|
evas_object_smart_callback_call(evas_object_smart_parent_get(xattr->obj_wref), "position_load,succeed", NULL);
|
|
|
|
_eio_load_xattr_cleanup(xattr, handler);
|
2011-06-29 10:30:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-09 19:43:32 -08:00
|
|
|
_eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
|
2011-06-29 10:30:19 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr = data;
|
2011-06-29 10:30:19 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
efl_event_callback_call(evas_object_smart_parent_get(xattr->obj_wref), EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_FAIL, NULL);
|
|
|
|
evas_object_smart_callback_call(evas_object_smart_parent_get(xattr->obj_wref), "position_load,failed", NULL);
|
|
|
|
_eio_load_xattr_cleanup(xattr, handler);
|
2011-06-29 10:30:19 -07:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-06-29 10:30:19 -07:00
|
|
|
emotion_object_last_position_load(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-06-29 10:30:19 -07:00
|
|
|
const char *tmp;
|
2011-09-20 02:40:55 -07:00
|
|
|
#ifndef HAVE_EIO
|
|
|
|
double xattr;
|
|
|
|
#endif
|
2011-06-29 10:30:19 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2013-06-20 04:28:18 -07:00
|
|
|
if (!sd->file) return;
|
2011-06-29 10:30:19 -07:00
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!strncmp(sd->file, "file://", 7)) tmp = sd->file + 7;
|
|
|
|
else if (!strstr(sd->file, "://")) tmp = sd->file;
|
|
|
|
else return;
|
2011-06-29 10:30:19 -07:00
|
|
|
|
|
|
|
#ifdef HAVE_EIO
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr = sd->xattr;
|
2011-06-29 10:30:19 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
if (xattr->load) return;
|
|
|
|
EINA_REFCOUNT_REF(xattr);
|
2011-06-29 10:30:19 -07:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
xattr->load = eio_file_xattr_double_get(tmp,
|
|
|
|
"user.e.time_seek",
|
|
|
|
_eio_load_xattr_done,
|
|
|
|
_eio_load_xattr_error,
|
|
|
|
xattr);
|
2011-06-29 10:30:19 -07:00
|
|
|
#else
|
2011-09-20 02:40:55 -07:00
|
|
|
if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr))
|
|
|
|
{
|
|
|
|
emotion_object_position_set(obj, xattr);
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_DONE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "position_load,succeed", NULL);
|
2012-02-23 09:42:04 -08:00
|
|
|
}
|
|
|
|
else
|
2016-09-21 10:37:59 -07:00
|
|
|
{
|
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_FAIL, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "position_load,failed", NULL);
|
|
|
|
}
|
2011-06-29 10:30:19 -07:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef HAVE_EIO
|
|
|
|
static void
|
2017-09-06 05:26:57 -07:00
|
|
|
_eio_save_xattr_cleanup(Emotion_Xattr_Data *xattr, Eio_File *handler)
|
2012-08-28 02:27:54 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
if (handler == xattr->save) xattr->save = NULL;
|
|
|
|
_xattr_data_unref(xattr);
|
2012-08-28 02:27:54 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_eio_save_xattr_done(void *data, Eio_File *handler)
|
2011-06-29 10:30:19 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr = data;
|
2012-02-23 09:42:04 -08:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
efl_event_callback_call(xattr->obj_wref, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_DONE, NULL);
|
|
|
|
evas_object_smart_callback_call(xattr->obj_wref, "position_save,succeed", NULL);
|
|
|
|
_eio_save_xattr_cleanup(xattr, handler);
|
2011-06-29 10:30:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-09 19:43:32 -08:00
|
|
|
_eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
|
2011-06-29 10:30:19 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr = data;
|
2012-02-23 09:42:04 -08:00
|
|
|
|
2017-09-06 05:26:57 -07:00
|
|
|
efl_event_callback_call(xattr->obj_wref, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_FAIL, NULL);
|
|
|
|
evas_object_smart_callback_call(xattr->obj_wref, "position_save,failed", NULL);
|
|
|
|
_eio_save_xattr_cleanup(xattr, handler);
|
2011-06-29 10:30:19 -07:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-06-29 10:30:19 -07:00
|
|
|
emotion_object_last_position_save(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-06-29 10:30:19 -07:00
|
|
|
const char *tmp;
|
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2013-06-20 04:28:18 -07:00
|
|
|
if (!sd->file) return;
|
2011-06-29 10:30:19 -07:00
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!strncmp(sd->file, "file://", 7)) tmp = sd->file + 7;
|
|
|
|
else if (!strstr(sd->file, "://")) tmp = sd->file;
|
|
|
|
else return;
|
2011-06-29 10:30:19 -07:00
|
|
|
#ifdef HAVE_EIO
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr = sd->xattr;
|
|
|
|
|
|
|
|
if (xattr->save) return;
|
|
|
|
EINA_REFCOUNT_REF(xattr);
|
|
|
|
|
|
|
|
xattr->save = eio_file_xattr_double_set(tmp,
|
|
|
|
"user.e.time_seek",
|
|
|
|
emotion_object_position_get(obj),
|
|
|
|
0,
|
|
|
|
_eio_save_xattr_done,
|
|
|
|
_eio_save_xattr_error,
|
|
|
|
xattr);
|
2011-06-29 10:30:19 -07:00
|
|
|
#else
|
2012-02-23 09:42:04 -08:00
|
|
|
if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0))
|
2016-09-21 10:37:59 -07:00
|
|
|
{
|
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_DONE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "position_save,succeed", NULL);
|
|
|
|
}
|
2012-02-23 09:42:04 -08:00
|
|
|
else
|
2016-09-21 10:37:59 -07:00
|
|
|
{
|
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_FAIL, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "position_save,failed", NULL);
|
|
|
|
}
|
2011-06-29 10:30:19 -07:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-07-01 01:57:54 -07:00
|
|
|
emotion_object_suspend_set(Evas_Object *obj, Emotion_Suspend state)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-07-01 01:57:54 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
switch (state)
|
|
|
|
{
|
|
|
|
case EMOTION_WAKEUP:
|
|
|
|
/* Restore the rendering pipeline, offset and everything back to play again (this will be called automatically by play_set) */
|
|
|
|
case EMOTION_SLEEP:
|
|
|
|
/* This destroy some part of the rendering pipeline */
|
|
|
|
case EMOTION_DEEP_SLEEP:
|
|
|
|
/* This destroy all the rendering pipeline and just keep the last rendered image (fullscreen) */
|
|
|
|
case EMOTION_HIBERNATE:
|
|
|
|
/* This destroy all the rendering pipeline and keep 1/4 of the last rendered image */
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
sd->state = state;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API Emotion_Suspend
|
2013-01-04 18:46:03 -08:00
|
|
|
emotion_object_suspend_get(Evas_Object *obj)
|
2011-07-01 01:57:54 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-07-01 01:57:54 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_WAKEUP);
|
|
|
|
return sd->state;
|
|
|
|
}
|
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
/*****************************/
|
|
|
|
/* Utility calls for modules */
|
|
|
|
/*****************************/
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void *
|
2010-03-31 18:33:56 -07:00
|
|
|
_emotion_video_get(const Evas_Object *obj)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
|
2013-01-10 16:27:35 -08:00
|
|
|
return emotion_engine_instance_data_get(sd->engine_instance);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
2012-06-18 23:52:29 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_emotion_frame_anim(void *data)
|
|
|
|
{
|
|
|
|
Evas_Object *obj = data;
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2012-06-18 23:52:29 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
|
|
|
|
|
2014-08-31 20:45:41 -07:00
|
|
|
sd->anim = NULL;
|
2012-06-18 23:52:29 -07:00
|
|
|
evas_object_image_pixels_dirty_set(sd->obj, 1);
|
2014-08-31 20:45:41 -07:00
|
|
|
_emotion_video_pos_update(obj,
|
|
|
|
emotion_engine_instance_pos_get(sd->engine_instance),
|
|
|
|
emotion_engine_instance_len_get(sd->engine_instance));
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_FRAME_DECODE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "frame_decode", NULL);
|
2012-06-18 23:52:29 -07:00
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
_emotion_frame_new(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2018-09-18 07:43:14 -07:00
|
|
|
if (!sd->anim)
|
|
|
|
sd->anim = ecore_evas_animator_add(obj, _emotion_frame_anim, obj);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
_emotion_video_pos_update(Evas_Object *obj, double pos, double len)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2004-06-18 08:38:03 -07:00
|
|
|
int npos = 0, nlen = 0;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2017-01-06 09:57:46 -08:00
|
|
|
if (!EINA_DBL_EQ(pos, sd->pos)) npos = 1;
|
|
|
|
if (!EINA_DBL_EQ(len, sd->len)) nlen = 1;
|
2004-06-18 08:38:03 -07:00
|
|
|
sd->pos = pos;
|
|
|
|
sd->len = len;
|
2016-09-21 10:37:59 -07:00
|
|
|
if (npos)
|
|
|
|
{
|
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "position_update", NULL);
|
|
|
|
}
|
|
|
|
if (nlen)
|
|
|
|
{
|
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_LENGTH_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "length_change", NULL);
|
|
|
|
}
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-18 08:38:03 -07:00
|
|
|
_emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-06-24 07:11:24 -07:00
|
|
|
double tmp;
|
2004-06-18 08:38:03 -07:00
|
|
|
int changed = 0;
|
2005-10-02 05:19:36 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2011-10-21 07:59:22 -07:00
|
|
|
if ((w != sd->video.w) || (h != sd->video.h))
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2011-10-21 07:59:22 -07:00
|
|
|
sd->video.w = w;
|
|
|
|
sd->video.h = h;
|
2010-10-10 16:39:32 -07:00
|
|
|
_emotion_image_data_zero(sd->obj);
|
2014-08-22 01:37:50 -07:00
|
|
|
changed = 1;
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
2011-06-24 07:11:24 -07:00
|
|
|
if (h > 0) tmp = (double)w / (double)h;
|
|
|
|
else tmp = 1.0;
|
2017-01-06 09:57:46 -08:00
|
|
|
if (!EINA_DBL_EQ(ratio, tmp)) tmp = ratio;
|
|
|
|
if (!EINA_DBL_EQ(tmp, sd->ratio))
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
sd->ratio = tmp;
|
|
|
|
changed = 1;
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
2011-06-24 07:11:24 -07:00
|
|
|
if (changed)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
evas_object_size_hint_request_set(obj, w, h);
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_FRAME_RESIZE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "frame_resize", NULL);
|
2014-08-22 01:37:50 -07:00
|
|
|
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_aspect_border_apply(obj, sd, w, h);
|
2011-06-24 07:11:24 -07:00
|
|
|
}
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2012-08-28 02:17:34 -07:00
|
|
|
_emotion_image_reset(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2012-08-28 02:17:34 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
_emotion_image_data_zero(sd->obj);
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-24 03:55:43 -07:00
|
|
|
_emotion_decode_stop(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
if (sd->play)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
sd->play = 0;
|
2016-09-21 10:37:59 -07:00
|
|
|
evas_object_smart_callback_call(obj, "decode_stop", NULL);
|
2004-06-24 03:55:43 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2010-09-27 03:11:52 -07:00
|
|
|
_emotion_open_done(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-08-02 09:22:30 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
sd->open = 1;
|
|
|
|
|
2017-01-06 09:57:46 -08:00
|
|
|
if (!EINA_DBL_EQ(sd->remember_jump, 0.0))
|
2011-08-02 09:22:30 -07:00
|
|
|
emotion_object_position_set(obj, sd->remember_jump);
|
|
|
|
if (sd->remember_play != sd->play)
|
2019-09-24 08:18:57 -07:00
|
|
|
{
|
|
|
|
if (sd->pause)
|
|
|
|
sd->play = sd->remember_play;
|
|
|
|
else
|
|
|
|
emotion_object_play_set(obj, sd->remember_play);
|
|
|
|
}
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_OPEN_DONE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "open_done", NULL);
|
2010-09-27 03:11:52 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2010-09-27 03:11:52 -07:00
|
|
|
_emotion_playback_started(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PLAYBACK_START, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "playback_started", NULL);
|
2010-09-27 03:11:52 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2005-04-15 00:27:02 -07:00
|
|
|
_emotion_playback_finished(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2016-09-25 03:11:32 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PLAYBACK_STOP, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "playback_finished", NULL);
|
2005-04-15 00:27:02 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2007-05-05 22:03:18 -07:00
|
|
|
_emotion_audio_level_change(Evas_Object *obj)
|
2005-04-24 07:42:50 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_VOLUME_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "audio_level_change", NULL);
|
2005-04-24 07:42:50 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-24 03:55:43 -07:00
|
|
|
_emotion_channels_change(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_CHANNELS_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "channels_change", NULL);
|
2004-06-24 03:55:43 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-24 03:55:43 -07:00
|
|
|
_emotion_title_set(Evas_Object *obj, char *title)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2014-04-27 04:10:25 -07:00
|
|
|
eina_stringshare_replace(&sd->title, title);
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_TITLE_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "title_change", NULL);
|
2004-06-24 03:55:43 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-06-29 10:30:19 -07:00
|
|
|
_emotion_progress_set(Evas_Object *obj, char *info, double st)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2014-04-27 04:10:25 -07:00
|
|
|
eina_stringshare_replace(&sd->progress.info, info);
|
2011-06-29 10:30:19 -07:00
|
|
|
sd->progress.stat = st;
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PROGRESS_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "progress_change", NULL);
|
2004-06-24 03:55:43 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2009-11-08 12:27:12 -08:00
|
|
|
_emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
|
2004-06-24 03:55:43 -07:00
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2014-04-27 04:10:25 -07:00
|
|
|
eina_stringshare_replace(&sd->ref.file, file);
|
2004-06-24 03:55:43 -07:00
|
|
|
sd->ref.num = num;
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_REF_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "ref_change", NULL);
|
2004-06-24 03:55:43 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-24 03:55:43 -07:00
|
|
|
_emotion_spu_button_num_set(Evas_Object *obj, int num)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
sd->spu.button_num = num;
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_BUTTON_NUM_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "button_num_change", NULL);
|
2004-06-24 03:55:43 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2004-06-24 03:55:43 -07:00
|
|
|
_emotion_spu_button_set(Evas_Object *obj, int button)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-24 03:55:43 -07:00
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
sd->spu.button = button;
|
2016-09-21 10:37:59 -07:00
|
|
|
efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_BUTTON_CHANGE, NULL);
|
|
|
|
evas_object_smart_callback_call(obj, "button_change", NULL);
|
2004-06-24 03:55:43 -07:00
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2010-09-27 03:11:52 -07:00
|
|
|
_emotion_seek_done(Evas_Object *obj)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2010-09-27 03:11:52 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
if (sd->seeking)
|
|
|
|
{
|
|
|
|
sd->seeking = 0;
|
|
|
|
if (sd->seek) emotion_object_position_set(obj, sd->seek_pos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
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
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, jptiz, lucas
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 02:31:30 -08:00
|
|
|
EMOTION_API void
|
2011-10-21 07:59:22 -07:00
|
|
|
_emotion_frame_refill(Evas_Object *obj, double w, double h)
|
|
|
|
{
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2011-10-21 07:59:22 -07:00
|
|
|
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
2017-01-06 09:57:46 -08:00
|
|
|
if ((!EINA_DBL_EQ(sd->fill.w, w)) ||
|
|
|
|
(!EINA_DBL_EQ(sd->fill.h, h)))
|
2011-10-21 07:59:22 -07:00
|
|
|
{
|
|
|
|
Evas_Coord ow, oh;
|
|
|
|
|
|
|
|
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
2014-08-22 01:37:50 -07:00
|
|
|
if ((w <= 0) || (h <= 0))
|
2011-10-21 07:59:22 -07:00
|
|
|
{
|
|
|
|
double scale_w, scale_h;
|
|
|
|
|
|
|
|
sd->fill.w = -1;
|
|
|
|
sd->fill.h = -1;
|
2010-09-27 03:11:52 -07:00
|
|
|
|
2014-08-22 01:37:50 -07:00
|
|
|
scale_w = (double)ow / (double)(sd->video.w - sd->crop.l - sd->crop.r);
|
|
|
|
scale_h = (double)oh / (double)(sd->video.h - sd->crop.t - sd->crop.b);
|
2011-10-21 07:59:22 -07:00
|
|
|
evas_object_image_fill_set(sd->obj, 0, 0, scale_w * sd->video.w, scale_h * sd->video.h);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sd->fill.w = w;
|
|
|
|
sd->fill.h = h;
|
|
|
|
evas_object_image_fill_set(sd->obj, 0, 0, w * ow, h * oh);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-06-18 08:38:03 -07:00
|
|
|
|
|
|
|
/****************************/
|
|
|
|
/* Internal object routines */
|
|
|
|
/****************************/
|
|
|
|
|
2007-10-31 12:34:39 -07:00
|
|
|
static void
|
2013-01-09 19:43:32 -08:00
|
|
|
_mouse_move(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info)
|
2007-10-31 12:34:39 -07:00
|
|
|
{
|
2004-06-18 08:38:03 -07:00
|
|
|
Evas_Event_Mouse_Move *e;
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2004-06-18 08:38:03 -07:00
|
|
|
int x, y, iw, ih;
|
|
|
|
Evas_Coord ox, oy, ow, oh;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
e = event_info;
|
|
|
|
sd = data;
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2004-06-18 08:38:03 -07:00
|
|
|
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
|
|
|
|
evas_object_image_size_get(obj, &iw, &ih);
|
|
|
|
if ((iw < 1) || (ih < 1)) return;
|
|
|
|
x = (((int)e->cur.canvas.x - ox) * iw) / ow;
|
|
|
|
y = (((int)e->cur.canvas.y - oy) * ih) / oh;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_event_mouse_move_feed(sd->engine_instance, x, y);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
2007-10-31 12:34:39 -07:00
|
|
|
static void
|
2013-01-09 19:43:32 -08:00
|
|
|
_mouse_down(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info)
|
2007-10-31 12:34:39 -07:00
|
|
|
{
|
2004-06-18 08:38:03 -07:00
|
|
|
Evas_Event_Mouse_Down *e;
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2004-06-18 08:38:03 -07:00
|
|
|
int x, y, iw, ih;
|
|
|
|
Evas_Coord ox, oy, ow, oh;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
e = event_info;
|
|
|
|
sd = data;
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2004-06-18 08:38:03 -07:00
|
|
|
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
|
|
|
|
evas_object_image_size_get(obj, &iw, &ih);
|
|
|
|
if ((iw < 1) || (ih < 1)) return;
|
|
|
|
x = (((int)e->canvas.x - ox) * iw) / ow;
|
|
|
|
y = (((int)e->canvas.y - oy) * ih) / oh;
|
2013-01-10 16:27:35 -08:00
|
|
|
emotion_engine_instance_event_mouse_button_feed(sd->engine_instance, 1, x, y);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
2004-07-21 21:13:28 -07:00
|
|
|
static void
|
|
|
|
_pos_set_job(void *data)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-07-21 21:13:28 -07:00
|
|
|
obj = data;
|
|
|
|
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
|
|
|
sd->job = NULL;
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2010-09-27 03:11:52 -07:00
|
|
|
if (sd->seeking) return;
|
2004-07-21 21:13:28 -07:00
|
|
|
if (sd->seek)
|
|
|
|
{
|
2010-09-27 03:11:52 -07:00
|
|
|
sd->seeking = 1;
|
2014-08-22 01:37:50 -07:00
|
|
|
emotion_engine_instance_pos_set(sd->engine_instance, sd->seek_pos);
|
|
|
|
sd->seek = 0;
|
2004-07-21 21:13:28 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
/* called by evas when it needs pixels for the image object */
|
|
|
|
static void
|
|
|
|
_pixels_get(void *data, Evas_Object *obj)
|
|
|
|
{
|
|
|
|
int iw, ih, w, h;
|
2016-09-21 10:37:59 -07:00
|
|
|
Efl_Canvas_Video_Data *sd;
|
2005-07-08 16:08:48 -07:00
|
|
|
Emotion_Format format;
|
2006-12-19 06:15:17 -08:00
|
|
|
unsigned char *bgra_data;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
sd = data;
|
2014-08-22 01:37:50 -07:00
|
|
|
if (!sd->engine_instance) return;
|
2017-04-17 15:06:28 -07:00
|
|
|
emotion_engine_instance_video_data_size_get(sd->engine_instance, &w, &h);
|
2007-10-28 03:19:09 -07:00
|
|
|
w = (w >> 1) << 1;
|
|
|
|
h = (h >> 1) << 1;
|
2011-09-02 06:10:22 -07:00
|
|
|
|
|
|
|
evas_object_image_colorspace_set(obj, EVAS_COLORSPACE_YCBCR422P601_PL);
|
|
|
|
evas_object_image_alpha_set(obj, 0);
|
|
|
|
evas_object_image_size_set(obj, w, h);
|
|
|
|
iw = w;
|
|
|
|
ih = h;
|
|
|
|
|
|
|
|
if ((iw <= 1) || (ih <= 1))
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2010-10-10 16:39:32 -07:00
|
|
|
_emotion_image_data_zero(sd->obj);
|
2014-08-22 01:37:50 -07:00
|
|
|
evas_object_image_pixels_dirty_set(obj, 0);
|
2006-12-19 06:15:17 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
format = emotion_engine_instance_format_get(sd->engine_instance);
|
|
|
|
if ((format == EMOTION_FORMAT_YV12) || (format == EMOTION_FORMAT_I420))
|
|
|
|
{
|
|
|
|
unsigned char **rows;
|
|
|
|
|
|
|
|
evas_object_image_colorspace_set(obj, EVAS_COLORSPACE_YCBCR422P601_PL);
|
|
|
|
rows = evas_object_image_data_get(obj, 1);
|
|
|
|
if (rows)
|
|
|
|
{
|
|
|
|
if (emotion_engine_instance_yuv_rows_get(sd->engine_instance, iw, ih,
|
2013-01-10 16:27:35 -08:00
|
|
|
rows,
|
|
|
|
&rows[ih],
|
|
|
|
&rows[ih + (ih / 2)]))
|
2014-08-22 01:37:50 -07:00
|
|
|
evas_object_image_data_update_add(obj, 0, 0, iw, ih);
|
|
|
|
}
|
|
|
|
evas_object_image_data_set(obj, rows);
|
|
|
|
evas_object_image_pixels_dirty_set(obj, 0);
|
|
|
|
}
|
|
|
|
else if (format == EMOTION_FORMAT_BGRA)
|
|
|
|
{
|
|
|
|
evas_object_image_colorspace_set(obj, EVAS_COLORSPACE_ARGB8888);
|
|
|
|
if (emotion_engine_instance_bgra_data_get(sd->engine_instance, &bgra_data))
|
|
|
|
{
|
|
|
|
evas_object_image_data_set(obj, bgra_data);
|
|
|
|
evas_object_image_pixels_dirty_set(obj, 0);
|
|
|
|
}
|
|
|
|
}
|
2006-12-19 06:15:17 -08:00
|
|
|
}
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************/
|
|
|
|
/* Internal smart object required routines */
|
|
|
|
/*******************************************/
|
2009-12-30 02:49:06 -08:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_efl_canvas_group_group_add(Evas_Object *obj, Efl_Canvas_Video_Data *sd)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2017-09-06 05:26:57 -07:00
|
|
|
Emotion_Xattr_Data *xattr;
|
2007-03-12 19:30:14 -07:00
|
|
|
unsigned int *pixel;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2013-01-09 21:48:55 -08:00
|
|
|
/* TODO: remove legacy: emotion used to have no init, call automatically */
|
|
|
|
emotion_init();
|
|
|
|
|
2017-09-06 07:03:30 -07:00
|
|
|
efl_canvas_group_add(efl_super(obj, MY_CLASS));
|
|
|
|
|
2011-07-01 01:57:54 -07:00
|
|
|
sd->state = EMOTION_WAKEUP;
|
2004-06-18 08:38:03 -07:00
|
|
|
sd->obj = evas_object_image_add(evas_object_evas_get(obj));
|
2011-09-15 11:51:27 -07:00
|
|
|
sd->bg = evas_object_rectangle_add(evas_object_evas_get(obj));
|
2014-08-22 01:37:50 -07:00
|
|
|
sd->engine = eina_stringshare_add("gstreamer1");
|
2011-09-15 11:51:27 -07:00
|
|
|
evas_object_color_set(sd->bg, 0, 0, 0, 0);
|
2004-06-18 08:38:03 -07:00
|
|
|
evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, sd);
|
|
|
|
evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, sd);
|
|
|
|
evas_object_image_pixels_get_callback_set(sd->obj, _pixels_get, sd);
|
|
|
|
evas_object_smart_member_add(sd->obj, obj);
|
2011-09-15 11:51:27 -07:00
|
|
|
evas_object_smart_member_add(sd->bg, obj);
|
|
|
|
evas_object_lower(sd->bg);
|
2004-06-18 08:38:03 -07:00
|
|
|
sd->ratio = 1.0;
|
2004-06-24 03:55:43 -07:00
|
|
|
sd->spu.button = -1;
|
2011-10-21 07:59:22 -07:00
|
|
|
sd->fill.w = -1;
|
|
|
|
sd->fill.h = -1;
|
2004-06-18 08:38:03 -07:00
|
|
|
evas_object_image_alpha_set(sd->obj, 0);
|
2007-10-24 21:52:39 -07:00
|
|
|
pixel = evas_object_image_data_get(sd->obj, 1);
|
2007-03-12 19:30:14 -07:00
|
|
|
if (pixel)
|
|
|
|
{
|
2014-08-22 01:37:50 -07:00
|
|
|
*pixel = 0xff000000;
|
|
|
|
evas_object_image_data_set(obj, pixel);
|
2007-03-12 19:30:14 -07:00
|
|
|
}
|
2017-09-06 07:03:30 -07:00
|
|
|
evas_object_show(sd->obj);
|
|
|
|
evas_object_show(sd->bg);
|
2017-09-06 05:26:57 -07:00
|
|
|
|
|
|
|
xattr = calloc(1, sizeof(*xattr));
|
|
|
|
EINA_REFCOUNT_INIT(xattr);
|
|
|
|
efl_wref_add(obj, &xattr->obj_wref);
|
|
|
|
sd->xattr = xattr;
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2016-09-21 10:37:59 -07:00
|
|
|
_efl_canvas_video_efl_canvas_group_group_del(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2013-03-11 00:54:59 -07:00
|
|
|
if (sd->engine_instance)
|
|
|
|
{
|
|
|
|
emotion_engine_instance_file_close(sd->engine_instance);
|
|
|
|
emotion_engine_instance_del(sd->engine_instance);
|
|
|
|
}
|
|
|
|
sd->engine_instance = NULL;
|
|
|
|
if (sd->job) ecore_job_del(sd->job);
|
|
|
|
sd->job = NULL;
|
|
|
|
if (sd->anim) ecore_animator_del(sd->anim);
|
|
|
|
sd->anim = NULL;
|
2017-09-06 07:03:30 -07:00
|
|
|
eina_stringshare_del(sd->file);
|
2014-04-27 04:10:25 -07:00
|
|
|
eina_stringshare_del(sd->progress.info);
|
|
|
|
eina_stringshare_del(sd->ref.file);
|
2017-09-06 07:03:30 -07:00
|
|
|
sd->file = NULL;
|
|
|
|
sd->progress.info = NULL;
|
2013-03-11 00:54:59 -07:00
|
|
|
sd->ref.file = NULL;
|
2017-09-06 05:26:57 -07:00
|
|
|
_xattr_data_unref(sd->xattr);
|
2017-02-15 03:07:11 -08:00
|
|
|
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
2018-03-27 13:01:53 -07:00
|
|
|
emotion_shutdown();
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_canvas_video_efl_gfx_entity_position_set(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Eina_Position2D pos)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2017-09-15 02:37:25 -07:00
|
|
|
Eina_Size2D sz;
|
2007-10-31 12:34:39 -07:00
|
|
|
|
2017-09-14 20:14:32 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
|
2016-10-10 20:39:05 -07:00
|
|
|
return;
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos);
|
2016-10-10 20:39:05 -07:00
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
sz = efl_gfx_entity_size_get(obj);
|
2017-09-15 02:37:25 -07:00
|
|
|
_clipper_position_size_update(obj, pos.x, pos.y, sz.w, sz.h, sd->video.w, sd->video.h);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
2014-08-06 05:36:06 -07:00
|
|
|
EOLIAN static void
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_canvas_video_efl_gfx_entity_size_set(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Eina_Size2D sz)
|
2004-06-18 08:38:03 -07:00
|
|
|
{
|
2017-09-15 02:37:25 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
return;
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz);
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
|
2017-09-15 02:37:25 -07:00
|
|
|
_efl_canvas_video_aspect_border_apply(obj, sd, sz.w, sz.h);
|
|
|
|
evas_object_resize(sd->bg, sz.w, sz.h);
|
2004-06-18 08:38:03 -07:00
|
|
|
}
|
|
|
|
|
2017-05-18 01:52:17 -07:00
|
|
|
/* Internal EO APIs and hidden overrides */
|
|
|
|
|
|
|
|
#define EFL_CANVAS_VIDEO_EXTRA_OPS \
|
|
|
|
EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_canvas_video)
|
|
|
|
|
|
|
|
|
2016-09-21 10:37:59 -07:00
|
|
|
#include "efl_canvas_video.eo.c"
|
2019-03-05 14:00:37 -08:00
|
|
|
#include "efl_canvas_video_eo.legacy.c"
|