forked from enlightenment/efl
Merge branch 'master' into devs/hermet/lottie
This commit is contained in:
commit
0992ef8c80
|
@ -19,7 +19,7 @@ if [ "$DISTRO" != "" ] ; then
|
|||
# - RPM fusion repo for xine and libvlc
|
||||
ENABLED_LINUX_COPTS=" -Dfb=true -Dsdl=true -Dbuffer=true -Dbuild-id=travis-build \
|
||||
-Ddebug-threads=true -Dglib=true -Dg-mainloop=true -Dxpresent=true -Dxgesture=false -Dxinput22=true \
|
||||
-Devas-loaders-disabler=json -Decore-imf-loaders-disabler= -Demotion-loaders-disabler=gstreamer,libvlc,xine \
|
||||
-Devas-loaders-disabler=json -Decore-imf-loaders-disabler= -Demotion-loaders-disabler=libvlc,xine \
|
||||
-Demotion-generic-loaders-disabler=vlc -Dharfbuzz=true -Dpixman=true -Dhyphen=true \
|
||||
-Dvnc-server=true -Dbindings=luajit -Delogind=false -Dinstall-eo-files=true -Dphysics=true"
|
||||
|
||||
|
@ -29,7 +29,7 @@ if [ "$DISTRO" != "" ] ; then
|
|||
-Dcrypto=gnutls -Dglib=false -Dgstreamer=false -Dsystemd=false -Dpulseaudio=false \
|
||||
-Dnetwork-backend=connman -Dxinput2=false -Dtslib=false \
|
||||
-Devas-loaders-disabler=gst,pdf,ps,raw,svg,xcf,bmp,dds,eet,generic,gif,ico,jp2k,json,pmaps,psd,tga,tgv,tiff,wbmp,webp,xpm \
|
||||
-Decore-imf-loaders-disabler=xim,ibus,scim -Demotion-loaders-disabler=gstreamer,gstreamer1,libvlc,xine \
|
||||
-Decore-imf-loaders-disabler=xim,ibus,scim -Demotion-loaders-disabler=gstreamer1,libvlc,xine \
|
||||
-Demotion-generic-loaders-disabler=vlc -Dfribidi=false -Dfontconfig=false \
|
||||
-Dedje-sound-and-video=false -Dembedded-lz4=false -Dlibmount=false -Dv4l2=false \
|
||||
-Delua=true -Dnls=false -Dbindings= -Dlua-interpreter=luajit -Dnative-arch-optimization=false"
|
||||
|
@ -109,6 +109,6 @@ else
|
|||
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/Cellar/libffi/$LIBFFI_VER/lib/pkgconfig"
|
||||
export CC="ccache gcc"
|
||||
travis_fold meson meson
|
||||
mkdir build && meson build -Dopengl=full -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Dbindings=luajit -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Demotion-loaders-disabler=gstreamer,gstreamer1,libvlc,xine
|
||||
mkdir build && meson build -Dopengl=full -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Dbindings=luajit -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Demotion-loaders-disabler=gstreamer1,libvlc,xine
|
||||
travis_endfold meson
|
||||
fi
|
||||
|
|
|
@ -39,9 +39,7 @@ pieces of information you will need.
|
|||
|
||||
Q. Do I need to make the source public of libraries or applications that I
|
||||
build on top of EFL?
|
||||
A. No, UNLESS you use the escape library. Escape is GPL. This is ONLY
|
||||
needed for PS3 development, so unless you are doing this, it is not
|
||||
relevant.
|
||||
A. No
|
||||
|
||||
Q. Do I need to provide the source for EFL?
|
||||
A. Yes. In general you do. If you are shipping any of the binaries or
|
||||
|
|
12
README
12
README
|
@ -365,16 +365,6 @@ their behavior as if they were real physical objects.
|
|||
|
||||
|
||||
|
||||
**Escape:**
|
||||
|
||||
//GPL v2 license//
|
||||
|
||||
This library is used as a compatibility library to provide missing
|
||||
libc APIs for porting to the Playstation 3 (PS3) native runtime
|
||||
environment.
|
||||
|
||||
|
||||
|
||||
**Ethumb:**
|
||||
|
||||
//LGPL v2 license//
|
||||
|
@ -436,7 +426,7 @@ Required by default:
|
|||
* bullet
|
||||
* libpng
|
||||
* libjpeg
|
||||
* gstreamer (1.x, 0.10 support optional. Ensure all codecs you want are installed.)
|
||||
* gstreamer (Ensure all codecs you want are installed.)
|
||||
* zlib
|
||||
* luajit (lua 5.1 or 5.2 support optional)
|
||||
* libtiff
|
||||
|
|
|
@ -31,7 +31,7 @@ Comment[el]=Επιλέξτε αυτό για να ξεκινήσετε την α
|
|||
Comment[eo]=Elektu tion por restartigi la pravalorizan agordon.
|
||||
Comment[es]=Seleccione esto para reestablecer la configuración inicial.
|
||||
Comment[fi]=Valitse tämä käynnistääksesi alkuasetusvelhon.
|
||||
Comment[fr]=Sélectionnez ceci pour retrouver la configuration par défaut et reprendre le paramétrage initial.
|
||||
Comment[fr]=Sélectionnez ceci pour recommencer la configuration initiale.
|
||||
Comment[gl]=Seleccione isto para volverr á configuración inicial.
|
||||
Comment[hu]=Válaszd ezt az alap beállítáok megismétléséhez.
|
||||
Comment[it]=Selezionare questo per riprendere la configurazione iniziale.
|
||||
|
|
|
@ -209,12 +209,6 @@
|
|||
* @brief Microsoft Windows portability layer.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Escape Escape
|
||||
*
|
||||
* @brief PlayStation3 portability layer.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup Ecore Ecore
|
||||
*
|
||||
|
|
|
@ -48,7 +48,6 @@ header_checks = [
|
|||
'sys/resource.h',
|
||||
'sys/times.h',
|
||||
'longinfo.h',
|
||||
'exotic.h',
|
||||
'ieeefp.h',
|
||||
'node/uv.h',
|
||||
'sys/timerfd.h',
|
||||
|
|
|
@ -209,8 +209,8 @@ option('ecore-imf-loaders-disabler',
|
|||
option('emotion-loaders-disabler',
|
||||
type : 'array',
|
||||
description : 'List of video back-ends to disable in efl',
|
||||
choices : ['gstreamer', 'gstreamer1', 'libvlc', 'xine'],
|
||||
value : ['gstreamer', 'libvlc', 'xine']
|
||||
choices : ['gstreamer1', 'libvlc', 'xine'],
|
||||
value : ['libvlc', 'xine']
|
||||
)
|
||||
|
||||
option('emotion-generic-loaders-disabler',
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
The Escape library is a library that acts implements some of the missing
|
||||
function from the PS3 GameOS system that are needed for the proper
|
||||
functioning of the EFL.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
#include <Ecore_Getopt.h>
|
||||
#include <Ecore_Evas.h>
|
||||
|
||||
#if defined(_WIN32) || defined(EXOTIC_NO_SIGNAL)
|
||||
#if defined(_WIN32)
|
||||
# define NO_SIGNAL
|
||||
#else
|
||||
# include <signal.h>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
typedef struct _App_Data
|
||||
{
|
||||
Efl_Canvas_Animation *parallel_show_anim;
|
||||
Efl_Canvas_Animation *parallel_hide_anim;
|
||||
Elm_Button *button;
|
||||
|
||||
|
@ -49,7 +48,7 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
|||
if (ad->is_btn_visible)
|
||||
{
|
||||
//Create Animation Object from Animation
|
||||
efl_canvas_object_animation_start(ad->button, ad->parallel_show_anim, 1.0, 0.0);
|
||||
efl_canvas_object_animation_start(ad->button, ad->parallel_hide_anim, -1.0, 0.0);
|
||||
efl_text_set(obj, "Start Parallel Group Animation to hide button");
|
||||
}
|
||||
else
|
||||
|
@ -88,29 +87,6 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
|||
evas_object_show(btn);
|
||||
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
|
||||
|
||||
//Show Animation
|
||||
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
|
||||
efl_animation_alpha_set(show_anim, 0.0, 1.0);
|
||||
|
||||
//Rotate from 45 to 0 degrees Animation
|
||||
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
|
||||
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, EINA_VECTOR2(0.5, 0.5));
|
||||
|
||||
//Scale Animation to zoom out
|
||||
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
|
||||
efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), NULL, EINA_VECTOR2(0.5, 0.5));
|
||||
|
||||
//Show Parallel Group Animation
|
||||
Efl_Canvas_Animation *parallel_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win);
|
||||
efl_animation_duration_set(parallel_show_anim, 1.0);
|
||||
efl_animation_final_state_keep_set(parallel_show_anim, EINA_TRUE);
|
||||
|
||||
//Add animations to group animation
|
||||
efl_animation_group_animation_add(parallel_show_anim, show_anim);
|
||||
efl_animation_group_animation_add(parallel_show_anim, ccw_45_degrees_anim);
|
||||
efl_animation_group_animation_add(parallel_show_anim, scale_half_anim);
|
||||
|
||||
|
||||
//Hide Animation
|
||||
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
|
||||
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
|
||||
|
@ -135,7 +111,6 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
|||
|
||||
|
||||
//Initialize App Data
|
||||
ad->parallel_show_anim = parallel_show_anim;
|
||||
ad->parallel_hide_anim = parallel_hide_anim;
|
||||
ad->button = btn;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
typedef struct _App_Data
|
||||
{
|
||||
Efl_Canvas_Animation *sequential_show_anim;
|
||||
Efl_Canvas_Animation *sequential_hide_anim;
|
||||
Elm_Button *button;
|
||||
|
||||
|
@ -49,7 +48,7 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
|||
if (ad->is_btn_visible)
|
||||
{
|
||||
//Create Animation Object from Animation
|
||||
efl_canvas_object_animation_start(ad->button, ad->sequential_show_anim, 1.0, 0.0);
|
||||
efl_canvas_object_animation_start(ad->button, ad->sequential_hide_anim, -1.0, 0.0);
|
||||
efl_text_set(obj, "Start Sequential Group Animation to hide button");
|
||||
}
|
||||
else
|
||||
|
@ -111,37 +110,7 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
|
|||
efl_animation_group_animation_add(sequential_hide_anim, scale_double_anim);
|
||||
efl_animation_group_animation_add(sequential_hide_anim, hide_anim);
|
||||
|
||||
|
||||
/* Animations to show button */
|
||||
//Show Animation
|
||||
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
|
||||
efl_animation_alpha_set(show_anim, 0.0, 1.0);
|
||||
efl_animation_duration_set(show_anim, 1.0);
|
||||
|
||||
//Scale Animation to zoom out
|
||||
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
|
||||
efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), NULL, EINA_VECTOR2(0.5, 0.5));
|
||||
efl_animation_duration_set(scale_half_anim, 1.0);
|
||||
|
||||
//Rotate from 45 to 0 degrees Animation
|
||||
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
|
||||
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, EINA_VECTOR2(0.5, 0.5));
|
||||
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
|
||||
|
||||
//Show Sequential Group Animation
|
||||
Efl_Canvas_Animation *sequential_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS, win);
|
||||
efl_animation_final_state_keep_set(sequential_show_anim, EINA_TRUE);
|
||||
//efl_animation_duration_set() is called for each animation not to set the same duration
|
||||
|
||||
//Add animations to group animation
|
||||
//First, parallel_hide_anim is added with duration 0 to set the initial state
|
||||
efl_animation_group_animation_add(sequential_show_anim, show_anim);
|
||||
efl_animation_group_animation_add(sequential_show_anim, scale_half_anim);
|
||||
efl_animation_group_animation_add(sequential_show_anim, ccw_45_degrees_anim);
|
||||
|
||||
|
||||
//Initialize App Data
|
||||
ad->sequential_show_anim = sequential_show_anim;
|
||||
ad->sequential_hide_anim = sequential_hide_anim;
|
||||
ad->button = btn;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef struct _App_Data
|
|||
Elm_Button *button;
|
||||
|
||||
Evas_Object *start_btn;
|
||||
Evas_Object *repeat_count_spin;
|
||||
Evas_Object *play_count_spin;
|
||||
Evas_Object *repeat_mode_spin;
|
||||
|
||||
Eina_Bool is_btn_visible;
|
||||
|
@ -44,8 +44,8 @@ _anim_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin);
|
||||
if (repeat_mode == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)
|
||||
{
|
||||
int repeat_count = elm_spinner_value_get(ad->repeat_count_spin);
|
||||
if (repeat_count % 2 == 1)
|
||||
int play_count = elm_spinner_value_get(ad->play_count_spin);
|
||||
if (play_count % 2 == 0)
|
||||
{
|
||||
ad->is_btn_visible = !(ad->is_btn_visible);
|
||||
if (ad->is_btn_visible)
|
||||
|
@ -54,7 +54,7 @@ _anim_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
elm_object_text_set(ad->start_btn, "Start Alpha Animation from 0.0 to 1.0");
|
||||
}
|
||||
}
|
||||
elm_object_disabled_set(ad->repeat_count_spin, EINA_FALSE);
|
||||
elm_object_disabled_set(ad->play_count_spin, EINA_FALSE);
|
||||
elm_object_disabled_set(ad->repeat_mode_spin, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -78,16 +78,16 @@ _start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED
|
|||
|
||||
ad->is_btn_visible = !(ad->is_btn_visible);
|
||||
|
||||
int repeat_count = elm_spinner_value_get(ad->repeat_count_spin);
|
||||
elm_object_disabled_set(ad->repeat_count_spin, EINA_TRUE);
|
||||
int play_count = elm_spinner_value_get(ad->play_count_spin);
|
||||
elm_object_disabled_set(ad->play_count_spin, EINA_TRUE);
|
||||
|
||||
Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin);
|
||||
elm_object_disabled_set(ad->repeat_mode_spin, EINA_TRUE);
|
||||
|
||||
if (ad->is_btn_visible)
|
||||
{
|
||||
//Set animation repeat count
|
||||
efl_animation_repeat_count_set(ad->show_anim, repeat_count);
|
||||
//Set animation play count
|
||||
efl_animation_play_count_set(ad->show_anim, play_count);
|
||||
|
||||
//Set animation repeat mode
|
||||
efl_animation_repeat_mode_set(ad->show_anim, repeat_mode);
|
||||
|
@ -99,7 +99,7 @@ _start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED
|
|||
else
|
||||
{
|
||||
//Set animation repeat count
|
||||
efl_animation_repeat_count_set(ad->hide_anim, repeat_count);
|
||||
efl_animation_play_count_set(ad->hide_anim, play_count);
|
||||
|
||||
//Set animation repeat mode
|
||||
efl_animation_repeat_mode_set(ad->hide_anim, repeat_mode);
|
||||
|
@ -158,15 +158,15 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
evas_object_move(start_btn, 100, 300);
|
||||
evas_object_show(start_btn);
|
||||
|
||||
//Spinner to set animation repeat count
|
||||
Evas_Object *repeat_count_spin = elm_spinner_add(win);
|
||||
elm_spinner_label_format_set(repeat_count_spin, "Repeat Count: %d");
|
||||
elm_spinner_editable_set(repeat_count_spin, EINA_FALSE);
|
||||
elm_spinner_min_max_set(repeat_count_spin, 0, 3);
|
||||
elm_spinner_value_set(repeat_count_spin, 0);
|
||||
evas_object_resize(repeat_count_spin, 200, 50);
|
||||
evas_object_move(repeat_count_spin, 100, 350);
|
||||
evas_object_show(repeat_count_spin);
|
||||
//Spinner to set animation play count
|
||||
Evas_Object *play_count_spin = elm_spinner_add(win);
|
||||
elm_spinner_label_format_set(play_count_spin, "Play Count (0 is infinite): %d");
|
||||
elm_spinner_editable_set(play_count_spin, EINA_FALSE);
|
||||
elm_spinner_min_max_set(play_count_spin, 0, 3);
|
||||
elm_spinner_value_set(play_count_spin, 1);
|
||||
evas_object_resize(play_count_spin, 200, 50);
|
||||
evas_object_move(play_count_spin, 100, 350);
|
||||
evas_object_show(play_count_spin);
|
||||
|
||||
//Spinner to set animation repeat mode
|
||||
Evas_Object *repeat_mode_spin = elm_spinner_add(win);
|
||||
|
@ -184,7 +184,7 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
ad->show_anim = show_anim;
|
||||
ad->hide_anim = hide_anim;
|
||||
ad->start_btn = start_btn;
|
||||
ad->repeat_count_spin = repeat_count_spin;
|
||||
ad->play_count_spin = play_count_spin;
|
||||
ad->repeat_mode_spin = repeat_mode_spin;
|
||||
ad->is_btn_visible = EINA_TRUE;
|
||||
ad->button = btn;
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
bindings = get_option('bindings')
|
||||
bindings_order = ['luajit', 'cxx', 'mono']
|
||||
|
||||
if (get_option('dotnet') and not bindings.contains('mono'))
|
||||
message('dotnet support requires the C# bindings')
|
||||
bindings += ['mono']
|
||||
endif
|
||||
|
||||
if (bindings.contains('cxx') == false and bindings.contains('mono'))
|
||||
subdirs = ['eina_cxx', 'eolian_cxx']
|
||||
subdir(join_paths('cxx', 'eina_cxx'))
|
||||
|
|
|
@ -27,6 +27,8 @@ struct _Layout_Model_Data
|
|||
};
|
||||
typedef struct _Layout_Model_Data Layout_Model_Data;
|
||||
|
||||
static Evas_Object *win = NULL;
|
||||
|
||||
static Eina_Value
|
||||
_wait_for_image(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
|
||||
{
|
||||
|
@ -50,22 +52,32 @@ _cleanup_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
}
|
||||
|
||||
static void
|
||||
_list_selected_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
_list_pressed_item_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
{
|
||||
Layout_Model_Data *priv = data;
|
||||
Eo *child = event->info;
|
||||
Efl_Ui_Item_Clickable_Pressed *pressed = event->info;
|
||||
Efl_Ui_Item *item = pressed->item;
|
||||
Efl_Model *model = efl_ui_view_model_get(item);
|
||||
|
||||
printf("LIST selected model\n");
|
||||
efl_ui_view_model_set(priv->provider, child);
|
||||
printf("LIST pressed model `%s` from item `%s`.\n",
|
||||
efl_debug_name_get(model),
|
||||
efl_debug_name_get(item));
|
||||
efl_ui_view_model_set(priv->provider, model);
|
||||
}
|
||||
|
||||
static void
|
||||
_update_cb(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
|
||||
{
|
||||
Layout_Model_Data *priv = data;
|
||||
Efl_Model *newone;
|
||||
|
||||
const char *text = elm_object_text_get(priv->entry);
|
||||
elm_layout_text_set(priv->label, "default", text);
|
||||
newone = efl_add(EFL_IO_MODEL_CLASS, win,
|
||||
efl_io_model_path_set(efl_added, text));
|
||||
efl_ui_view_model_set(priv->fileview, newone);
|
||||
efl_del(priv->model);
|
||||
priv->model = newone;
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -103,7 +115,8 @@ EAPI_MAIN int
|
|||
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||
{
|
||||
Layout_Model_Data *priv;
|
||||
Evas_Object *win, *panes, *bxr, *genlist;
|
||||
Evas_Object *panes, *bxr;
|
||||
Efl_Ui_Factory *factory;
|
||||
Eo *img_factory;
|
||||
char *dirname;
|
||||
|
||||
|
@ -122,16 +135,19 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
if (argv[1] != NULL) dirname = argv[1];
|
||||
else dirname = EFL_MODEL_TEST_FILENAME_PATH;
|
||||
|
||||
priv->model = efl_add_ref(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
|
||||
priv->model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
|
||||
|
||||
genlist = elm_genlist_add(win);
|
||||
priv->fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, win, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL));
|
||||
elm_view_list_property_connect(priv->fileview, "filename", "elm.text");
|
||||
elm_view_list_model_set(priv->fileview, priv->model);
|
||||
_widget_init(genlist);
|
||||
elm_object_part_content_set(panes, "left", genlist);
|
||||
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
|
||||
efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
|
||||
efl_ui_property_bind(factory, "efl.text", "filename");
|
||||
|
||||
priv->fileview = efl_add(EFL_UI_LIST_VIEW_CLASS, panes,
|
||||
efl_ui_collection_view_factory_set(efl_added, factory),
|
||||
efl_ui_view_model_set(efl_added, priv->model));
|
||||
_widget_init(priv->fileview);
|
||||
elm_object_part_content_set(panes, "left", priv->fileview);
|
||||
elm_panes_content_left_size_set(panes, 0.3);
|
||||
efl_event_callback_add(priv->fileview, ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _list_selected_cb, priv);
|
||||
efl_event_callback_add(priv->fileview, EFL_UI_EVENT_ITEM_PRESSED, _list_pressed_item_cb, priv);
|
||||
|
||||
bxr = elm_box_add(win);
|
||||
priv->bxr = bxr;
|
||||
|
|
|
@ -118,7 +118,7 @@ main(void)
|
|||
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(3.0, 3.0), scale_rect, EINA_VECTOR2(0.5, 0.5)),
|
||||
efl_animation_start_delay_set(efl_added, 5.0),
|
||||
efl_animation_duration_set(efl_added, 2.0),
|
||||
efl_animation_repeat_count_set(efl_added, EFL_ANIMATION_REPEAT_INFINITE)
|
||||
efl_animation_play_count_set(efl_added, 0)
|
||||
),
|
||||
1.0, 0.0);
|
||||
|
||||
|
@ -128,7 +128,7 @@ main(void)
|
|||
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
|
||||
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(3.0, 3.0), scale_rect2, EINA_VECTOR2(0.5, 0.5)),
|
||||
efl_animation_duration_set(efl_added, 2.0),
|
||||
efl_animation_repeat_count_set(efl_added, EFL_ANIMATION_REPEAT_INFINITE),
|
||||
efl_animation_play_count_set(efl_added, 0),
|
||||
efl_animation_repeat_mode_set(efl_added, EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)
|
||||
),
|
||||
1.0, 0.0);
|
||||
|
@ -139,7 +139,7 @@ main(void)
|
|||
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
|
||||
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(3.0, 3.0), scale_rect3, EINA_VECTOR2(0.5, 0.5)),
|
||||
efl_animation_duration_set(efl_added, 2.0),
|
||||
efl_animation_repeat_count_set(efl_added, 3),
|
||||
efl_animation_play_count_set(efl_added, 4),
|
||||
efl_animation_repeat_mode_set(efl_added, EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)
|
||||
),
|
||||
1.0, 0.0);
|
||||
|
@ -162,7 +162,7 @@ main(void)
|
|||
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
|
||||
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(5.0, 5.0), scale_rect5, EINA_VECTOR2(0.5, 0.5)),
|
||||
efl_animation_duration_set(efl_added, 5.0),
|
||||
efl_animation_repeat_count_set(efl_added, EFL_ANIMATION_REPEAT_INFINITE)
|
||||
efl_animation_play_count_set(efl_added, 0)
|
||||
),
|
||||
1.0, 0.0);
|
||||
d.current_speed = 1.0;
|
||||
|
|
|
@ -1,281 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include <Eina.h>
|
||||
|
||||
#include "shmfile.h"
|
||||
#include "timeout.h"
|
||||
|
||||
#define DATA32 unsigned int
|
||||
|
||||
//#define GST_DBG
|
||||
|
||||
#ifdef GST_DBG
|
||||
#define D(fmt, args...) fprintf(stderr, fmt, ## args)
|
||||
#else
|
||||
#define D(fmt, args...)
|
||||
#endif
|
||||
|
||||
#define CAPS "video/x-raw-rgb,bpp=(int)32,depth=(int)32,endianness=(int)4321,red_mask=(int)0x0000ff00, green_mask=(int)0x00ff0000, blue_mask=(int)0xff000000"
|
||||
|
||||
static GstElement *pipeline = NULL;
|
||||
static GstElement *sink = NULL;
|
||||
static gint64 duration = -1;
|
||||
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
void *data = NULL;
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_gst_init(const char *filename)
|
||||
{
|
||||
GstPad *pad;
|
||||
GstCaps *caps;
|
||||
GstStructure *structure;
|
||||
gchar *descr;
|
||||
gchar *uri;
|
||||
GError *error = NULL;
|
||||
GstFormat format;
|
||||
GstStateChangeReturn ret;
|
||||
// int vidstr = 0;
|
||||
|
||||
if (!filename || !*filename)
|
||||
return EINA_FALSE;
|
||||
|
||||
if (!gst_init_check(NULL, NULL, &error))
|
||||
return EINA_FALSE;
|
||||
|
||||
if ((*filename == '/') || (*filename == '~'))
|
||||
{
|
||||
uri = g_filename_to_uri(filename, NULL, NULL);
|
||||
if (!uri)
|
||||
{
|
||||
D("could not create new uri from %s", filename);
|
||||
goto unref_pipeline;
|
||||
}
|
||||
}
|
||||
else
|
||||
uri = strdup(filename);
|
||||
|
||||
D("Setting file %s\n", uri);
|
||||
|
||||
descr = g_strdup_printf("uridecodebin uri=%s ! typefind ! ffmpegcolorspace ! "
|
||||
" appsink name=sink caps=\"" CAPS "\"", uri);
|
||||
pipeline = gst_parse_launch(descr, &error);
|
||||
free(uri);
|
||||
|
||||
if (error != NULL)
|
||||
{
|
||||
D("could not construct pipeline: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
goto gst_shutdown;
|
||||
}
|
||||
/* needs gst 1.0+
|
||||
* also only works on playbin objects!!! this is a uridecodebin!
|
||||
g_object_get(G_OBJECT(pipeline),
|
||||
"n-video", &vidstr,
|
||||
NULL);
|
||||
if (vidstr <= 0)
|
||||
{
|
||||
D("no video stream\n");
|
||||
goto gst_shutdown;
|
||||
}
|
||||
*/
|
||||
sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
|
||||
|
||||
ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
||||
switch (ret)
|
||||
{
|
||||
case GST_STATE_CHANGE_FAILURE:
|
||||
D("failed to play the file\n");
|
||||
goto unref_pipeline;
|
||||
case GST_STATE_CHANGE_NO_PREROLL:
|
||||
D("live sources not supported yet\n");
|
||||
goto unref_pipeline;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = gst_element_get_state((pipeline), NULL, NULL, GST_CLOCK_TIME_NONE);
|
||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||
{
|
||||
D("could not complete pause\n");
|
||||
goto unref_pipeline;
|
||||
}
|
||||
|
||||
format = GST_FORMAT_TIME;
|
||||
gst_element_query_duration (pipeline, &format, &duration);
|
||||
if (duration == -1)
|
||||
{
|
||||
D("could not retrieve the duration, set it to 1s\n");
|
||||
duration = 1 * GST_SECOND;
|
||||
}
|
||||
|
||||
pad = gst_element_get_static_pad(sink, "sink");
|
||||
if (!pad)
|
||||
{
|
||||
D("could not retrieve the sink pad\n");
|
||||
goto unref_pipeline;
|
||||
}
|
||||
|
||||
caps = gst_pad_get_negotiated_caps(pad);
|
||||
if (!caps)
|
||||
goto unref_pad;
|
||||
|
||||
structure = gst_caps_get_structure(caps, 0);
|
||||
|
||||
if (!gst_structure_get_int(structure, "width", &width))
|
||||
goto unref_caps;
|
||||
if (!gst_structure_get_int(structure, "height", &height))
|
||||
goto unref_caps;
|
||||
|
||||
gst_caps_unref(caps);
|
||||
gst_object_unref(pad);
|
||||
|
||||
return EINA_TRUE;
|
||||
|
||||
unref_caps:
|
||||
gst_caps_unref(caps);
|
||||
unref_pad:
|
||||
gst_object_unref(pad);
|
||||
unref_pipeline:
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_object_unref(pipeline);
|
||||
gst_shutdown:
|
||||
gst_deinit();
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_gst_shutdown()
|
||||
{
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_object_unref(pipeline);
|
||||
gst_deinit();
|
||||
}
|
||||
|
||||
static void
|
||||
_gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos)
|
||||
{
|
||||
GstBuffer *buffer;
|
||||
|
||||
D("load image\n");
|
||||
if (pos >= 0.0)
|
||||
gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
|
||||
pos * 1000000000.0);
|
||||
else
|
||||
gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
|
||||
duration / 2);
|
||||
g_signal_emit_by_name(sink, "pull-preroll", &buffer, NULL);
|
||||
D("load image : %p %d\n", GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer));
|
||||
|
||||
shm_alloc(width * height * sizeof(DATA32));
|
||||
if (!shm_addr) return;
|
||||
data = shm_addr;
|
||||
|
||||
memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer));
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char *file, *p;
|
||||
int i, numonly;
|
||||
int size_w = 0, size_h = 0;
|
||||
int head_only = 0;
|
||||
long long pos = -1.0;
|
||||
|
||||
if (argc < 2) return -1;
|
||||
// file is ALWAYS first arg, other options come after
|
||||
file = argv[1];
|
||||
for (i = 2; i < argc; i++)
|
||||
{
|
||||
if (!strcmp(argv[i], "-head"))
|
||||
// asked to only load header, not body/data
|
||||
head_only = 1;
|
||||
else if (!strcmp(argv[i], "-key"))
|
||||
{
|
||||
i++;
|
||||
numonly = 1;
|
||||
for (p = argv[i]; *p; p++)
|
||||
{
|
||||
if ((!*p < '0') || (*p > 9))
|
||||
{
|
||||
numonly = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (numonly) pos = (double)(atoll(argv[i])) / 1000.0;
|
||||
i++;
|
||||
}
|
||||
else if (!strcmp(argv[i], "-opt-scale-down-by"))
|
||||
{ // not used by ps loader
|
||||
i++;
|
||||
// int scale_down = atoi(argv[i]);
|
||||
}
|
||||
else if (!strcmp(argv[i], "-opt-dpi"))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
else if (!strcmp(argv[i], "-opt-size"))
|
||||
{ // not used by ps loader
|
||||
i++;
|
||||
size_w = atoi(argv[i]);
|
||||
i++;
|
||||
size_h = atoi(argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
timeout_init(10);
|
||||
|
||||
D("_gst_init_file\n");
|
||||
|
||||
if (!_gst_init(file))
|
||||
return -1;
|
||||
D("_gst_init done\n");
|
||||
|
||||
if (!head_only)
|
||||
{
|
||||
_gst_load_image(size_w, size_h, pos);
|
||||
}
|
||||
|
||||
D("size...: %ix%i\n", width, height);
|
||||
D("alpha..: 0\n");
|
||||
|
||||
printf("size %i %i\n", width, height);
|
||||
printf("alpha 0\n");
|
||||
|
||||
if (!head_only)
|
||||
{
|
||||
if (shm_fd >= 0)
|
||||
{
|
||||
printf("shmfile %s\n", shmfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
// could also to "tmpfile %s\n" like shmfile but just
|
||||
// a mmaped tmp file on the system
|
||||
printf("data\n");
|
||||
if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1)
|
||||
{
|
||||
shm_free();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
shm_free();
|
||||
}
|
||||
else
|
||||
printf("done\n");
|
||||
|
||||
_gst_shutdown();
|
||||
fflush(stdout);
|
||||
return 0;
|
||||
}
|
|
@ -1,11 +1,3 @@
|
|||
|
||||
# gstreamer 0.1 support
|
||||
#generic_deps = [dependency('gstreamer')]
|
||||
#generic_src = files([
|
||||
# 'main_0_10.c'
|
||||
#])
|
||||
|
||||
|
||||
generic_src = files([
|
||||
'main.c'
|
||||
])
|
||||
|
@ -14,4 +6,4 @@ generic_deps = []
|
|||
if get_option('gstreamer') == true
|
||||
generic_deps += dependency('gstreamer-1.0')
|
||||
endif
|
||||
generic_support = ['264','3g2','3gp','3gp2','3gpp','3gpp2','3p2','asf','avi','bdm','bdmv','clpi','cpi','dv','fla','flv','m1v','m2t','m2v','m4v','mkv','mov','mp2','mp2ts','mp4','mpe','mpeg','mpg','mpl','mpls','mts','mxf','nut','nuv','ogg','ogm','ogv','qt','rm','rmj','rmm','rms','rmx','rmvb','rv','swf','ts','webm','weba','wmv']
|
||||
generic_support = ['264','3g2','3gp','3gp2','3gpp','3gpp2','3p2','asf','avi','bdm','bdmv','clpi','cpi','dv','fla','flv','m1v','m2t','m2v','m4v','mkv','mov','mp2','mp2ts','mp4','mpe','mpeg','mpg','mpl','mpls','mts','mxf','nut','nuv','ogg','ogm','ogv','qt','rm','rmj','rmm','rms','rmx','rmvb','rv','swf','ts','webm','weba','wmv']
|
||||
|
|
|
@ -315,9 +315,7 @@
|
|||
# include <sys/siginfo.h>
|
||||
#else
|
||||
# include <sys/time.h>
|
||||
# if !defined (EXOTIC_NO_SIGNAL)
|
||||
# include <signal.h>
|
||||
# endif
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -611,7 +611,7 @@ struct _Ecore_Event_Signal_User
|
|||
int number; /**< The signal number. Either 1 or 2 */
|
||||
void *ext_data; /**< Extension data - not used */
|
||||
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
||||
siginfo_t data; /**< Signal info */
|
||||
#endif
|
||||
};
|
||||
|
@ -624,7 +624,7 @@ struct _Ecore_Event_Signal_Hup
|
|||
{
|
||||
void *ext_data; /**< Extension data - not used */
|
||||
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
||||
siginfo_t data; /**< Signal info */
|
||||
#endif
|
||||
};
|
||||
|
@ -640,7 +640,7 @@ struct _Ecore_Event_Signal_Exit
|
|||
Eina_Bool terminate : 1; /**< Set if the exit request was a terminate signal */
|
||||
void *ext_data; /**< Extension data - not used */
|
||||
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
||||
siginfo_t data; /**< Signal info */
|
||||
#endif
|
||||
};
|
||||
|
@ -653,7 +653,7 @@ struct _Ecore_Event_Signal_Power
|
|||
{
|
||||
void *ext_data; /**< Extension data - not used */
|
||||
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
||||
siginfo_t data; /**< Signal info */
|
||||
#endif
|
||||
};
|
||||
|
@ -666,7 +666,7 @@ struct _Ecore_Event_Signal_Realtime
|
|||
{
|
||||
int num; /**< The realtime signal's number */
|
||||
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
||||
siginfo_t data; /**< Signal info */
|
||||
#endif
|
||||
};
|
||||
|
@ -1071,7 +1071,7 @@ struct _Ecore_Exe_Event_Del
|
|||
Eina_Bool exited : 1; /**< Set to 1 if the process exited of its own accord */
|
||||
Eina_Bool signalled : 1; /**< Set to 1 if the process exited due to uncaught signal */
|
||||
void *ext_data; /**< Extension data - not used */
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
||||
siginfo_t data; /**< Signal info */
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -45,9 +45,7 @@
|
|||
# include <sys/siginfo.h>
|
||||
#else
|
||||
# include <sys/time.h>
|
||||
# if !defined (EXOTIC_NO_SIGNAL)
|
||||
# include <signal.h>
|
||||
# endif
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -275,9 +275,7 @@ ecore_init(void)
|
|||
if (!_ecore_event_init()) goto shutdown_event;
|
||||
|
||||
_ecore_signal_init();
|
||||
#ifndef HAVE_EXOTIC
|
||||
_ecore_exe_init();
|
||||
#endif
|
||||
_ecore_thread_init();
|
||||
_ecore_job_init();
|
||||
_ecore_time_init();
|
||||
|
@ -434,9 +432,7 @@ ecore_shutdown(void)
|
|||
eina_lock_free(&_thread_feedback_mutex);
|
||||
eina_lock_free(&_thread_id_lock);
|
||||
|
||||
#ifndef HAVE_EXOTIC
|
||||
_ecore_exe_shutdown();
|
||||
#endif
|
||||
_ecore_event_shutdown();
|
||||
_ecore_main_shutdown();
|
||||
_ecore_signal_shutdown();
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_private.h"
|
||||
|
||||
void
|
||||
_ecore_exe_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
_ecore_exe_shutdown(void)
|
||||
{
|
||||
}
|
|
@ -26,10 +26,6 @@
|
|||
|
||||
#define _(x) dgettext("ecore", x)
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "Ecore_Getopt.h"
|
||||
|
||||
|
|
|
@ -26,14 +26,6 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* On Windows, pipe() is implemented with sockets.
|
||||
* Contrary to Linux, Windows uses different functions
|
||||
|
|
|
@ -356,7 +356,7 @@ _ecore_main_win32_handler_del(Eo *obj,
|
|||
void _ecore_main_content_clear(Eo *obj, Efl_Loop_Data *pd);
|
||||
void _ecore_main_shutdown(void);
|
||||
|
||||
#if defined (_WIN32) || defined (__lv2ppu__) || defined (HAVE_EXOTIC)
|
||||
#if defined (_WIN32) || defined (__lv2ppu__)
|
||||
static inline void _ecore_signal_shutdown(void) { }
|
||||
|
||||
static inline void _ecore_signal_init(void) { }
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "Ecore.h"
|
||||
#include "ecore_private.h"
|
||||
|
||||
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||
#if defined (HAVE_CLOCK_GETTIME)
|
||||
static clockid_t _ecore_time_clock_id;
|
||||
static Eina_Bool _ecore_time_got_clock_id = EINA_FALSE;
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
|
@ -26,7 +26,7 @@ static double _ecore_time_clock_conversion = 1e-9;
|
|||
EAPI double
|
||||
ecore_time_get(void)
|
||||
{
|
||||
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||
#if defined (HAVE_CLOCK_GETTIME)
|
||||
struct timespec t;
|
||||
|
||||
if (EINA_UNLIKELY(!_ecore_time_got_clock_id))
|
||||
|
@ -82,7 +82,7 @@ ecore_loop_time_set(double t)
|
|||
void
|
||||
_ecore_time_init(void)
|
||||
{
|
||||
#if defined(HAVE_CLOCK_GETTIME) || defined(EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||
#if defined(HAVE_CLOCK_GETTIME)
|
||||
struct timespec t;
|
||||
|
||||
if (_ecore_time_got_clock_id) return;
|
||||
|
|
|
@ -4,7 +4,7 @@ class @beta Efl.Decelerate_Interpolator extends Efl.Object implements Efl.Interp
|
|||
it reaches $[1.0].
|
||||
|
||||
Internally it uses the second half of a sinus rise (from 0.5 to 1.0) and the steepness
|
||||
can be customized.
|
||||
can be customized through the @.slope property.
|
||||
]]
|
||||
data: Efl_Decelerate_Interpolator_Data;
|
||||
methods {
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_private.h"
|
||||
#include "Ecore_Con.h"
|
||||
|
|
|
@ -21,14 +21,6 @@
|
|||
# include <evil_private.h> /* dlsym */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
#include "ecore_con_private.h"
|
||||
|
||||
/* OpenSSL's BIO is the abstraction for I/O, provide one for Efl.Io.* */
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
# include <features.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
|
|
@ -570,8 +570,8 @@ static void
|
|||
_done_rle(void *data)
|
||||
{
|
||||
Ector_Software_Shape_Task *task = data;
|
||||
|
||||
task->pd->done = EINA_TRUE;
|
||||
if (task && task->pd)
|
||||
task->pd->done = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -522,12 +522,29 @@ _span_fill_clipRect(int span_count, const SW_FT_Span *spans, void *user_data)
|
|||
{
|
||||
const int NSPANS = 256;
|
||||
int clip_count, i;
|
||||
SW_FT_Span cspans[NSPANS];
|
||||
Span_Data *fill_data = (Span_Data *) user_data;
|
||||
Clip_Data clip = fill_data->clip;
|
||||
SW_FT_Span *clipped;
|
||||
Eina_Rectangle *rect;
|
||||
Eina_Rectangle tmp_rect;
|
||||
SW_FT_Span *cspans = NULL;
|
||||
Eina_Bool intersect = EINA_FALSE;
|
||||
|
||||
//Note: Uses same span_count sized heap memory in intersect mask case.
|
||||
if (fill_data->comp_method == EFL_GFX_VG_COMPOSITE_METHOD_MASK_INTERSECT)
|
||||
{
|
||||
intersect = EINA_TRUE;
|
||||
cspans = malloc(sizeof(SW_FT_Span) * (span_count));
|
||||
if (!cspans)
|
||||
{
|
||||
ERR("OOM: Failed malloc()");
|
||||
return ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cspans = alloca(sizeof(SW_FT_Span) * (NSPANS));
|
||||
}
|
||||
|
||||
clip_count = eina_array_count(clip.clips);
|
||||
|
||||
|
@ -545,11 +562,12 @@ _span_fill_clipRect(int span_count, const SW_FT_Span *spans, void *user_data)
|
|||
while (spans < end)
|
||||
{
|
||||
clipped = cspans;
|
||||
spans = _intersect_spans_rect(&tmp_rect, spans, end, &clipped, NSPANS);
|
||||
spans = _intersect_spans_rect(&tmp_rect, spans, end, &clipped, intersect ? span_count : NSPANS);
|
||||
if (clipped - cspans)
|
||||
fill_data->unclipped_blend(clipped - cspans, cspans, fill_data);
|
||||
}
|
||||
}
|
||||
if (intersect && cspans) free(cspans);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -557,20 +575,38 @@ _span_fill_clipPath(int span_count, const SW_FT_Span *spans, void *user_data)
|
|||
{
|
||||
const int NSPANS = 256;
|
||||
int current_clip = 0;
|
||||
SW_FT_Span cspans[NSPANS];
|
||||
Span_Data *fill_data = (Span_Data *) user_data;
|
||||
Clip_Data clip = fill_data->clip;
|
||||
SW_FT_Span *clipped;
|
||||
SW_FT_Span *cspans = NULL;
|
||||
Eina_Bool intersect = EINA_FALSE;
|
||||
|
||||
//Note: Uses same span_count sized heap memory in intersect mask case.
|
||||
if (fill_data->comp_method == EFL_GFX_VG_COMPOSITE_METHOD_MASK_INTERSECT)
|
||||
{
|
||||
intersect = EINA_TRUE;
|
||||
cspans = malloc(sizeof(SW_FT_Span) * (span_count));
|
||||
if (!cspans)
|
||||
{
|
||||
ERR("OOM: Failed malloc()");
|
||||
return ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cspans = alloca(sizeof(SW_FT_Span) * (NSPANS));
|
||||
}
|
||||
|
||||
// FIXME: Take clip path offset into account.
|
||||
const SW_FT_Span *end = spans + span_count;
|
||||
while (spans < end)
|
||||
{
|
||||
clipped = cspans;
|
||||
spans = _intersect_spans_region(clip.path, ¤t_clip, spans, end, &clipped, NSPANS);
|
||||
spans = _intersect_spans_region(clip.path, ¤t_clip, spans, end, &clipped, intersect ? span_count : NSPANS);
|
||||
if (clipped - cspans)
|
||||
fill_data->unclipped_blend(clipped - cspans, cspans, fill_data);
|
||||
}
|
||||
if (intersect && cspans) free(cspans);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -2043,6 +2043,8 @@ _edje_object_part_text_raw_generic_set(Edje *ed, Evas_Object *obj, Edje_Real_Par
|
|||
_edje_recalc(ed);
|
||||
if (ed->text_change.func)
|
||||
ed->text_change.func(ed->text_change.data, obj, part);
|
||||
edje_object_signal_emit(ed->obj, "edje,text,changed", "edje");
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,6 @@
|
|||
#include "eina_safety_checks.h"
|
||||
#include "eina_counter.h"
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#include "eina_private.h"
|
||||
|
||||
/*============================================================================*
|
||||
|
|
|
@ -62,7 +62,7 @@ static int _evlog_go = 0;
|
|||
static Eina_Evlog_Buf *buf; // current event log we are writing events to
|
||||
static Eina_Evlog_Buf buffers[2]; // double-buffer our event log buffers
|
||||
|
||||
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||
#if defined (HAVE_CLOCK_GETTIME)
|
||||
static clockid_t _eina_evlog_time_clock_id = -1;
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
static double _eina_evlog_time_clock_conversion = 1e-9;
|
||||
|
@ -73,7 +73,7 @@ static int _evlog_get_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|||
static inline double
|
||||
get_time(void)
|
||||
{
|
||||
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||
#if defined (HAVE_CLOCK_GETTIME)
|
||||
struct timespec t;
|
||||
|
||||
if (EINA_UNLIKELY(clock_gettime(_eina_evlog_time_clock_id, &t)))
|
||||
|
@ -288,7 +288,7 @@ eina_evlog_init(void)
|
|||
{
|
||||
eina_spinlock_new(&_evlog_lock);
|
||||
buf = &(buffers[0]);
|
||||
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||
#if defined (HAVE_CLOCK_GETTIME)
|
||||
{
|
||||
struct timespec t;
|
||||
|
||||
|
|
|
@ -59,10 +59,6 @@
|
|||
#include "eina_xattr.h"
|
||||
#include "eina_file_common.h"
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
/*============================================================================*
|
||||
* Local *
|
||||
*============================================================================*/
|
||||
|
|
|
@ -41,10 +41,6 @@
|
|||
#include "eina_file_common.h"
|
||||
#include "eina_xattr.h"
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#ifndef O_BINARY
|
||||
# define O_BINARY 0
|
||||
#endif
|
||||
|
|
|
@ -35,14 +35,6 @@
|
|||
# include <evil_private.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
#include "eina_config.h"
|
||||
#include "eina_private.h"
|
||||
#include "eina_alloca.h"
|
||||
|
|
|
@ -46,10 +46,6 @@
|
|||
# include <evil_private.h> /* path_is_absolute realpath dladdr */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#include "eina_config.h"
|
||||
#include "eina_private.h"
|
||||
#include "eina_alloca.h"
|
||||
|
|
|
@ -60,9 +60,7 @@
|
|||
# include <sys/siginfo.h>
|
||||
#else
|
||||
# include <sys/time.h>
|
||||
# if !defined (EXOTIC_NO_SIGNAL)
|
||||
# include <signal.h>
|
||||
# endif
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -88,7 +88,7 @@ enum @beta Efl.Ui.Widget_Orientation_Mode
|
|||
not change according to the window or screen orientation.]]
|
||||
}
|
||||
|
||||
enum @beta Efl.Ui.Select_Mode {
|
||||
enum Efl.Ui.Select_Mode {
|
||||
[[Type of multi selectable object.]]
|
||||
single, [[Only single child is selected. If a child is selected,
|
||||
previous selected child will be unselected.]]
|
||||
|
|
|
@ -540,7 +540,9 @@ _efl_ui_layout_theme_internal(Eo *obj, Efl_Ui_Layout_Data *sd, Elm_Widget_Smart_
|
|||
if (ret != EFL_UI_THEME_APPLY_ERROR_GENERIC)
|
||||
{
|
||||
if (sd->cb_theme_changed)
|
||||
efl_event_callback_legacy_call(obj, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, NULL);
|
||||
efl_event_callback_call(obj, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, NULL);
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_smart_callback_call(obj, "theme,changed", NULL);
|
||||
}
|
||||
|
||||
if (!_visuals_refresh(obj, sd))
|
||||
|
@ -557,6 +559,8 @@ _efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd)
|
|||
char buf[64];
|
||||
static unsigned int version = 0;
|
||||
|
||||
sd->needs_theme_apply = EINA_FALSE;
|
||||
|
||||
theme_apply_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
|
||||
if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
|
||||
|
||||
|
@ -2699,6 +2703,7 @@ EOLIAN static Eo *
|
|||
_efl_ui_layout_base_efl_object_constructor(Eo *obj, Efl_Ui_Layout_Data *sd)
|
||||
{
|
||||
sd->obj = obj;
|
||||
sd->needs_theme_apply = EINA_TRUE;
|
||||
sd->finger_size_multiplier_x = sd->finger_size_multiplier_y = 1;
|
||||
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
||||
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||
|
@ -2708,12 +2713,17 @@ _efl_ui_layout_base_efl_object_constructor(Eo *obj, Efl_Ui_Layout_Data *sd)
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Object*
|
||||
_efl_ui_layout_base_efl_object_finalize(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UNUSED)
|
||||
_efl_ui_layout_base_efl_object_finalize(Eo *obj, Efl_Ui_Layout_Data *pd)
|
||||
{
|
||||
Eo *eo, *win;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
||||
eo = efl_finalize(efl_super(obj, MY_CLASS));
|
||||
efl_ui_widget_theme_apply(eo);
|
||||
if (pd->needs_theme_apply)
|
||||
{
|
||||
efl_ui_widget_theme_apply(eo);
|
||||
/* handle case where subclass does not call into layout */
|
||||
pd->needs_theme_apply = EINA_FALSE;
|
||||
}
|
||||
efl_canvas_group_change(obj);
|
||||
|
||||
Elm_Layout_Data *ld = efl_data_scope_safe_get(obj, ELM_LAYOUT_MIXIN);
|
||||
|
@ -2975,7 +2985,7 @@ _efl_ui_layout_base_theme_rotation_apply(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UN
|
|||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_base_efl_object_event_callback_priority_add(Eo *obj, Efl_Ui_Layout_Data *pd, const Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb func, const void *user_data)
|
||||
{
|
||||
if (desc == EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED)
|
||||
if (desc == EFL_UI_LAYOUT_EVENT_THEME_CHANGED)
|
||||
{
|
||||
pd->cb_theme_changed = EINA_TRUE;
|
||||
}
|
||||
|
@ -2988,7 +2998,7 @@ _efl_ui_layout_base_efl_object_event_callback_array_priority_add(Eo *obj, Efl_Ui
|
|||
{
|
||||
for (int i = 0; array[i].desc; ++i)
|
||||
{
|
||||
if (array[i].desc == EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED)
|
||||
if (array[i].desc == EFL_UI_LAYOUT_EVENT_THEME_CHANGED)
|
||||
{
|
||||
pd->cb_theme_changed = EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import efl_ui;
|
||||
|
||||
interface @beta Efl.Ui.Multi_Selectable extends Efl.Ui.Single_Selectable
|
||||
interface Efl.Ui.Multi_Selectable extends Efl.Ui.Single_Selectable
|
||||
{
|
||||
[[Interface for getting access to a range of selected items.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import efl_ui;
|
||||
|
||||
interface @beta Efl.Ui.Multi_Selectable_Index_Range extends Efl.Ui.Multi_Selectable
|
||||
interface Efl.Ui.Multi_Selectable_Index_Range extends Efl.Ui.Multi_Selectable
|
||||
{
|
||||
[[Interface for getting access to a range of selected items through their indices.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import efl_ui;
|
||||
|
||||
interface @beta Efl.Ui.Multi_Selectable_Object_Range extends Efl.Ui.Multi_Selectable
|
||||
interface Efl.Ui.Multi_Selectable_Object_Range extends Efl.Ui.Multi_Selectable
|
||||
{
|
||||
[[Interface for getting access to a range of selected items.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class @beta Efl.Ui.Radio_Box extends Efl.Ui.Box composites Efl.Ui.Radio_Group
|
||||
class Efl.Ui.Radio_Box extends Efl.Ui.Box composites Efl.Ui.Radio_Group
|
||||
{
|
||||
[[A standard @Efl.Ui.Box container which automatically handles grouping of any @Efl.Ui.Radio
|
||||
widget added to it in addition to regular widgets.
|
||||
|
|
|
@ -30,7 +30,7 @@ struct _Efl_Ui_View_Model_Data
|
|||
Eina_Bool child_removed : 1;
|
||||
} propagating; // Boolean to prevent reentrance event emission on the same object
|
||||
Eina_Bool finalized : 1;
|
||||
Eina_Bool children_bind : 1; // Define if child object should be automatically binded
|
||||
Eina_Bool children_bind : 1; // Define if child object should be automatically bound
|
||||
};
|
||||
|
||||
struct _Efl_Ui_View_Model_Text
|
||||
|
|
|
@ -76,8 +76,8 @@ class Efl.Ui.View_Model extends Efl.Composite_Model
|
|||
with the above property name.]]
|
||||
set: EflUiViewModelPropertySet; [[Define the set callback called when the @Efl.Model.property.set is called
|
||||
with the above property name.]]
|
||||
binded: iterator<string> @move; [[Iterator of property name to bind with this defined property see
|
||||
@.property_bind.]]
|
||||
bound: iterator<string> @move; [[Iterator of property name to bind with this defined property see
|
||||
@.property_bind.]]
|
||||
}
|
||||
return: Eina.Error;
|
||||
}
|
||||
|
|
|
@ -5981,7 +5981,7 @@ _efl_ui_property_bind(Eo *widget, Eo *target, Efl_Ui_Widget_Data *pd,
|
|||
{
|
||||
Efl_Ui_Property_Bound *prop;
|
||||
|
||||
// Always check for a model and fetch a provider in case a binded property
|
||||
// Always check for a model and fetch a provider in case a bound property
|
||||
// is provided by a class down the hierarchy, but they still need to be notified
|
||||
// when a model change
|
||||
_efl_ui_widget_model_register(widget, pd);
|
||||
|
|
|
@ -3701,6 +3701,7 @@ _item_block_del(Elm_Gen_Item *it)
|
|||
itb->items = eina_list_remove(itb->items, it);
|
||||
itb->count--;
|
||||
itb->changed = EINA_TRUE;
|
||||
efl_canvas_group_change(sd->pan_obj);
|
||||
efl_canvas_group_change(sd->obj);
|
||||
if (itb->realized) efl_ui_focus_manager_calc_unregister(itb->sd->obj, EO_OBJ(it));
|
||||
if (itb->count < 1)
|
||||
|
@ -3848,6 +3849,7 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it)
|
|||
sd->group_items = eina_list_remove(sd->group_items, it);
|
||||
|
||||
ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free);
|
||||
efl_canvas_group_change(sd->pan_obj);
|
||||
efl_canvas_group_change(sd->obj);
|
||||
|
||||
ELM_SAFE_FREE(it->item, free);
|
||||
|
@ -5546,6 +5548,7 @@ _update_job(void *data)
|
|||
}
|
||||
if (position)
|
||||
{
|
||||
efl_canvas_group_change(sd->pan_obj);
|
||||
efl_canvas_group_change(sd->obj);
|
||||
}
|
||||
evas_event_thaw(e);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define EFL_ACCESS_OBJECT_PROTECTED
|
||||
#define ELM_LAYOUT_PROTECTED
|
||||
#define EFL_PART_PROTECTED
|
||||
#define EFL_ACCESS_WIDGET_ACTION_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
|
@ -28,6 +29,13 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static Eina_Bool
|
||||
_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call(obj, EFL_INPUT_EVENT_CLICKED, NULL);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_recalc(void *data)
|
||||
{
|
||||
|
@ -416,6 +424,16 @@ elm_label_add(Evas_Object *parent)
|
|||
return elm_legacy_add(MY_CLASS, parent);
|
||||
}
|
||||
|
||||
EOLIAN const Efl_Access_Action_Data *
|
||||
_elm_label_efl_access_widget_action_elm_actions_get(const Eo *obj EINA_UNUSED, Elm_Label_Data *pd EINA_UNUSED)
|
||||
{
|
||||
static Efl_Access_Action_Data access_actions[] = {
|
||||
{ "activate", "activate", NULL, _action_activate },
|
||||
{ NULL, NULL, NULL, NULL },
|
||||
};
|
||||
return &access_actions[0];
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_elm_label_efl_object_constructor(Eo *obj, Elm_Label_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -157,6 +157,7 @@ Eina_Error _elm_label_efl_ui_widget_theme_apply(Eo *obj, Elm_Label_Data *pd);
|
|||
|
||||
Efl_Object *_elm_label_efl_part_part_get(const Eo *obj, Elm_Label_Data *pd, const char *name);
|
||||
|
||||
const Efl_Access_Action_Data *_elm_label_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Label_Data *pd);
|
||||
|
||||
static Eina_Bool
|
||||
_elm_label_class_initializer(Efl_Class *klass)
|
||||
|
@ -186,6 +187,7 @@ _elm_label_class_initializer(Efl_Class *klass)
|
|||
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_label_efl_object_constructor),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_label_efl_ui_widget_theme_apply),
|
||||
EFL_OBJECT_OP_FUNC(efl_part_get, _elm_label_efl_part_part_get),
|
||||
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_label_efl_access_widget_action_elm_actions_get),
|
||||
ELM_LABEL_EXTRA_OPS
|
||||
);
|
||||
opsp = &ops;
|
||||
|
|
|
@ -75,6 +75,7 @@ typedef struct _Efl_Ui_Layout_Data
|
|||
Eina_Bool model_watch : 1; /**< Set to true once we do watch for model change*/
|
||||
Eina_Bool calc_subobjs : 1; /**< Set to true if group_calc should also handle subobjs during manual calc */
|
||||
Eina_Bool cb_theme_changed : 1; /**< if theme,changed event subscriber has been added */
|
||||
Eina_Bool needs_theme_apply : 1; /**< if theme has not been manually set during construction */
|
||||
} Efl_Ui_Layout_Data;
|
||||
|
||||
typedef struct _Elm_Layout_Data
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
|
||||
#include "Embryo.h"
|
||||
|
|
|
@ -11,10 +11,6 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
# include <evil_private.h> /* setenv unsetenv */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
|
||||
#include "Embryo.h"
|
||||
|
|
|
@ -81,9 +81,6 @@ _emotion_modules_load(void)
|
|||
if (stat(buf, &st) == 0)
|
||||
{
|
||||
const char *built_modules[] = {
|
||||
#ifdef EMOTION_BUILD_GSTREAMER
|
||||
"gstreamer",
|
||||
#endif
|
||||
#ifdef EMOTION_BUILD_GSTREAMER1
|
||||
"gstreamer1",
|
||||
#endif
|
||||
|
|
|
@ -2793,7 +2793,7 @@ _eo_log_time_now(void)
|
|||
|
||||
return clk_conv * mach_absolute_time();
|
||||
#else
|
||||
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||
#if defined (HAVE_CLOCK_GETTIME)
|
||||
struct timespec t;
|
||||
static int clk_id = -1;
|
||||
|
||||
|
|
|
@ -1247,6 +1247,17 @@ _add_composite(Eolian_Class *cl, const Eolian_Class *icl, Eina_Hash *ch)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_add_implicit_composite(Eolian_Class *icl, Eina_Hash *ch, Eina_Bool try_tree)
|
||||
{
|
||||
eina_hash_set(ch, &icl, icl);
|
||||
if (!try_tree)
|
||||
return;
|
||||
Eina_List *l;
|
||||
EINA_LIST_FOREACH(icl->extends, l, icl)
|
||||
_add_implicit_composite(icl, ch, try_tree);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_db_fill_inherits(Validate_State *vals, Eolian_Class *cl, Eina_Hash *fhash,
|
||||
Eina_Hash *errh)
|
||||
|
@ -1325,7 +1336,12 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, Eina_Hash *fhash,
|
|||
cl->composite = eina_list_append(cl->composite, out_cl);
|
||||
succ = _db_fill_inherits(vals, out_cl, fhash, errh);
|
||||
++ncomp;
|
||||
eina_hash_set(ch, &out_cl, out_cl);
|
||||
/* for each thing that is composited, we need to add the entire
|
||||
* inheritance tree of it into composite hash to check, so e.g.
|
||||
* class A -> composites B -> extends C does not complain about
|
||||
* A not implementing C
|
||||
*/
|
||||
_add_implicit_composite(out_cl, ch, out_cl->type == EOLIAN_CLASS_INTERFACE);
|
||||
}
|
||||
|
||||
/* parent can be abstract, those are not checked for unimplemented,
|
||||
|
|
|
@ -2301,8 +2301,11 @@ tags_done:
|
|||
{
|
||||
/* regular class can have a parent, but just one */
|
||||
_inherit_dep(ls, ibuf, EINA_TRUE);
|
||||
/* followed by composites */
|
||||
if (ls->t.kw == KW_composites)
|
||||
goto noimp_comp;
|
||||
/* if not followed by implements, we're done */
|
||||
if ((ls->t.kw != KW_implements) && (ls->t.kw != KW_composites))
|
||||
if (ls->t.kw != KW_implements)
|
||||
{
|
||||
eo_lexer_dtor_pop(ls);
|
||||
goto inherit_done;
|
||||
|
@ -2314,6 +2317,7 @@ tags_done:
|
|||
while (test_next(ls, ','));
|
||||
}
|
||||
|
||||
noimp_comp:
|
||||
if (ls->t.kw == KW_composites)
|
||||
{
|
||||
if (type == EOLIAN_CLASS_INTERFACE)
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
#ifndef __ESCAPE_H__
|
||||
#define __ESCAPE_H__
|
||||
|
||||
#ifndef EAPI
|
||||
#define EAPI
|
||||
#endif /* EAPI */
|
||||
#define __UNUSED__ __attribute__((unused))
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef CLOCK_REALTIME
|
||||
#undef CLOCK_REALTIME
|
||||
#endif
|
||||
#ifdef CLOCK_PROF
|
||||
#undef CLOCK_PROF
|
||||
#endif
|
||||
#ifdef CLOCK_PROCESS_CPUTIME_ID
|
||||
#undef CLOCK_PROCESS_CPUTIME_ID
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @page escape_main Escape
|
||||
* @date 2011 (created)
|
||||
*
|
||||
* @section toc Table of Contents
|
||||
*
|
||||
* @li @ref escape_main_intro
|
||||
* @li @ref escape_main_compiling
|
||||
* @li @ref escape_main_next_steps
|
||||
*
|
||||
* @section escape_main_intro Introduction
|
||||
*
|
||||
* The Escape library is a library that acts implements some of the missing
|
||||
* function from the PS3 GameOS system that are needed for the proper
|
||||
* functioning of the EFL.
|
||||
*
|
||||
* @section escape_main_compiling How to compile
|
||||
*
|
||||
* Escape is a library your application links to. The procedure for
|
||||
* this is very simple. You simply have to compile your application
|
||||
* with the appropriate compiler flags that the @p pkg-config script
|
||||
* outputs. For example:
|
||||
*
|
||||
* Compiling C or C++ files into object files:
|
||||
*
|
||||
* @verbatim
|
||||
gcc -c -o main.o main.c `pkg-config --cflags escape`
|
||||
@endverbatim
|
||||
*
|
||||
* Linking object files into a binary executable:
|
||||
*
|
||||
* @verbatim
|
||||
gcc -o my_application main.o `pkg-config --libs escape`
|
||||
@endverbatim
|
||||
*
|
||||
* See @ref pkgconfig
|
||||
*
|
||||
* @section escape_main_next_steps Next Steps
|
||||
*
|
||||
* After you understood what Escape is and installed it in your system
|
||||
* you should proceed understanding the programming interface.
|
||||
*
|
||||
* Recommended reading:
|
||||
*
|
||||
* @li @ref Escape_Libgen_Group
|
||||
* @li @ref Escape_Unistd_Group
|
||||
* @li @ref Escape_Mman
|
||||
*/
|
||||
|
||||
#include "escape_libgen.h"
|
||||
#include "escape_unistd.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Nothing to see here */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ESCAPE_H__ */
|
|
@ -1,90 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "Escape.h"
|
||||
|
||||
static char _escape_basename_buf[PATH_MAX];
|
||||
static char _escape_dirname_buf[PATH_MAX];
|
||||
|
||||
char *
|
||||
escape_basename(char *path)
|
||||
{
|
||||
char *p1;
|
||||
char *p2;
|
||||
size_t length;
|
||||
|
||||
/* path must begin by "?:\" or "?:/" */
|
||||
if (!path || strlen(path) <= 1)
|
||||
{
|
||||
memcpy(_escape_basename_buf, path, PATH_MAX);
|
||||
return _escape_basename_buf;
|
||||
}
|
||||
|
||||
length = strlen(path);
|
||||
p1 = strdup(path);
|
||||
if (!p1)
|
||||
{
|
||||
memcpy(_escape_basename_buf, path, PATH_MAX);
|
||||
return _escape_basename_buf;
|
||||
}
|
||||
|
||||
/* remove trailing backslashes */
|
||||
p2 = p1 + (length - 1);
|
||||
if (*p2 == '/')
|
||||
{
|
||||
while (*p2 == '/')
|
||||
p2--;
|
||||
}
|
||||
*(p2 + 1) = '\0';
|
||||
|
||||
p2 = strrchr(p1, '/');
|
||||
memcpy(_escape_basename_buf, p2 + 1, (p1 + length + 1) - p2);
|
||||
|
||||
free(p1);
|
||||
|
||||
return _escape_basename_buf;
|
||||
}
|
||||
|
||||
char *
|
||||
escape_dirname(char *path)
|
||||
{
|
||||
char *p1;
|
||||
char *p2;
|
||||
size_t length;
|
||||
|
||||
/* path must begin by "?:\" or "?:/" */
|
||||
if (!path || strlen(path) <= 1)
|
||||
{
|
||||
memcpy(_escape_dirname_buf, path, PATH_MAX);
|
||||
return _escape_dirname_buf;
|
||||
}
|
||||
|
||||
length = strlen(path);
|
||||
p1 = strdup(path);
|
||||
if (!p1)
|
||||
{
|
||||
memcpy(_escape_dirname_buf, path, PATH_MAX);
|
||||
return _escape_dirname_buf;
|
||||
}
|
||||
/* remove trailing backslashes */
|
||||
p2 = p1 + (length - 1);
|
||||
if (*p2 == '/')
|
||||
{
|
||||
while (*p2 == '/')
|
||||
p2--;
|
||||
}
|
||||
*(p2 + 1) = '\0';
|
||||
|
||||
p2 = strrchr(p1, '/');
|
||||
*p2 = '\0';
|
||||
memcpy(_escape_dirname_buf, p1, strlen(p1) + 1);
|
||||
|
||||
free(p1);
|
||||
|
||||
return _escape_dirname_buf;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#ifndef __ESCAPE_LIBGEN_H__
|
||||
#define __ESCAPE_LIBGEN_H__
|
||||
|
||||
/**
|
||||
* @file escape_libgen.h
|
||||
* @brief The file that provides functions ported from Unix in libgen.h.
|
||||
* @defgroup Escape_Libgen_Group Libgen.h functions.
|
||||
* @ingroup Escape
|
||||
*
|
||||
* This header provides functions ported from Unix in libgen.h.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
EAPI char *escape_basename(char *path);
|
||||
|
||||
#ifdef basename
|
||||
#undef basename
|
||||
#endif
|
||||
#define basename(p) escape_basename(p)
|
||||
|
||||
EAPI char *escape_dirname(char *path);
|
||||
|
||||
#ifdef dirname
|
||||
#undef dirname
|
||||
#endif
|
||||
#define dirname(p) escape_dirname(p)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* __ESCAPE_LIBGEN_H__ */
|
|
@ -1,67 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sys/mman.h"
|
||||
|
||||
/***** API *****/
|
||||
|
||||
void *
|
||||
mmap(void *addr __UNUSED__,
|
||||
size_t len,
|
||||
int prot,
|
||||
int flags,
|
||||
int fd,
|
||||
off_t offset)
|
||||
{
|
||||
void *data;
|
||||
size_t size;
|
||||
|
||||
data = malloc(len);
|
||||
if (!data)
|
||||
{
|
||||
fprintf (stderr, "[Escape] [mmap] malloc failed\n");
|
||||
return MAP_FAILED;
|
||||
}
|
||||
|
||||
size = read(fd, data, len);
|
||||
if (size != len)
|
||||
{
|
||||
fprintf (stderr, "[Escape] [mmap] read failed\n");
|
||||
free(data);
|
||||
return MAP_FAILED;
|
||||
}
|
||||
|
||||
if (lseek(fd, -len, SEEK_CUR) == -1)
|
||||
{
|
||||
fprintf (stderr, "[Escape] [mmap] lseek failed\n");
|
||||
free(data);
|
||||
return MAP_FAILED;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
int
|
||||
munmap(void *addr,
|
||||
size_t len __UNUSED__)
|
||||
{
|
||||
if (addr && (addr != MAP_FAILED))
|
||||
free(addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
madvise(void *addr __UNUSED__,
|
||||
size_t length __UNUSED__,
|
||||
int advice __UNUSED__)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h> /* See NOTES */
|
||||
#include <sys/socket.h>
|
||||
#include <net/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/net.h>
|
||||
#include <string.h>
|
||||
#include <libiberty.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "Escape.h"
|
||||
|
||||
char *
|
||||
escape_realpath(const char *path, char *resolved_path)
|
||||
{
|
||||
char *real = lrealpath (path);
|
||||
|
||||
if (real)
|
||||
{
|
||||
if (resolved_path)
|
||||
{
|
||||
memcpy (resolved_path, real, PATH_MAX);
|
||||
free (real);
|
||||
return resolved_path;
|
||||
}
|
||||
else
|
||||
{
|
||||
return real;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
escape_access(const char *pathname, int mode)
|
||||
{
|
||||
struct stat stat_buf;
|
||||
|
||||
if (stat(pathname, &stat_buf) != 0)
|
||||
return -1;
|
||||
|
||||
if (mode == F_OK)
|
||||
return 0;
|
||||
if (mode == R_OK)
|
||||
{
|
||||
if (stat_buf.st_mode & S_IRUSR)
|
||||
return 0;
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
}
|
||||
if (mode == W_OK)
|
||||
{
|
||||
if (stat_buf.st_mode & S_IWUSR)
|
||||
return 0;
|
||||
errno = EROFS;
|
||||
return -1;
|
||||
}
|
||||
if (mode == X_OK)
|
||||
{
|
||||
if (stat_buf.st_mode & S_IXUSR)
|
||||
return 0;
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
EAPI ssize_t
|
||||
escape_readlink(const char *path,
|
||||
char *buf,
|
||||
size_t bufsize)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
escape_symlink(const char *path1, const char *path2)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* The code of the following functions has been kindly offered
|
||||
* by Tor Lillqvist.
|
||||
*/
|
||||
int
|
||||
escape_pipe(int *fds)
|
||||
{
|
||||
struct sockaddr_in saddr;
|
||||
int temp;
|
||||
int socket1 = -1;
|
||||
int socket2 = -1;
|
||||
fd_set read_set;
|
||||
fd_set write_set;
|
||||
int len;
|
||||
|
||||
temp = socket (AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
if (temp == -1)
|
||||
goto out0;
|
||||
|
||||
memset (&saddr, 0, sizeof (saddr));
|
||||
saddr.sin_family = AF_INET;
|
||||
saddr.sin_port = 0;
|
||||
saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
|
||||
|
||||
if (bind (temp, (struct sockaddr *)&saddr, sizeof (saddr)))
|
||||
goto out0;
|
||||
|
||||
if (listen (temp, 1) == -1)
|
||||
goto out0;
|
||||
|
||||
len = sizeof (saddr);
|
||||
if (getsockname (temp, (struct sockaddr *)&saddr, &len))
|
||||
goto out0;
|
||||
|
||||
socket1 = socket (AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
if (socket1 == -1)
|
||||
goto out0;
|
||||
|
||||
if ((connect (socket1, (struct sockaddr *)&saddr, len) == -1) &&
|
||||
(errno != EAGAIN))
|
||||
goto out1;
|
||||
|
||||
FD_ZERO (&read_set);
|
||||
FD_SET (temp, &read_set);
|
||||
|
||||
if (select (0, &read_set, NULL, NULL, NULL) == -1)
|
||||
goto out1;
|
||||
|
||||
if (!FD_ISSET (temp, &read_set))
|
||||
goto out1;
|
||||
|
||||
socket2 = accept (temp, (struct sockaddr *)&saddr, &len);
|
||||
if (socket2 == -1)
|
||||
goto out1;
|
||||
|
||||
FD_ZERO (&write_set);
|
||||
FD_SET (socket1, &write_set);
|
||||
|
||||
if (select (0, NULL, &write_set, NULL, NULL) == -1)
|
||||
goto out2;
|
||||
|
||||
if (!FD_ISSET (socket1, &write_set))
|
||||
goto out2;
|
||||
|
||||
fds[0] = socket1;
|
||||
fds[1] = socket2;
|
||||
|
||||
closesocket (temp);
|
||||
|
||||
return 0;
|
||||
|
||||
out2:
|
||||
closesocket (socket2);
|
||||
out1:
|
||||
closesocket (socket1);
|
||||
out0:
|
||||
closesocket (temp);
|
||||
|
||||
fds[0] = -1;
|
||||
fds[1] = -1;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
#undef access
|
||||
int
|
||||
access(const char *pathname, int mode)
|
||||
{
|
||||
return escape_access (pathname, mode);
|
||||
}
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
#ifndef __ESCAPE_UNISTD_H__
|
||||
#define __ESCAPE_UNISTD_H__
|
||||
|
||||
/**
|
||||
* @file escape_unistd.h
|
||||
* @brief The file that provides functions ported from Unix in unistd.h.
|
||||
* @defgroup Escape_Unistd_Group Unistd.h functions
|
||||
* @ingroup Escape
|
||||
*
|
||||
* This header provides functions ported from Unix in unistd.h.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <sys/syslimits.h>
|
||||
|
||||
/* Path function */
|
||||
/**
|
||||
* @brief return the canonicalized absolute pathname
|
||||
*
|
||||
* @param path A path to canonicalize
|
||||
* @param resolved_path A pointer of size PATH_MAX where to store the result
|
||||
*
|
||||
* realpath() expands all symbolic links and resolves references to /./, /../
|
||||
* and extra '/' characters in the null-terminated string named by path to
|
||||
* produce a canonicalized absolute pathname. The resulting pathname is
|
||||
* stored as a null-terminated string, up to a maximum of PATH_MAX bytes,
|
||||
* in the buffer pointed to by resolved_path. The resulting path will have
|
||||
* no symbolic link, /./ or /../ components.
|
||||
*
|
||||
* If resolved_path is specified as NULL, then realpath() uses malloc(3)
|
||||
* to allocate a buffer of up to PATH_MAX bytes to hold the resolved pathname,
|
||||
* and returns a pointer to this buffer.
|
||||
* The caller should deallocate this buffer using free(3).
|
||||
*
|
||||
*/
|
||||
EAPI char *escape_realpath(const char *path, char *resolved_path);
|
||||
#ifdef realpath
|
||||
#undef realpath
|
||||
#endif
|
||||
#define realpath escape_realpath
|
||||
|
||||
EAPI ssize_t
|
||||
escape_readlink(const char *path,
|
||||
char *buf,
|
||||
size_t bufsize);
|
||||
#ifdef readlink
|
||||
#undef readlink
|
||||
#endif
|
||||
#define readlink escape_readlink
|
||||
|
||||
EAPI int
|
||||
escape_symlink(const char *path1, const char *path2);
|
||||
#ifdef symlink
|
||||
#undef symlink
|
||||
#endif
|
||||
#define symlink escape_symlink
|
||||
|
||||
/**
|
||||
* @brief check real user's permissions for a file
|
||||
*
|
||||
* @param pathname The path to check
|
||||
* @param mode the permission to check
|
||||
*
|
||||
* access() checks whether the calling process can access the file pathname.
|
||||
* If pathname is a symbolic link, it is dereferenced.
|
||||
* The mode specifies the accessibility check(s) to be performed, and is either
|
||||
* the value F_OK, or a mask consisting of the bitwise OR of one or more
|
||||
* of R_OK, W_OK, and X_OK. F_OK tests for the existence of the file.
|
||||
* R_OK, W_OK, and X_OK test whether the file exists and grants read, write,
|
||||
* and execute permissions, respectively.
|
||||
*
|
||||
*/
|
||||
EAPI int
|
||||
escape_access(const char *pathname, int mode);
|
||||
#ifdef access
|
||||
#undef access
|
||||
#endif
|
||||
#define access escape_access
|
||||
|
||||
/**
|
||||
* @brief Create a pair of sockets.
|
||||
*
|
||||
* @param fds A pointer that contains two sockets.
|
||||
*
|
||||
* Create a pair of sockets that can be use with select().
|
||||
* Contrary to Unix, that functions does not
|
||||
* create a pair of file descriptors.
|
||||
*
|
||||
* Conformity: Not applicable.
|
||||
*/
|
||||
EAPI int
|
||||
escape_pipe(int *fds);
|
||||
|
||||
/**
|
||||
* @def pipe(fds)
|
||||
*
|
||||
* Wrapper around escape_pipe().
|
||||
*/
|
||||
#define pipe(fds) escape_pipe(fds)
|
||||
|
||||
//#define sync()
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* __ESCAPE_UNISTD_H__ */
|
|
@ -1,180 +0,0 @@
|
|||
#ifndef __ESCAPE_SYS_MMAN_H__
|
||||
#define __ESCAPE_SYS_MMAN_H__
|
||||
|
||||
#include <Escape.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def PROT_NONE
|
||||
* Data can not be accessed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def PROT_READ
|
||||
* Data can be read.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def PROT_WRITE
|
||||
* Data can be written.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def PROT_EXEC
|
||||
* Data can be executed.
|
||||
*/
|
||||
|
||||
#define PROT_NONE 0x00
|
||||
#define PROT_READ 0x01
|
||||
#define PROT_WRITE 0x02
|
||||
#define PROT_EXEC 0x04
|
||||
|
||||
/**
|
||||
* @def MAP_SHARED
|
||||
* Changes are shared.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def MAP_PRIVATE
|
||||
* Changes are private.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def MAP_FIXED
|
||||
* Interpret the address (addr) exactly.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def MAP_FAILED
|
||||
* Error return from mmap().
|
||||
*/
|
||||
|
||||
#define MAP_SHARED 0x0001
|
||||
#define MAP_PRIVATE 0x0002
|
||||
#define MAP_FIXED 0x0010
|
||||
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
|
||||
/**
|
||||
* @file mman.h
|
||||
* @brief The file that provides the memory map functions
|
||||
* @defgroup Escape_Mman Functions that manage memory mappping.
|
||||
* @ingroup Escape
|
||||
*
|
||||
* This header provides the meomry map functions mmap and munmap.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates or opens a named or unnamed file mapping object for a
|
||||
* specified file and maps a view of a file mapping into the
|
||||
* address space of a calling process.
|
||||
*
|
||||
* @param addr Unused
|
||||
* @param len Number of bytes to be mapped.
|
||||
* @param prot Protections.
|
||||
* @param flags Type of the mapped object.
|
||||
* @param fd File descriptor that describes the object to map.
|
||||
* @param offset Number of bytes from which to start the mapping.
|
||||
* @return The starting address of the mapped view on success, -1 otherwise.
|
||||
*
|
||||
* Create or open an unnamed file mapping object for a specified
|
||||
* file described by the file descriptor @p fd. The number of
|
||||
* bytes that are mapped is given by @p len and start after
|
||||
* @p offset bytes. The parameter @p addr is unused.
|
||||
*
|
||||
* The only type of the mapped object that is supported is
|
||||
* @c MAP_SHARED. If another value if given, -1 is returned.
|
||||
*
|
||||
* @p prot specifies the protection of the mapped region. If
|
||||
* PROT_EXEC is used, it set the execute access. If PROT_READ
|
||||
* is used, it sets the read access. If PROT_WRITE is used, it
|
||||
* sets the write access.
|
||||
*
|
||||
* If the map view of file can not be created, -1 is returned.
|
||||
* If the mappping can not be done, -1 is returned.
|
||||
*
|
||||
* If no error occurred, the starting address of the mapped view
|
||||
* is returned.
|
||||
*
|
||||
* Conformity: None.
|
||||
*
|
||||
* @ingroup Escape_Mman
|
||||
*/
|
||||
EAPI void *mmap(void *addr,
|
||||
size_t len,
|
||||
int prot,
|
||||
int flags,
|
||||
int fd,
|
||||
off_t offset);
|
||||
|
||||
/**
|
||||
* Unmaps a mapped view of a file from the calling process's
|
||||
* address space.
|
||||
*
|
||||
* @param addr Pointer to the base address.
|
||||
* @param len Unused.
|
||||
* @return 0 on success, -1 otherwise.
|
||||
*
|
||||
* Unmaps a mapped view of a file from the calling process's
|
||||
* address space. @p addr is the pointer to the base address.
|
||||
* This value must be identical to the value returned by a
|
||||
* previous call to mmap(). The parameter @p len is unused.
|
||||
*
|
||||
* Conformity: None.
|
||||
*
|
||||
* @ingroup Escape_Mman
|
||||
*/
|
||||
EAPI int
|
||||
munmap(void *addr,
|
||||
size_t len);
|
||||
|
||||
# define MADV_NORMAL 0 /* No further special treatment. */
|
||||
# define MADV_RANDOM 1 /* Expect random page references. */
|
||||
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
|
||||
# define MADV_WILLNEED 3 /* Will need these pages. */
|
||||
# define MADV_DONTNEED 4 /* Don't need these pages. */
|
||||
# define MADV_REMOVE 9 /* Remove these pages and resources. */
|
||||
# define MADV_DONTFORK 10 /* Do not inherit across fork. */
|
||||
# define MADV_DOFORK 11 /* Do inherit across fork. */
|
||||
# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
|
||||
# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
|
||||
# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
|
||||
# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
|
||||
# define MADV_HWPOISON 100 /* Poison a page for testing. */
|
||||
|
||||
/**
|
||||
* give advice about use of memory
|
||||
*
|
||||
* @param addr Unused.
|
||||
* @param length Unused.
|
||||
* @param advice Unused.
|
||||
* @return 0 on success, -1 otherwise.
|
||||
*
|
||||
* The madvise() system call advises the kernel about how to handle
|
||||
* paging input/output in the address range beginning at address addr and
|
||||
* with size length bytes. It allows an application to tell the kernel
|
||||
* how it expects to use some mapped or shared memory areas, so that
|
||||
* the kernel can choose appropriate read-ahead and caching techniques.
|
||||
* This call does not influence the semantics of the application (except
|
||||
* in the case of MADV_DONTNEED), but may influence its performance.
|
||||
* The kernel is free to ignore the advice.
|
||||
|
||||
* Conformity: None.
|
||||
*
|
||||
* @ingroup Escape_Mman
|
||||
*/
|
||||
EAPI int
|
||||
madvise(void *addr,
|
||||
size_t length,
|
||||
int advice);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ESCAPE_SYS_MMAN_H__ */
|
||||
|
|
@ -3482,12 +3482,6 @@ typedef Eo Efl_Animation_Group_Sequential;
|
|||
|
||||
#endif
|
||||
|
||||
#define EFL_ANIMATION_GROUP_DURATION_NONE -1
|
||||
#define EFL_ANIMATION_PLAYER_GROUP_DURATION_NONE -1
|
||||
|
||||
#define EFL_ANIMATION_REPEAT_INFINITE -1
|
||||
#define EFL_ANIMATION_PLAYER_REPEAT_INFINITE -1
|
||||
|
||||
// The below type are necessary for legacy API and need to be manually kept in sync with .eo file.
|
||||
#ifndef _EFL_INPUT_DEVICE_EO_CLASS_TYPE
|
||||
#define _EFL_INPUT_DEVICE_EO_CLASS_TYPE
|
||||
|
|
|
@ -122,13 +122,6 @@ typedef Eo Efl_Canvas_Animation_Group_Sequential;
|
|||
|
||||
#endif
|
||||
|
||||
#define EFL_ANIMATION_GROUP_DURATION_NONE -1
|
||||
#define EFL_ANIMATION_PLAYER_GROUP_DURATION_NONE -1
|
||||
|
||||
#define EFL_ANIMATION_REPEAT_INFINITE -1
|
||||
#define EFL_ANIMATION_PLAYER_REPEAT_INFINITE -1
|
||||
|
||||
|
||||
struct _Efl_Canvas_Animation_Player_Event_Running
|
||||
{
|
||||
double progress;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include "efl_canvas_animation_private.h"
|
||||
|
||||
#include <math.h>
|
||||
#define MY_CLASS EFL_CANVAS_ANIMATION_CLASS
|
||||
|
||||
static double _default_animation_time = 0.2; //in seconds
|
||||
|
||||
EOLIAN static void
|
||||
_efl_canvas_animation_duration_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Canvas_Animation_Data *pd,
|
||||
|
@ -50,19 +52,19 @@ _efl_canvas_animation_repeat_mode_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_A
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_canvas_animation_repeat_count_set(Eo *eo_obj EINA_UNUSED,
|
||||
_efl_canvas_animation_play_count_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Canvas_Animation_Data *pd,
|
||||
int count)
|
||||
{
|
||||
EINA_SAFETY_ON_FALSE_RETURN(count >= EFL_ANIMATION_REPEAT_INFINITE);
|
||||
EINA_SAFETY_ON_FALSE_RETURN(count >= 0);
|
||||
|
||||
pd->repeat_count = count;
|
||||
pd->play_count = count;
|
||||
}
|
||||
|
||||
EOLIAN static int
|
||||
_efl_canvas_animation_repeat_count_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Data *pd)
|
||||
_efl_canvas_animation_play_count_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Data *pd)
|
||||
{
|
||||
return pd->repeat_count;
|
||||
return pd->play_count;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -113,13 +115,12 @@ _efl_canvas_animation_animation_apply(Eo *eo_obj,
|
|||
EOLIAN static double
|
||||
_efl_canvas_animation_efl_playable_length_get(const Eo *eo_obj, Efl_Canvas_Animation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
if (efl_animation_repeat_count_get(eo_obj) == EFL_ANIMATION_REPEAT_INFINITE)
|
||||
if (efl_animation_play_count_get(eo_obj) == 0)
|
||||
{
|
||||
//TODO: what's correct?
|
||||
return (double)EFL_ANIMATION_REPEAT_INFINITE;
|
||||
return INFINITY;
|
||||
}
|
||||
|
||||
return (efl_animation_duration_get(eo_obj) * (efl_animation_repeat_count_get(eo_obj) + 1));
|
||||
return (efl_animation_duration_get(eo_obj) * efl_animation_play_count_get(eo_obj));
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
@ -134,4 +135,25 @@ _efl_canvas_animation_efl_playable_seekable_get(const Eo *eo_obj EINA_UNUSED, Ef
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Object*
|
||||
_efl_canvas_animation_efl_object_constructor(Eo *obj, Efl_Canvas_Animation_Data *pd)
|
||||
{
|
||||
pd->duration = _default_animation_time;
|
||||
pd->play_count = 1;
|
||||
return efl_constructor(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_canvas_animation_default_duration_set(double animation_time)
|
||||
{
|
||||
EINA_SAFETY_ON_FALSE_RETURN(animation_time > 0.0);
|
||||
_default_animation_time = animation_time;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_canvas_animation_default_duration_get(void)
|
||||
{
|
||||
return _default_animation_time;
|
||||
}
|
||||
|
||||
#include "efl_canvas_animation.eo.c"
|
||||
|
|
|
@ -40,7 +40,7 @@ class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
|
|||
@property duration {
|
||||
[[The duration of a single animation "run".
|
||||
The @Efl.Playable.length implementation will return this duration adjusted by @.repeat_mode and
|
||||
@.repeat_count.
|
||||
@.play_count.
|
||||
]]
|
||||
set {
|
||||
}
|
||||
|
@ -61,13 +61,15 @@ class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
|
|||
mode: Efl.Canvas.Animation_Repeat_Mode(Efl.Canvas.Animation_Repeat_Mode.restart); [[Repeat mode.]]
|
||||
}
|
||||
}
|
||||
@property repeat_count {
|
||||
[[How many times to repeat an animation once it finishes.
|
||||
$[0] means that the animation only plays once (it is not repeated) and is the default value.
|
||||
$[-1] means that the animation is repeated forever.
|
||||
@property play_count {
|
||||
[[How many times to play an animation.
|
||||
$[1] means that the animation only plays once (it is not repeated), whereas $[2] will play it
|
||||
again once it finishes the first time and then stop.
|
||||
$[0] means that the animation is repeated forever.
|
||||
@.repeat_mode controls the direction in which subsequent playbacks will run.
|
||||
]]
|
||||
values {
|
||||
count: int(0); [[Repeat count.]]
|
||||
count: int(1); [[Play count.]]
|
||||
}
|
||||
}
|
||||
@property start_delay {
|
||||
|
@ -110,8 +112,17 @@ class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
|
|||
}
|
||||
return: double; [[Final applied progress, after possible adjustments. See @.interpolator.]]
|
||||
}
|
||||
@property default_duration @static {
|
||||
[[Duration that will be used by default on all animations unless another value
|
||||
is set per object using @.duration.
|
||||
]]
|
||||
values {
|
||||
animation_time : double; [[Default animation duration, in seconds.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Playable.length { get; }
|
||||
Efl.Playable.seekable { get; }
|
||||
Efl.Playable.playable { get; }
|
||||
|
|
|
@ -8,10 +8,7 @@ _efl_canvas_animation_group_animation_add(Eo *eo_obj,
|
|||
if (!animation) return;
|
||||
|
||||
double duration = efl_animation_duration_get(efl_super(eo_obj, MY_CLASS));
|
||||
/* if group animation duration is available value, then the duration is
|
||||
* propagated to its child. */
|
||||
if (duration != EFL_ANIMATION_GROUP_DURATION_NONE)
|
||||
efl_animation_duration_set(animation, duration);
|
||||
efl_animation_duration_set(animation, duration);
|
||||
|
||||
Eina_Bool keep_final_state = efl_animation_final_state_keep_get(eo_obj);
|
||||
efl_animation_final_state_keep_set(animation, keep_final_state);
|
||||
|
@ -53,9 +50,8 @@ _efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
|
|||
Efl_Canvas_Animation_Group_Data *pd,
|
||||
double duration)
|
||||
{
|
||||
if (duration == EFL_ANIMATION_GROUP_DURATION_NONE) goto end;
|
||||
|
||||
if (duration < 0.0) return;
|
||||
efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
|
||||
duration = efl_animation_duration_get(eo_obj);
|
||||
|
||||
Eina_List *l;
|
||||
Efl_Canvas_Animation *anim;
|
||||
|
@ -63,9 +59,6 @@ _efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
|
|||
{
|
||||
efl_animation_duration_set(anim, duration);
|
||||
}
|
||||
|
||||
end:
|
||||
efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -106,9 +99,6 @@ _efl_canvas_animation_group_efl_object_constructor(Eo *eo_obj,
|
|||
|
||||
pd->animations = NULL;
|
||||
|
||||
//group animation does not affect its child duration by default.
|
||||
efl_animation_duration_set(eo_obj, EFL_ANIMATION_GROUP_DURATION_NONE);
|
||||
|
||||
return eo_obj;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,9 +21,12 @@ abstract @beta Efl.Canvas.Animation_Group extends Efl.Canvas.Animation
|
|||
@in animation: Efl.Canvas.Animation; [[Animation to remove from the group.]]
|
||||
}
|
||||
}
|
||||
animations_get @const {
|
||||
[[Gets the list of animations currently in the animation group.]]
|
||||
return: iterator<Efl.Canvas.Animation> @move; [[List of animations in the group.]]
|
||||
@property animations {
|
||||
[[All animations that are currently part of this group.]]
|
||||
get { }
|
||||
values {
|
||||
animations : iterator<Efl.Canvas.Animation> @move; [[The iterator carrying all animations of this group]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef struct _Efl_Canvas_Animation_Data
|
|||
double start_delay_time;
|
||||
|
||||
Efl_Canvas_Animation_Repeat_Mode repeat_mode;
|
||||
int repeat_count;
|
||||
int play_count;
|
||||
|
||||
Efl_Interpolator *interpolator;
|
||||
|
||||
|
@ -25,4 +25,4 @@ typedef struct _Efl_Canvas_Animation_Data
|
|||
|
||||
#define FINAL_STATE_IS_REVERSE(anim) \
|
||||
((efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) && \
|
||||
(efl_animation_repeat_count_get(anim) & 1))
|
||||
(efl_animation_play_count_get(anim) & 1))
|
||||
|
|
|
@ -5,9 +5,11 @@ struct @beta Efl.Canvas.Animation_Player_Event_Running; [[Information of event r
|
|||
|
||||
enum @beta Efl.Canvas.Animation_Repeat_Mode
|
||||
{
|
||||
[[Animation repeat mode]]
|
||||
[[Animation repeat mode.]]
|
||||
|
||||
restart = 0, [[Restart animation when the animation ends.]]
|
||||
reverse = 1, [[Reverse animation when the animation ends.]]
|
||||
restart = 0, [[Restart animation when the animation ends: The animation will play again from the beginning to the
|
||||
end.]]
|
||||
reverse = 1, [[Reverse animation when the animation ends: The animation will continue playing from the end to the
|
||||
beginning.]]
|
||||
last
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ _animator_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
(pd->in->speed > 0 && EINA_DBL_EQ(pd->in->progress, 1.0)))
|
||||
{
|
||||
//Repeat animation
|
||||
if ((efl_animation_repeat_count_get(pd->in->animation) == EFL_ANIMATION_REPEAT_INFINITE) ||
|
||||
if ((efl_animation_play_count_get(pd->in->animation) == 0) ||
|
||||
(pd->in->remaining_repeats > 0))
|
||||
{
|
||||
pd->in->remaining_repeats--;
|
||||
|
@ -167,7 +167,7 @@ _efl_canvas_object_animation_animation_start(Eo *obj, Efl_Canvas_Object_Animatio
|
|||
|
||||
in->pause_state = EINA_FALSE;
|
||||
in->animation = efl_ref(animation);
|
||||
in->remaining_repeats = efl_animation_repeat_count_get(animation); // -1 because one run is already going on
|
||||
in->remaining_repeats = efl_animation_play_count_get(animation) - 1; // -1 because one run is already going on
|
||||
in->speed = speed;
|
||||
in->start_pos = start_pos;
|
||||
efl_event_callback_call(obj, EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, in->animation);
|
||||
|
|
|
@ -6,7 +6,7 @@ abstract @beta Efl.Text.Attribute.Factory extends Efl.Object {
|
|||
|
||||
Attributes can be assigned to character ranges, selected using two @Efl.Text.Cursor instances.
|
||||
Cursor instances are already bound to a text object so there's no need to provide it to this class.
|
||||
Style is specified using format strings as described in Efl.Canvas.Text.style_set.
|
||||
Style is specified using format strings as described in @Efl.Canvas.Text.style_apply.
|
||||
|
||||
There is no need to instantiate this class. Use directly the @.attribute_insert and @.attribute_clear static methods.]]
|
||||
methods {
|
||||
|
@ -15,7 +15,7 @@ abstract @beta Efl.Text.Attribute.Factory extends Efl.Object {
|
|||
|
||||
The $format will be applied to the given range.
|
||||
The passed cursors must belong to same textObject, else insertion will be ignored.
|
||||
Passed format parameter uses same format as style in Efl.Canvas.Text.style_set.
|
||||
Passed format parameter uses same format as style in @Efl.Canvas.Text.style_apply.
|
||||
]]
|
||||
params {
|
||||
start: const(Efl.Text.Cursor); [[Start of range.]]
|
||||
|
|
|
@ -3042,7 +3042,7 @@ _canvas_event_feed_multi_down_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
|
|||
|
||||
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_DOWN, evt,
|
||||
event_id, EFL_EVENT_FINGER_DOWN);
|
||||
if ((obj->proxy->is_proxy) || (obj->proxy->src_events))
|
||||
if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
|
||||
_evas_event_source_multi_down_events(obj, e, evt, pdata, event_id);
|
||||
if (e->delete_me || e->is_frozen) break;
|
||||
}
|
||||
|
@ -3126,7 +3126,7 @@ _canvas_event_feed_multi_up_internal(Evas_Public_Data *e, Efl_Input_Pointer_Data
|
|||
}
|
||||
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_UP, evt,
|
||||
event_id, EFL_EVENT_FINGER_UP);
|
||||
if ((obj->proxy->is_proxy) || (obj->proxy->src_events))
|
||||
if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
|
||||
_evas_event_source_multi_up_events(obj, e, evt, pdata, event_id);
|
||||
if (e->delete_me || e->is_frozen) break;
|
||||
}
|
||||
|
@ -3308,7 +3308,7 @@ _canvas_event_feed_multi_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
|
|||
_evas_event_havemap_adjust_f(obj, &ev->cur, &ev->prev, obj_pdata->mouse_grabbed);
|
||||
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, evt,
|
||||
event_id, EFL_EVENT_FINGER_MOVE);
|
||||
if ((obj->proxy->is_proxy) || (obj->proxy->src_events))
|
||||
if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
|
||||
_evas_event_source_multi_move_events(obj, e, evt, pdata, event_id);
|
||||
|
||||
if (e->delete_me || e->is_frozen) break;
|
||||
|
@ -3352,7 +3352,7 @@ _canvas_event_feed_multi_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
|
|||
{
|
||||
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_MOVE, evt,
|
||||
event_id, EFL_EVENT_FINGER_MOVE);
|
||||
if ((obj->proxy->is_proxy) || (obj->proxy->src_events))
|
||||
if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
|
||||
_evas_event_source_multi_move_events(obj, e, evt, pdata, event_id);
|
||||
}
|
||||
if (e->delete_me || e->is_frozen) break;
|
||||
|
|
|
@ -24,10 +24,6 @@
|
|||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_ESCAPE
|
||||
# include <Escape.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PIXMAN
|
||||
#include <pixman.h>
|
||||
#endif
|
||||
|
@ -36,10 +32,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_EXOTIC
|
||||
# include <Exotic.h>
|
||||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Eo.h>
|
||||
#include <Ector.h>
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Evas.h>
|
||||
#include <Ecore.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/video/gstvideosink.h>
|
||||
|
||||
#ifdef HAVE_ECORE_X
|
||||
# include <Ecore_X.h>
|
||||
# ifdef HAVE_XOVERLAY_H
|
||||
# include <gst/interfaces/xoverlay.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "Emotion.h"
|
||||
#include "emotion_gstreamer.h"
|
||||
|
||||
Emotion_Gstreamer_Buffer *
|
||||
emotion_gstreamer_buffer_alloc(EvasVideoSinkPrivate *sink,
|
||||
GstBuffer *buffer,
|
||||
Eina_Bool preroll)
|
||||
{
|
||||
Emotion_Gstreamer_Buffer *send;
|
||||
|
||||
if (!sink->ev) return NULL;
|
||||
|
||||
send = malloc(sizeof (Emotion_Gstreamer_Buffer));
|
||||
if (!send) return NULL;
|
||||
|
||||
send->sink = sink;
|
||||
send->frame = gst_buffer_ref(buffer);
|
||||
send->preroll = preroll;
|
||||
send->force = EINA_FALSE;
|
||||
sink->ev->out++;
|
||||
send->ev = sink->ev;
|
||||
|
||||
return send;
|
||||
}
|
||||
|
||||
void
|
||||
emotion_gstreamer_buffer_free(Emotion_Gstreamer_Buffer *send)
|
||||
{
|
||||
send->ev->in++;
|
||||
|
||||
if (send->ev->in == send->ev->out
|
||||
&& send->ev->threads == NULL
|
||||
&& send->ev->delete_me)
|
||||
send->ev->api->del(send->ev);
|
||||
|
||||
gst_buffer_unref(send->frame);
|
||||
free(send);
|
||||
}
|
||||
|
||||
Emotion_Gstreamer_Message *
|
||||
emotion_gstreamer_message_alloc(Emotion_Gstreamer_Video *ev,
|
||||
GstMessage *msg)
|
||||
{
|
||||
Emotion_Gstreamer_Message *send;
|
||||
|
||||
if (!ev) return NULL;
|
||||
|
||||
send = malloc(sizeof (Emotion_Gstreamer_Message));
|
||||
if (!send) return NULL;
|
||||
|
||||
ev->out++;
|
||||
send->ev = ev;
|
||||
send->msg = gst_message_ref(msg);
|
||||
|
||||
return send;
|
||||
}
|
||||
|
||||
void
|
||||
emotion_gstreamer_message_free(Emotion_Gstreamer_Message *send)
|
||||
{
|
||||
send->ev->in++;
|
||||
|
||||
if (send->ev->in == send->ev->out
|
||||
&& send->ev->threads == NULL
|
||||
&& send->ev->delete_me)
|
||||
send->ev->api->del(send->ev);
|
||||
|
||||
gst_message_unref(send->msg);
|
||||
free(send);
|
||||
}
|
|
@ -1,251 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Evas.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/video/gstvideosink.h>
|
||||
|
||||
#ifdef HAVE_ECORE_X
|
||||
# include <Ecore_X.h>
|
||||
# ifdef HAVE_XOVERLAY_H
|
||||
# include <gst/interfaces/xoverlay.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "Emotion.h"
|
||||
#include "emotion_gstreamer.h"
|
||||
|
||||
static inline void
|
||||
_evas_video_bgrx_step(unsigned char *evas_data, const unsigned char *gst_data,
|
||||
unsigned int w, unsigned int h EINA_UNUSED, unsigned int output_height, unsigned int step)
|
||||
{
|
||||
unsigned int x;
|
||||
unsigned int y;
|
||||
|
||||
for (y = 0; y < output_height; ++y)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
evas_data[0] = gst_data[0];
|
||||
evas_data[1] = gst_data[1];
|
||||
evas_data[2] = gst_data[2];
|
||||
evas_data[3] = 255;
|
||||
gst_data += step;
|
||||
evas_data += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_bgr(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h, unsigned int output_height)
|
||||
{
|
||||
_evas_video_bgrx_step(evas_data, gst_data, w, h, output_height, 3);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_bgrx(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h, unsigned int output_height)
|
||||
{
|
||||
_evas_video_bgrx_step(evas_data, gst_data, w, h, output_height, 4);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_bgra(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h EINA_UNUSED, unsigned int output_height)
|
||||
{
|
||||
unsigned int x;
|
||||
unsigned int y;
|
||||
|
||||
for (y = 0; y < output_height; ++y)
|
||||
{
|
||||
unsigned char alpha;
|
||||
|
||||
for (x = 0; x < w; ++x)
|
||||
{
|
||||
alpha = gst_data[3];
|
||||
evas_data[0] = (gst_data[0] * alpha) / 255;
|
||||
evas_data[1] = (gst_data[1] * alpha) / 255;
|
||||
evas_data[2] = (gst_data[2] * alpha) / 255;
|
||||
evas_data[3] = alpha;
|
||||
gst_data += 4;
|
||||
evas_data += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_i420(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h, unsigned int output_height)
|
||||
{
|
||||
const unsigned char **rows;
|
||||
unsigned int i, j;
|
||||
unsigned int rh;
|
||||
unsigned int stride_y, stride_uv;
|
||||
|
||||
rh = output_height;
|
||||
|
||||
rows = (const unsigned char **)evas_data;
|
||||
|
||||
stride_y = GST_ROUND_UP_4(w);
|
||||
stride_uv = GST_ROUND_UP_8(w) / 2;
|
||||
|
||||
for (i = 0; i < rh; i++)
|
||||
rows[i] = &gst_data[i * stride_y];
|
||||
|
||||
for (j = 0; j < (rh / 2); j++, i++)
|
||||
rows[i] = &gst_data[h * stride_y + j * stride_uv];
|
||||
|
||||
for (j = 0; j < (rh / 2); j++, i++)
|
||||
rows[i] = &gst_data[h * stride_y +
|
||||
(rh / 2) * stride_uv +
|
||||
j * stride_uv];
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_yv12(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h, unsigned int output_height)
|
||||
{
|
||||
const unsigned char **rows;
|
||||
unsigned int i, j;
|
||||
unsigned int rh;
|
||||
unsigned int stride_y, stride_uv;
|
||||
|
||||
rh = output_height;
|
||||
|
||||
rows = (const unsigned char **)evas_data;
|
||||
|
||||
stride_y = GST_ROUND_UP_4(w);
|
||||
stride_uv = GST_ROUND_UP_8(w) / 2;
|
||||
|
||||
for (i = 0; i < rh; i++)
|
||||
rows[i] = &gst_data[i * stride_y];
|
||||
|
||||
for (j = 0; j < (rh / 2); j++, i++)
|
||||
rows[i] = &gst_data[h * stride_y +
|
||||
(rh / 2) * stride_uv +
|
||||
j * stride_uv];
|
||||
|
||||
for (j = 0; j < (rh / 2); j++, i++)
|
||||
rows[i] = &gst_data[h * stride_y + j * stride_uv];
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_yuy2(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h EINA_UNUSED, unsigned int output_height)
|
||||
{
|
||||
const unsigned char **rows;
|
||||
unsigned int i;
|
||||
unsigned int stride;
|
||||
|
||||
rows = (const unsigned char **)evas_data;
|
||||
|
||||
stride = GST_ROUND_UP_4(w * 2);
|
||||
|
||||
for (i = 0; i < output_height; i++)
|
||||
rows[i] = &gst_data[i * stride];
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_nv12(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h EINA_UNUSED, unsigned int output_height)
|
||||
{
|
||||
const unsigned char **rows;
|
||||
unsigned int i, j;
|
||||
unsigned int rh;
|
||||
|
||||
rh = output_height;
|
||||
|
||||
rows = (const unsigned char **)evas_data;
|
||||
|
||||
for (i = 0; i < rh; i++)
|
||||
rows[i] = &gst_data[i * w];
|
||||
|
||||
for (j = 0; j < (rh / 2); j++, i++)
|
||||
rows[i] = &gst_data[rh * w + j * w];
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_video_mt12(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h, unsigned int output_height EINA_UNUSED)
|
||||
{
|
||||
const unsigned char **rows;
|
||||
unsigned int i;
|
||||
unsigned int j;
|
||||
|
||||
rows = (const unsigned char **)evas_data;
|
||||
|
||||
for (i = 0; i < (h / 32) / 2; i++)
|
||||
rows[i] = &gst_data[i * w * 2 * 32];
|
||||
|
||||
if ((h / 32) % 2)
|
||||
{
|
||||
rows[i] = &gst_data[i * w * 2 * 32];
|
||||
i++;
|
||||
}
|
||||
|
||||
for (j = 0; j < ((h / 2) / 32) / 2; ++j, ++i)
|
||||
rows[i] = &gst_data[h * w + j * (w / 2) * 2 * 16];
|
||||
}
|
||||
|
||||
void
|
||||
_evas_video_st12_multiplane(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h, unsigned int output_height EINA_UNUSED)
|
||||
{
|
||||
const GstMultiPlaneImageBuffer *mp_buf = (const GstMultiPlaneImageBuffer *) gst_data;
|
||||
const unsigned char **rows;
|
||||
unsigned int i;
|
||||
unsigned int j;
|
||||
|
||||
rows = (const unsigned char **)evas_data;
|
||||
|
||||
for (i = 0; i < (h / 32) / 2; i++)
|
||||
rows[i] = mp_buf->uaddr[0] + i * w * 2 * 32;
|
||||
if ((h / 32) % 2)
|
||||
{
|
||||
rows[i] = mp_buf->uaddr[0] + i * w * 2 * 32;
|
||||
i++;
|
||||
}
|
||||
|
||||
for (j = 0; j < ((h / 2) / 16) / 2; j++, i++)
|
||||
{
|
||||
rows[i] = mp_buf->uaddr[1] + j * w * 2 * 16 * 2;
|
||||
}
|
||||
if (((h / 2) / 16) % 2)
|
||||
rows[i] = mp_buf->uaddr[1] + j * w * 2 * 16 * 2;
|
||||
}
|
||||
|
||||
void
|
||||
_evas_video_st12(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w EINA_UNUSED, unsigned int h, unsigned int output_height EINA_UNUSED)
|
||||
{
|
||||
const SCMN_IMGB *imgb = (const SCMN_IMGB *) gst_data;
|
||||
const unsigned char **rows;
|
||||
unsigned int i, j;
|
||||
|
||||
rows = (const unsigned char **)evas_data;
|
||||
|
||||
for (i = 0; i < (h / 32) / 2; i++)
|
||||
rows[i] = imgb->uaddr[0] + i * imgb->stride[0] * 2 * 32;
|
||||
if ((h / 32) % 2)
|
||||
{
|
||||
rows[i] = imgb->uaddr[0] + i * imgb->stride[0] * 2 * 32;
|
||||
i++;
|
||||
}
|
||||
|
||||
for (j = 0; j < (unsigned int) imgb->elevation[1] / 32 / 2; j++, i++)
|
||||
rows[i] = imgb->uaddr[1] + j * imgb->stride[1] * 32 * 2;
|
||||
if ((imgb->elevation[1] / 32) % 2)
|
||||
rows[i++] = imgb->uaddr[1] + j * imgb->stride[1] * 32 * 2;
|
||||
}
|
||||
|
||||
const ColorSpace_FourCC_Convertion colorspace_fourcc_convertion[] = {
|
||||
{ "I420", GST_MAKE_FOURCC('I', '4', '2', '0'), EVAS_COLORSPACE_YCBCR422P601_PL, _evas_video_i420, EINA_TRUE },
|
||||
{ "YV12", GST_MAKE_FOURCC('Y', 'V', '1', '2'), EVAS_COLORSPACE_YCBCR422P601_PL, _evas_video_yv12, EINA_TRUE },
|
||||
{ "YUY2", GST_MAKE_FOURCC('Y', 'U', 'Y', '2'), EVAS_COLORSPACE_YCBCR422601_PL, _evas_video_yuy2, EINA_FALSE },
|
||||
{ "NV12", GST_MAKE_FOURCC('N', 'V', '1', '2'), EVAS_COLORSPACE_YCBCR420NV12601_PL, _evas_video_nv12, EINA_TRUE },
|
||||
{ "TM12", GST_MAKE_FOURCC('T', 'M', '1', '2'), EVAS_COLORSPACE_YCBCR420TM12601_PL, _evas_video_mt12, EINA_TRUE },
|
||||
{ NULL, 0, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
const ColorSpace_Format_Convertion colorspace_format_convertion[] = {
|
||||
{ "BGR", GST_VIDEO_FORMAT_BGR, EVAS_COLORSPACE_ARGB8888, _evas_video_bgr },
|
||||
{ "BGRx", GST_VIDEO_FORMAT_BGRx, EVAS_COLORSPACE_ARGB8888, _evas_video_bgrx },
|
||||
{ "BGRA", GST_VIDEO_FORMAT_BGRA, EVAS_COLORSPACE_ARGB8888, _evas_video_bgra },
|
||||
{ NULL, 0, 0, NULL }
|
||||
};
|
|
@ -1,70 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Evas.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/video/gstvideosink.h>
|
||||
|
||||
#ifdef HAVE_ECORE_X
|
||||
# include <Ecore_X.h>
|
||||
# ifdef HAVE_XOVERLAY_H
|
||||
# include <gst/interfaces/xoverlay.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "Emotion.h"
|
||||
#include "emotion_gstreamer.h"
|
||||
|
||||
typedef struct _FakeEOSBin
|
||||
{
|
||||
GstBin parent;
|
||||
} FakeEOSBin;
|
||||
|
||||
typedef struct _FakeEOSBinClass
|
||||
{
|
||||
GstBinClass parent;
|
||||
} FakeEOSBinClass;
|
||||
|
||||
GST_BOILERPLATE(FakeEOSBin, fakeeos_bin, GstBin,
|
||||
GST_TYPE_BIN);
|
||||
|
||||
static void
|
||||
fakeeos_bin_handle_message(GstBin * bin, GstMessage * message)
|
||||
{
|
||||
/* FakeEOSBin *fakeeos = (FakeEOSBin *)(bin); */
|
||||
|
||||
switch (GST_MESSAGE_TYPE(message)) {
|
||||
case GST_MESSAGE_EOS:
|
||||
/* what to do here ? just returning at the moment */
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
GST_BIN_CLASS(parent_class)->handle_message(bin, message);
|
||||
}
|
||||
|
||||
static void
|
||||
fakeeos_bin_base_init(gpointer g_class EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
fakeeos_bin_class_init(FakeEOSBinClass * klass)
|
||||
{
|
||||
GstBinClass *gstbin_class = GST_BIN_CLASS(klass);
|
||||
|
||||
gstbin_class->handle_message =
|
||||
GST_DEBUG_FUNCPTR (fakeeos_bin_handle_message);
|
||||
}
|
||||
|
||||
static void
|
||||
fakeeos_bin_init(FakeEOSBin *src EINA_UNUSED,
|
||||
FakeEOSBinClass *klass EINA_UNUSED)
|
||||
{
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,352 +0,0 @@
|
|||
#ifndef __EMOTION_GSTREAMER_H__
|
||||
#define __EMOTION_GSTREAMER_H__
|
||||
|
||||
#include "emotion_modules.h"
|
||||
|
||||
typedef void (*Evas_Video_Convert_Cb)(unsigned char *evas_data,
|
||||
const unsigned char *gst_data,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int output_height);
|
||||
|
||||
typedef struct _EvasVideoSinkPrivate EvasVideoSinkPrivate;
|
||||
typedef struct _EvasVideoSink EvasVideoSink;
|
||||
typedef struct _EvasVideoSinkClass EvasVideoSinkClass;
|
||||
typedef struct _Emotion_Gstreamer_Video Emotion_Gstreamer_Video;
|
||||
typedef struct _Emotion_Audio_Stream Emotion_Audio_Stream;
|
||||
typedef struct _Emotion_Gstreamer_Metadata Emotion_Gstreamer_Metadata;
|
||||
typedef struct _Emotion_Gstreamer_Buffer Emotion_Gstreamer_Buffer;
|
||||
typedef struct _Emotion_Gstreamer_Message Emotion_Gstreamer_Message;
|
||||
typedef struct _Emotion_Video_Stream Emotion_Video_Stream;
|
||||
|
||||
struct _Emotion_Video_Stream
|
||||
{
|
||||
gdouble length_time;
|
||||
gint width;
|
||||
gint height;
|
||||
gint fps_num;
|
||||
gint fps_den;
|
||||
guint32 fourcc;
|
||||
int index;
|
||||
};
|
||||
|
||||
struct _Emotion_Audio_Stream
|
||||
{
|
||||
gdouble length_time;
|
||||
gint channels;
|
||||
gint samplerate;
|
||||
};
|
||||
|
||||
struct _Emotion_Gstreamer_Metadata
|
||||
{
|
||||
char *title;
|
||||
char *album;
|
||||
char *artist;
|
||||
char *genre;
|
||||
char *comment;
|
||||
char *year;
|
||||
char *count;
|
||||
char *disc_id;
|
||||
};
|
||||
|
||||
struct _Emotion_Gstreamer_Video
|
||||
{
|
||||
const Emotion_Engine *api;
|
||||
|
||||
/* Gstreamer elements */
|
||||
GstElement *pipeline;
|
||||
GstElement *sink;
|
||||
GstElement *esink;
|
||||
GstElement *xvsink;
|
||||
GstElement *tee;
|
||||
GstElement *convert;
|
||||
|
||||
GstPad *eteepad;
|
||||
GstPad *xvteepad;
|
||||
GstPad *xvpad;
|
||||
Eina_List *threads;
|
||||
|
||||
/* eos */
|
||||
GstBus *eos_bus;
|
||||
|
||||
/* Strams */
|
||||
Eina_List *video_streams;
|
||||
Eina_List *audio_streams;
|
||||
|
||||
int video_stream_nbr;
|
||||
int audio_stream_nbr;
|
||||
|
||||
/* We need to keep a copy of the last inserted buffer as evas doesn't copy YUV data around */
|
||||
GstBuffer *last_buffer;
|
||||
|
||||
/* Evas object */
|
||||
Evas_Object *obj;
|
||||
|
||||
/* Characteristics of stream */
|
||||
double position;
|
||||
double ratio;
|
||||
double volume;
|
||||
|
||||
volatile int seek_to;
|
||||
volatile int get_poslen;
|
||||
|
||||
Emotion_Gstreamer_Metadata *metadata;
|
||||
|
||||
#ifdef HAVE_ECORE_X
|
||||
Ecore_X_Window win;
|
||||
#endif
|
||||
|
||||
const char *uri;
|
||||
|
||||
Emotion_Gstreamer_Buffer *send;
|
||||
|
||||
EvasVideoSinkPrivate *sink_data;
|
||||
|
||||
Emotion_Vis vis;
|
||||
|
||||
int in;
|
||||
int out;
|
||||
|
||||
int frames;
|
||||
int flapse;
|
||||
double rtime;
|
||||
double rlapse;
|
||||
|
||||
struct
|
||||
{
|
||||
double width;
|
||||
double height;
|
||||
} fill;
|
||||
|
||||
Eina_Bool play : 1;
|
||||
Eina_Bool play_started : 1;
|
||||
Eina_Bool video_mute : 1;
|
||||
Eina_Bool audio_mute : 1;
|
||||
Eina_Bool pipeline_parsed : 1;
|
||||
Eina_Bool delete_me : 1;
|
||||
Eina_Bool samsung : 1;
|
||||
Eina_Bool kill_buffer : 1;
|
||||
Eina_Bool stream : 1;
|
||||
Eina_Bool priority : 1;
|
||||
|
||||
int src_width;
|
||||
int src_height;
|
||||
};
|
||||
|
||||
struct _EvasVideoSink {
|
||||
/*< private >*/
|
||||
GstVideoSink parent;
|
||||
EvasVideoSinkPrivate *priv;
|
||||
};
|
||||
|
||||
struct _EvasVideoSinkClass {
|
||||
/*< private >*/
|
||||
GstVideoSinkClass parent_class;
|
||||
};
|
||||
|
||||
struct _EvasVideoSinkPrivate {
|
||||
EINA_REFCOUNT;
|
||||
|
||||
Evas_Object *o;
|
||||
|
||||
Emotion_Gstreamer_Video *ev;
|
||||
|
||||
Evas_Video_Convert_Cb func;
|
||||
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int source_height;
|
||||
Evas_Colorspace eformat;
|
||||
|
||||
Eina_Lock m;
|
||||
Eina_Condition c;
|
||||
|
||||
// If this is TRUE all processing should finish ASAP
|
||||
// This is necessary because there could be a race between
|
||||
// unlock() and render(), where unlock() wins, signals the
|
||||
// GCond, then render() tries to render a frame although
|
||||
// everything else isn't running anymore. This will lead
|
||||
// to deadlocks because render() holds the stream lock.
|
||||
//
|
||||
// Protected by the buffer mutex
|
||||
Eina_Bool unlocked : 1;
|
||||
Eina_Bool samsung : 1; /** ST12 will only define a Samsung specific GstBuffer */
|
||||
};
|
||||
|
||||
struct _Emotion_Gstreamer_Buffer
|
||||
{
|
||||
Emotion_Gstreamer_Video *ev;
|
||||
EvasVideoSinkPrivate *sink;
|
||||
|
||||
GstBuffer *frame;
|
||||
|
||||
Eina_Bool preroll : 1;
|
||||
Eina_Bool force : 1;
|
||||
};
|
||||
|
||||
struct _Emotion_Gstreamer_Message
|
||||
{
|
||||
Emotion_Gstreamer_Video *ev;
|
||||
|
||||
GstMessage *msg;
|
||||
};
|
||||
|
||||
extern Eina_Bool window_manager_video;
|
||||
extern Eina_Bool debug_fps;
|
||||
extern int _emotion_gstreamer_log_domain;
|
||||
extern Eina_Bool _ecore_x_available;
|
||||
|
||||
#ifdef DBG
|
||||
#undef DBG
|
||||
#endif
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
||||
|
||||
#ifdef INF
|
||||
#undef INF
|
||||
#endif
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
||||
|
||||
#ifdef WRN
|
||||
#undef WRN
|
||||
#endif
|
||||
#define WRN(...) EINA_LOG_DOM_WARN(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
||||
|
||||
#ifdef ERR
|
||||
#undef ERR
|
||||
#endif
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
||||
|
||||
#ifdef CRI
|
||||
#undef CRI
|
||||
#endif
|
||||
#define CRI(...) EINA_LOG_DOM_CRIT(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
||||
|
||||
#define EVAS_TYPE_VIDEO_SINK evas_video_sink_get_type()
|
||||
|
||||
GType fakeeos_bin_get_type(void);
|
||||
|
||||
#define EVAS_VIDEO_SINK(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
EVAS_TYPE_VIDEO_SINK, EvasVideoSink))
|
||||
|
||||
#define EVAS_VIDEO_SINK_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
EVAS_TYPE_VIDEO_SINK, EvasVideoSinkClass))
|
||||
|
||||
#define EVAS_IS_VIDEO_SINK(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
EVAS_TYPE_VIDEO_SINK))
|
||||
|
||||
#define EVAS_IS_VIDEO_SINK_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass), \
|
||||
EVAS_TYPE_VIDEO_SINK))
|
||||
|
||||
#define EVAS_VIDEO_SINK_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), \
|
||||
EVAS_TYPE_VIDEO_SINK, EvasVideoSinkClass))
|
||||
|
||||
#define GST_TYPE_FAKEEOS_BIN fakeeos_bin_get_type()
|
||||
|
||||
GstElement *gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
|
||||
Evas_Object *obj,
|
||||
const char *uri);
|
||||
|
||||
gboolean gstreamer_plugin_init(GstPlugin *plugin);
|
||||
|
||||
Emotion_Gstreamer_Buffer *emotion_gstreamer_buffer_alloc(EvasVideoSinkPrivate *sink,
|
||||
GstBuffer *buffer,
|
||||
Eina_Bool preroll);
|
||||
void emotion_gstreamer_buffer_free(Emotion_Gstreamer_Buffer *send);
|
||||
|
||||
Emotion_Gstreamer_Message *emotion_gstreamer_message_alloc(Emotion_Gstreamer_Video *ev,
|
||||
GstMessage *msg);
|
||||
void emotion_gstreamer_message_free(Emotion_Gstreamer_Message *send);
|
||||
Eina_Bool _emotion_gstreamer_video_pipeline_parse(Emotion_Gstreamer_Video *ev,
|
||||
Eina_Bool force);
|
||||
|
||||
typedef struct _ColorSpace_FourCC_Convertion ColorSpace_FourCC_Convertion;
|
||||
typedef struct _ColorSpace_Format_Convertion ColorSpace_Format_Convertion;
|
||||
|
||||
struct _ColorSpace_FourCC_Convertion
|
||||
{
|
||||
const char *name;
|
||||
guint32 fourcc;
|
||||
Evas_Colorspace eformat;
|
||||
Evas_Video_Convert_Cb func;
|
||||
Eina_Bool force_height;
|
||||
};
|
||||
|
||||
struct _ColorSpace_Format_Convertion
|
||||
{
|
||||
const char *name;
|
||||
GstVideoFormat format;
|
||||
Evas_Colorspace eformat;
|
||||
Evas_Video_Convert_Cb func;
|
||||
};
|
||||
|
||||
extern const ColorSpace_FourCC_Convertion colorspace_fourcc_convertion[];
|
||||
extern const ColorSpace_Format_Convertion colorspace_format_convertion[];
|
||||
|
||||
/** Samsung specific infrastructure - do not touch, do not modify */
|
||||
#define MPLANE_IMGB_MAX_COUNT 4
|
||||
#define SCMN_IMGB_MAX_PLANE 4
|
||||
|
||||
typedef struct _GstMultiPlaneImageBuffer GstMultiPlaneImageBuffer;
|
||||
typedef struct _SCMN_IMGB SCMN_IMGB;
|
||||
|
||||
struct _GstMultiPlaneImageBuffer
|
||||
{
|
||||
GstBuffer buffer;
|
||||
|
||||
/* width of each image plane */
|
||||
gint width[MPLANE_IMGB_MAX_COUNT];
|
||||
/* height of each image plane */
|
||||
gint height[MPLANE_IMGB_MAX_COUNT];
|
||||
/* stride of each image plane */
|
||||
gint stride[MPLANE_IMGB_MAX_COUNT];
|
||||
/* elevation of each image plane */
|
||||
gint elevation[MPLANE_IMGB_MAX_COUNT];
|
||||
/* user space address of each image plane */
|
||||
guchar *uaddr[MPLANE_IMGB_MAX_COUNT];
|
||||
/* Index of real address of each image plane, if needs */
|
||||
guchar *index[MPLANE_IMGB_MAX_COUNT];
|
||||
/* left postion, if needs */
|
||||
gint x;
|
||||
/* top position, if needs */
|
||||
gint y;
|
||||
/* to align memory */
|
||||
gint __dummy2;
|
||||
/* arbitrary data */
|
||||
gint data[16];
|
||||
};
|
||||
|
||||
struct _SCMN_IMGB
|
||||
{
|
||||
/* width of each image plane */
|
||||
int width[SCMN_IMGB_MAX_PLANE];
|
||||
/* height of each image plane */
|
||||
int height[SCMN_IMGB_MAX_PLANE];
|
||||
/* stride of each image plane */
|
||||
int stride[SCMN_IMGB_MAX_PLANE];
|
||||
/* elevation of each image plane */
|
||||
int elevation[SCMN_IMGB_MAX_PLANE];
|
||||
/* user space address of each image plane */
|
||||
guchar *uaddr[SCMN_IMGB_MAX_PLANE];
|
||||
/* physical address of each image plane, if needs */
|
||||
guchar *p[SCMN_IMGB_MAX_PLANE];
|
||||
/* color space type of image */
|
||||
int cs;
|
||||
/* left postion, if needs */
|
||||
int x;
|
||||
/* top position, if needs */
|
||||
int y;
|
||||
/* to align memory */
|
||||
int __dummy2;
|
||||
/* arbitrary data */
|
||||
int data[16];
|
||||
};
|
||||
|
||||
void _evas_video_st12_multiplane(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w, unsigned int h, unsigned int output_height EINA_UNUSED);
|
||||
void _evas_video_st12(unsigned char *evas_data, const unsigned char *gst_data, unsigned int w EINA_UNUSED, unsigned int h, unsigned int output_height EINA_UNUSED);
|
||||
|
||||
#endif /* __EMOTION_GSTREAMER_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,18 +0,0 @@
|
|||
generic_src = files([
|
||||
'emotion_gstreamer.h',
|
||||
'emotion_gstreamer.c',
|
||||
'emotion_alloc.c',
|
||||
'emotion_convert.c',
|
||||
'emotion_sink.c'
|
||||
])
|
||||
|
||||
generic_deps = [dependency('gstreamer-0.10')]
|
||||
|
||||
shared_module(emotion_loader,
|
||||
generic_src,
|
||||
include_directories : config_dir,
|
||||
dependencies: [eina, ecore_x, evas, emotion, generic_deps],
|
||||
install: true,
|
||||
install_dir : mod_install_dir,
|
||||
c_args : package_c_args,
|
||||
)
|
|
@ -1,5 +1,4 @@
|
|||
emotion_loaders = [
|
||||
'gstreamer',
|
||||
'gstreamer1',
|
||||
'libvlc',
|
||||
'xine'
|
||||
|
|
|
@ -149,19 +149,46 @@ EFL_START_TEST(efl_ui_layout_test_layout_force)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
/* private */
|
||||
EAPI Eina_Bool elm_widget_theme_klass_set(Evas_Object *obj, const char *name);
|
||||
EAPI Eina_Bool elm_widget_theme_style_set(Evas_Object *obj, const char *name);
|
||||
|
||||
EFL_START_TEST(efl_ui_layout_test_callback)
|
||||
{
|
||||
Evas_Object *win;
|
||||
int called = 0;
|
||||
Eina_Bool klass, style;
|
||||
|
||||
win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
|
||||
efl_add(EFL_UI_LAYOUT_CLASS, win,
|
||||
efl_event_callback_add(efl_added, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, (void*)event_callback_single_call_int_data, &called),
|
||||
klass = elm_widget_theme_klass_set(efl_added, "button"),
|
||||
style = elm_widget_theme_style_set(efl_added, "anchor")
|
||||
);
|
||||
ck_assert_int_eq(klass, 1);
|
||||
ck_assert_int_eq(style, 1);
|
||||
ck_assert_int_eq(called, 1);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(efl_ui_layout_test_layout_theme)
|
||||
{
|
||||
Evas_Object *win;
|
||||
const char *klass, *group, *style;
|
||||
Eina_Error err;
|
||||
int called = 0;
|
||||
|
||||
win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
|
||||
Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win,
|
||||
efl_ui_layout_theme_set(efl_added, "win", "background", NULL)
|
||||
efl_event_callback_add(efl_added, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, (void*)event_callback_single_call_int_data, &called),
|
||||
err = efl_ui_layout_theme_set(efl_added, "button", NULL, "anchor")
|
||||
);
|
||||
ck_assert_int_eq(err, 0);
|
||||
efl_ui_layout_theme_get(layout, &klass, &group, &style);
|
||||
ck_assert_str_eq(klass, "win");
|
||||
ck_assert_str_eq(group, "background");
|
||||
ck_assert(!style);
|
||||
ck_assert_str_eq(klass, "button");
|
||||
ck_assert(!group);
|
||||
ck_assert_str_eq(style, "anchor");
|
||||
ck_assert_int_eq(called, 1);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
|
@ -189,5 +216,6 @@ void efl_ui_test_layout(TCase *tc)
|
|||
tcase_add_test(tc, efl_ui_layout_test_layout_force);
|
||||
tcase_add_test(tc, efl_ui_layout_test_layout_theme);
|
||||
tcase_add_test(tc, efl_ui_layout_test_api_ordering);
|
||||
tcase_add_test(tc, efl_ui_layout_test_callback);
|
||||
tcase_add_test(tc, efl_ui_layout_test_property_bind_provider);
|
||||
}
|
||||
|
|
|
@ -114,10 +114,27 @@ EFL_START_TEST(elm_layout_test_sizing)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(elm_layout_test_theme_changed_callback)
|
||||
{
|
||||
Evas_Object *win, *ly;
|
||||
int called = 0;
|
||||
|
||||
win = win_add(NULL, "layout", ELM_WIN_BASIC);
|
||||
evas_object_show(win);
|
||||
|
||||
ly = elm_button_add(win);
|
||||
evas_object_smart_callback_add(ly, "theme,changed", event_callback_single_call_int_data, &called);
|
||||
evas_object_show(ly);
|
||||
elm_object_style_set(ly, "anchor");
|
||||
ck_assert_int_eq(called, 1);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void elm_test_layout(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, elm_layout_test_legacy_type_check);
|
||||
tcase_add_test(tc, elm_atspi_role_get);
|
||||
tcase_add_test(tc, elm_layout_test_swallows);
|
||||
tcase_add_test(tc, elm_layout_test_sizing);
|
||||
tcase_add_test(tc, elm_layout_test_theme_changed_callback);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,16 @@ EFL_START_TEST(efl_canvas_animation_negative_double_checking)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(efl_canvas_animation_default_value)
|
||||
{
|
||||
Efl_Canvas_Animation *animation = efl_new(EFL_CANVAS_ANIMATION_CLASS);
|
||||
|
||||
fail_if(efl_animation_duration_get(animation) == 0.0);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void efl_test_canvas_animation(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, efl_canvas_animation_negative_double_checking);
|
||||
tcase_add_test(tc, efl_canvas_animation_default_value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue