emotion_test_main.c

This example covers the entire emotion API.

This example covers the entire emotion API. Use it as a reference.

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Getopt.h>
#include <Ecore_Evas.h>
#include <Edje.h>
#include "Emotion.h"
static const Ecore_Getopt options = {
"emotion_test",
"%prog [options] <filename>",
"1.0.0",
"(C) 2011-2014 Enlightenment",
"BSD\nThis is a 3 clause bsd bla bla",
"a simple test program for emotion.",
1,
{
ECORE_GETOPT_STORE_STR('e', "engine", "ecore-evas engine to use"),
ECORE_GETOPT_CALLBACK_NOARGS('E', "list-engines", "list ecore-evas engines",
ecore_getopt_callback_ecore_evas_list_engines, NULL),
ECORE_GETOPT_CALLBACK_ARGS('g', "geometry", "geometry to use in x:y:w:h form.", "X:Y:W:H",
ecore_getopt_callback_geometry_parse, NULL),
ECORE_GETOPT_STORE_STR('b', "backend", "backend to use"),
ECORE_GETOPT_STORE_INT('v', "vis", "visualization type"),
ECORE_GETOPT_STORE_TRUE('w', "webcams", "show all the available v4l streams"),
ECORE_GETOPT_STORE_TRUE('r', "reflex", "show video reflex effect"),
ECORE_GETOPT_STORE_TRUE('l', "loop", "restart the video when end reached"),
ECORE_GETOPT_STORE_TRUE('p', "position", "start the video from last know position"),
ECORE_GETOPT_VERSION('V', "version"),
ECORE_GETOPT_COPYRIGHT('R', "copyright"),
ECORE_GETOPT_LICENSE('L', "license"),
ECORE_GETOPT_HELP('h', "help"),
ECORE_GETOPT_SENTINEL
}
};
typedef struct _Frame_Data Frame_Data;
struct _Frame_Data
{
unsigned char moving : 1;
unsigned char resizing : 1;
int button;
Evas_Coord x, y;
};
static void main_resize(Ecore_Evas *ee);
static Eina_Bool main_signal_exit(void *data, int ev_type, void *ev);
static void main_delete_request(Ecore_Evas *ee);
static void bg_setup(void);
static void bg_resize(Evas_Coord w, Evas_Coord h);
static void bg_key_down(void *data, Evas * e, Evas_Object * obj, void *event_info);
static Evas_Object *o_bg = NULL;
static Ecore_Evas *ecore_evas = NULL;
static Evas *evas = NULL;
static int startw = 800;
static int starth = 600;
static Eina_List *video_objs = NULL;
static Emotion_Vis vis = EMOTION_VIS_NONE;
static unsigned char reflex = 0;
static unsigned char loop = 0;
static unsigned char last_position_load = 0;
static const char *theme_file = NULL;
static void
main_resize(Ecore_Evas *ee)
{
Evas_Coord w, h;
evas_output_viewport_get(ecore_evas_get(ee), NULL, NULL, &w, &h);
bg_resize(w, h);
}
static Eina_Bool
main_signal_exit(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
{
Evas_Object *o;
ecore_main_loop_quit();
EINA_LIST_FREE(video_objs, o)
{
emotion_object_last_position_save(o);
evas_object_del(o);
}
return EINA_TRUE;
}
static void
main_delete_request(Ecore_Evas *ee EINA_UNUSED)
{
ecore_main_loop_quit();
}
void
bg_setup(void)
{
Evas_Object *o;
o = edje_object_add(evas);
edje_object_file_set(o, theme_file, "background");
evas_object_move(o, 0, 0);
evas_object_resize(o, startw, starth);
evas_object_layer_set(o, -999);
evas_object_show(o);
evas_object_focus_set(o, 1);
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, bg_key_down, NULL);
o_bg = o;
}
void
bg_resize(Evas_Coord w, Evas_Coord h)
{
evas_object_resize(o_bg, w, h);
}
static void
broadcast_event(Emotion_Event ev)
{
Eina_List *l;
Evas_Object *obj;
EINA_LIST_FOREACH(video_objs, l, obj)
emotion_object_event_simple_send(obj, ev);
}
static void
bg_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
Evas_Event_Key_Down *ev = event_info;
Eina_List *l;
Evas_Object *o;
if (!strcmp(ev->keyname, "Escape"))
ecore_main_loop_quit();
else if (!strcmp(ev->keyname, "Up"))
broadcast_event(EMOTION_EVENT_UP);
else if (!strcmp(ev->keyname, "Down"))
broadcast_event(EMOTION_EVENT_DOWN);
else if (!strcmp(ev->keyname, "Left"))
broadcast_event(EMOTION_EVENT_LEFT);
else if (!strcmp(ev->keyname, "Right"))
broadcast_event(EMOTION_EVENT_RIGHT);
else if (!strcmp(ev->keyname, "Return"))
broadcast_event(EMOTION_EVENT_SELECT);
else if (!strcmp(ev->keyname, "m"))
broadcast_event(EMOTION_EVENT_MENU1);
else if (!strcmp(ev->keyname, "Prior"))
broadcast_event(EMOTION_EVENT_PREV);
else if (!strcmp(ev->keyname, "Next"))
broadcast_event(EMOTION_EVENT_NEXT);
else if (!strcmp(ev->keyname, "0"))
broadcast_event(EMOTION_EVENT_0);
else if (!strcmp(ev->keyname, "1"))
broadcast_event(EMOTION_EVENT_1);
else if (!strcmp(ev->keyname, "2"))
broadcast_event(EMOTION_EVENT_2);
else if (!strcmp(ev->keyname, "3"))
broadcast_event(EMOTION_EVENT_3);
else if (!strcmp(ev->keyname, "4"))
broadcast_event(EMOTION_EVENT_4);
else if (!strcmp(ev->keyname, "5"))
broadcast_event(EMOTION_EVENT_5);
else if (!strcmp(ev->keyname, "6"))
broadcast_event(EMOTION_EVENT_6);
else if (!strcmp(ev->keyname, "7"))
broadcast_event(EMOTION_EVENT_7);
else if (!strcmp(ev->keyname, "8"))
broadcast_event(EMOTION_EVENT_8);
else if (!strcmp(ev->keyname, "9"))
broadcast_event(EMOTION_EVENT_9);
else if (!strcmp(ev->keyname, "-"))
broadcast_event(EMOTION_EVENT_10);
else if (!strcmp(ev->keyname, "v"))
{
EINA_LIST_FOREACH(video_objs, l, o)
{
if (emotion_object_video_mute_get(o))
emotion_object_video_mute_set(o, 0);
else
emotion_object_video_mute_set(o, 1);
}
}
else if (!strcmp(ev->keyname, "a"))
{
EINA_LIST_FOREACH(video_objs, l, o)
{
if (emotion_object_audio_mute_get(o))
{
emotion_object_audio_mute_set(o, 0);
printf("unmute\n");
}
else
{
emotion_object_audio_mute_set(o, 1);
printf("mute\n");
}
}
}
else if (!strcmp(ev->keyname, "i"))
{
EINA_LIST_FOREACH(video_objs, l, o)
{
printf("audio channels: %i\n", emotion_object_audio_channel_count(o));
printf("video channels: %i\n", emotion_object_video_channel_count(o));
printf("spu channels: %i\n", emotion_object_spu_channel_count(o));
printf("seekable: %i\n", emotion_object_seekable_get(o));
}
}
else if (!strcmp(ev->keyname, "f"))
{
if (!ecore_evas_fullscreen_get(ecore_evas))
ecore_evas_fullscreen_set(ecore_evas, 1);
else
ecore_evas_fullscreen_set(ecore_evas, 0);
}
else if (!strcmp(ev->keyname, "d"))
{
if (!ecore_evas_avoid_damage_get(ecore_evas))
ecore_evas_avoid_damage_set(ecore_evas, 1);
else
ecore_evas_avoid_damage_set(ecore_evas, 0);
}
else if (!strcmp(ev->keyname, "s"))
{
if (!ecore_evas_shaped_get(ecore_evas))
{
ecore_evas_shaped_set(ecore_evas, 1);
evas_object_hide(o_bg);
}
else
{
ecore_evas_shaped_set(ecore_evas, 0);
evas_object_show(o_bg);
}
}
else if (!strcmp(ev->keyname, "b"))
{
if (!ecore_evas_borderless_get(ecore_evas))
ecore_evas_borderless_set(ecore_evas, 1);
else
ecore_evas_borderless_set(ecore_evas, 0);
}
else if (!strcmp(ev->keyname, "q"))
{
ecore_main_loop_quit();
while (video_objs)
{
printf("del obj!\n");
evas_object_del(video_objs->data);
video_objs = eina_list_remove_list(video_objs, video_objs);
printf("done\n");
}
}
else if (!strcmp(ev->keyname, "z"))
{
vis = (vis + 1) % EMOTION_VIS_LAST;
printf("new visualization: %d\n", vis);
EINA_LIST_FOREACH(video_objs, l, o)
{
Eina_Bool supported;
supported = emotion_object_vis_supported(o, vis);
if (supported)
emotion_object_vis_set(o, vis);
else
{
const char *file;
file = emotion_object_file_get(o);
printf("object %p (%s) does not support visualization %d\n",
o, file, vis);
}
}
}
else
{
printf("UNHANDLED: %s\n", ev->keyname);
}
}
static void
_oe_free_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
free(data);
}
static void
video_obj_time_changed(Evas_Object *obj, Evas_Object *edje)
{
double pos, len, scale;
char buf[256];
int ph, pm, ps, pf, lh, lm, ls;
pos = emotion_object_position_get(obj);
len = emotion_object_play_length_get(obj);
scale = (len > 0.0) ? pos / len : 0.0;
edje_object_part_drag_value_set(edje, "video_progress", scale, 0.0);
lh = len / 3600;
lm = len / 60 - (lh * 60);
ls = len - (lh * 3600) - (lm * 60);
ph = pos / 3600;
pm = pos / 60 - (ph * 60);
ps = pos - (ph * 3600) - (pm * 60);
pf = pos * 100 - (ps * 100) - (pm * 60 * 100) - (ph * 60 * 60 * 100);
snprintf(buf, sizeof(buf), "%i:%02i:%02i.%02i / %i:%02i:%02i",
ph, pm, ps, pf, lh, lm, ls);
edje_object_part_text_set(edje, "video_progress_txt", buf);
}
static void
video_obj_frame_decode_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
video_obj_time_changed(obj, data);
if (0)
{
double t;
static double pt = 0.0;
t = ecore_time_get();
printf("FPS: %3.3f\n", 1.0 / (t - pt));
pt = t;
}
}
static void
video_obj_frame_resize_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
Evas_Object *oe;
int iw, ih;
Evas_Coord w, h;
double ratio;
oe = data;
emotion_object_size_get(obj, &iw, &ih);
ratio = emotion_object_ratio_get(obj);
printf("HANDLE %ix%i @ %3.3f\n", iw, ih, ratio);
if (ratio > 0.0) iw = (ih * ratio) + 0.5;
evas_object_size_hint_min_set(obj, iw, ih);
edje_object_part_swallow(oe, "video_swallow", obj);
edje_object_size_min_calc(oe, &w, &h);
evas_object_resize(oe, w, h);
evas_object_size_hint_min_set(obj, 0, 0);
edje_object_part_swallow(oe, "video_swallow", obj);
}
static void
video_obj_length_change_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("len change!\n");
video_obj_time_changed(obj, data);
}
static void
video_obj_position_update_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("pos up!\n");
video_obj_time_changed(obj, data);
}
static void
video_obj_stopped_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("video stopped!!!\n");
if (loop)
{
emotion_object_position_set(obj, 0.0);
emotion_object_play_set(obj, 1);
}
}
static void
video_obj_channels_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("channels changed: [AUD %i][VID %i][SPU %i]\n",
emotion_object_audio_channel_count(obj),
emotion_object_video_channel_count(obj),
emotion_object_spu_channel_count(obj));
}
static void
video_obj_title_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("video title to: \"%s\"\n", emotion_object_title_get(obj));
}
static void
video_obj_progress_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("progress: \"%s\" %3.3f\n",
emotion_object_progress_info_get(obj),
emotion_object_progress_status_get(obj));
}
static void
video_obj_ref_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("video ref to: \"%s\" %i\n",
emotion_object_ref_file_get(obj),
emotion_object_ref_num_get(obj));
}
static void
video_obj_button_num_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("video spu buttons to: %i\n",
emotion_object_spu_button_count_get(obj));
}
static void
video_obj_button_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
printf("video selected spu button: %i\n",
emotion_object_spu_button_get(obj));
}
static void
video_obj_signal_play_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Evas_Object *ov = data;
emotion_object_play_set(ov, 1);
edje_object_signal_emit(o, "video_state", "play");
}
static void
video_obj_signal_pause_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Evas_Object *ov = data;
emotion_object_play_set(ov, 0);
edje_object_signal_emit(o, "video_state", "pause");
}
static void
video_obj_signal_stop_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Evas_Object *ov = data;
emotion_object_play_set(ov, 0);
emotion_object_position_set(ov, 0);
edje_object_signal_emit(o, "video_state", "stop");
}
static void
video_obj_signal_jump_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source)
{
Evas_Object *ov = data;
double len;
double x, y;
edje_object_part_drag_value_get(o, source, &x, &y);
len = emotion_object_play_length_get(ov);
emotion_object_position_set(ov, x * len);
}
static void
video_obj_signal_alpha_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source)
{
Evas_Object *ov = data;
double alpha;
double x, y;
char buf[256];
edje_object_part_drag_value_get(o, source, &x, &y);
alpha = 255 * y;
evas_object_color_set(ov, alpha, alpha, alpha, alpha);
snprintf(buf, sizeof(buf), "alpha %.0f", alpha);
edje_object_part_text_set(o, "video_alpha_txt", buf);
}
static void
video_obj_signal_vol_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source)
{
Evas_Object *ov = data;
double vol;
char buf[256];
edje_object_part_drag_value_get(o, source, NULL, &vol);
emotion_object_audio_volume_set(ov, vol);
snprintf(buf, sizeof(buf), "vol %.2f", vol);
edje_object_part_text_set(o, "video_volume_txt", buf);
}
static void
video_obj_signal_frame_move_start_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Frame_Data *fd;
Evas_Coord x, y;
fd = evas_object_data_get(o, "frame_data");
if (!fd) return;
fd->moving = 1;
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
fd->x = x;
fd->y = y;
evas_object_raise(o);
}
static void
video_obj_signal_frame_move_stop_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Frame_Data *fd;
fd = evas_object_data_get(o, "frame_data");
if (!fd) return;
fd->moving = 0;
}
static void
video_obj_signal_frame_resize_start_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Frame_Data *fd;
Evas_Coord x, y;
fd = evas_object_data_get(o, "frame_data");
if (!fd) return;
fd->resizing = 1;
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
fd->x = x;
fd->y = y;
evas_object_raise(o);
}
static void
video_obj_signal_frame_resize_stop_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Frame_Data *fd;
fd = evas_object_data_get(o, "frame_data");
if (!fd) return;
fd->resizing = 0;
}
static void
video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Frame_Data *fd;
fd = evas_object_data_get(o, "frame_data");
if (!fd) return;
if (fd->moving)
{
Evas_Coord x, y, ox, oy;
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
evas_object_geometry_get(o, &ox, &oy, NULL, NULL);
evas_object_move(o, ox + (x - fd->x), oy + (y - fd->y));
fd->x = x;
fd->y = y;
}
else if (fd->resizing)
{
Evas_Coord x, y, ow, oh;
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
evas_object_resize(o, ow + (x - fd->x), oh + (y - fd->y));
fd->x = x;
fd->y = y;
}
}
static void
init_video_object(const char *module_filename, const char *filename)
{
Evas_Object *o, *oe;
Evas_Coord w, h, offset;
Frame_Data *fd;
/* basic video object setup */
o = emotion_object_add(evas);
if ((module_filename) && (!emotion_object_init(o, module_filename)))
return;
emotion_object_vis_set(o, vis);
if (!emotion_object_file_set(o, filename))
return;
if (last_position_load)
emotion_object_last_position_load(o);
emotion_object_play_set(o, 1);
emotion_object_audio_volume_set(o, 0.5);
evas_object_move(o, 0, 0);
evas_object_resize(o, 320, 240);
emotion_object_smooth_scale_set(o, 1);
evas_object_show(o);
video_objs = eina_list_append(video_objs, o);
/* end basic video setup. all the rest here is just to be fancy */
fd = calloc(1, sizeof(Frame_Data));
if (!fd) exit(1);
oe = edje_object_add(evas);
evas_object_event_callback_add(oe, EVAS_CALLBACK_FREE, _oe_free_cb, fd);
evas_object_data_set(oe, "frame_data", fd);
if (reflex)
edje_object_file_set(oe, theme_file, "video_controller/reflex");
else
edje_object_file_set(oe, theme_file, "video_controller");
edje_object_part_swallow(oe, "video_swallow", o);
offset = 20 * (eina_list_count(video_objs) - 1);
evas_object_move(oe, offset, offset);
edje_object_size_min_calc(oe, &w, &h);
evas_object_resize(oe, w, h);
evas_object_smart_callback_add(o, "frame_decode", video_obj_frame_decode_cb, oe);
evas_object_smart_callback_add(o, "frame_resize", video_obj_frame_resize_cb, oe);
evas_object_smart_callback_add(o, "length_change", video_obj_length_change_cb, oe);
evas_object_smart_callback_add(o, "position_update", video_obj_position_update_cb, oe);
evas_object_smart_callback_add(o, "decode_stop", video_obj_stopped_cb, oe);
evas_object_smart_callback_add(o, "channels_change", video_obj_channels_cb, oe);
evas_object_smart_callback_add(o, "title_change", video_obj_title_cb, oe);
evas_object_smart_callback_add(o, "progress_change", video_obj_progress_cb, oe);
evas_object_smart_callback_add(o, "ref_change", video_obj_ref_cb, oe);
evas_object_smart_callback_add(o, "button_num_change", video_obj_button_num_cb, oe);
evas_object_smart_callback_add(o, "button_change", video_obj_button_cb, oe);
edje_object_signal_callback_add(oe, "video_control", "play", video_obj_signal_play_cb, o);
edje_object_signal_callback_add(oe, "video_control", "pause", video_obj_signal_pause_cb, o);
edje_object_signal_callback_add(oe, "video_control", "stop", video_obj_signal_stop_cb, o);
edje_object_signal_callback_add(oe, "drag", "video_progress", video_obj_signal_jump_cb, o);
edje_object_signal_callback_add(oe, "drag", "video_alpha", video_obj_signal_alpha_cb, o);
edje_object_signal_callback_add(oe, "drag", "video_volume", video_obj_signal_vol_cb, o);
edje_object_signal_callback_add(oe, "frame_move", "start", video_obj_signal_frame_move_start_cb, oe);
edje_object_signal_callback_add(oe, "frame_move", "stop", video_obj_signal_frame_move_stop_cb, oe);
edje_object_signal_callback_add(oe, "frame_resize", "start", video_obj_signal_frame_resize_start_cb, oe);
edje_object_signal_callback_add(oe, "frame_resize", "stop", video_obj_signal_frame_resize_stop_cb, oe);
edje_object_signal_callback_add(oe, "mouse,move", "*", video_obj_signal_frame_move_cb, oe);
edje_object_part_drag_value_set(oe, "video_alpha", 0.0, 1.0);
edje_object_part_text_set(oe, "video_alpha_txt", "alpha 255");
edje_object_part_drag_value_set(oe, "video_volume", 0.0, 0.5);
edje_object_part_text_set(oe, "video_volume_txt", "vol 0.50");
edje_object_signal_emit(oe, "video_state", "play");
evas_object_show(oe);
}
int
main(int argc, char **argv)
{
int args;
Eina_Rectangle geometry = {0, 0, startw, starth};
char *engine = NULL;
char *backend = NULL;
Eina_Bool webcams = EINA_FALSE;
int visual = EMOTION_VIS_NONE;
unsigned char help = 0;
unsigned char engines_listed = 0;
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_STR(engine),
ECORE_GETOPT_VALUE_BOOL(engines_listed),
ECORE_GETOPT_VALUE_PTR_CAST(geometry),
ECORE_GETOPT_VALUE_STR(backend),
ECORE_GETOPT_VALUE_INT(visual),
ECORE_GETOPT_VALUE_BOOL(webcams),
ECORE_GETOPT_VALUE_BOOL(reflex),
ECORE_GETOPT_VALUE_BOOL(loop),
ECORE_GETOPT_VALUE_BOOL(last_position_load),
ECORE_GETOPT_VALUE_NONE,
ECORE_GETOPT_VALUE_NONE,
ECORE_GETOPT_VALUE_NONE,
ECORE_GETOPT_VALUE_BOOL(help),
ECORE_GETOPT_VALUE_NONE
};
// init ecore_evas
if (!ecore_evas_init())
return -1;
// init edje
if (!edje_init())
goto shutdown_ecore_evas;
// search the theme file
struct stat st;
if (stat(PACKAGE_BUILD_DIR"/src/tests/emotion/data/theme.edj", &st) == 0)
theme_file = PACKAGE_BUILD_DIR"/src/tests/emotion/data/theme.edj";
else if (stat(PACKAGE_DATA_DIR"/data/theme.edj", &st) == 0)
theme_file = PACKAGE_DATA_DIR"/data/theme.edj";
else
{
printf("Cannot find the theme file\n");
goto shutdown_edje;
}
printf("theme file: %s\n", theme_file);
// parse command line arguments
ecore_app_args_set(argc, (const char **)argv);
args = ecore_getopt_parse(&options, values, argc, argv);
if (args < 0) goto shutdown_edje;
else if (help) goto shutdown_edje;
else if (engines_listed) goto shutdown_edje;
else if ((args == argc) && (!webcams))
{
printf("must provide at least one file to play!\n");
goto shutdown_edje;
}
if (geometry.w == 0) geometry.w = 320;
if (geometry.h == 0) geometry.h = 240;
vis = visual;
printf("evas engine: %s\n", engine ? engine : "<auto>");
printf("emotion backend: %s\n", backend ? backend : "<auto>");
printf("vis: %d\n", vis);
printf("geometry: %d %d %dx%d\n", geometry.x, geometry.y, geometry.w, geometry.h);
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, NULL);
// create the ecore_evas window
ecore_evas = ecore_evas_new(engine, geometry.x, geometry.y,
geometry.w, geometry.h, NULL);
if (!ecore_evas) goto shutdown_edje;
ecore_evas_callback_delete_request_set(ecore_evas, main_delete_request);
ecore_evas_callback_resize_set(ecore_evas, main_resize);
ecore_evas_title_set(ecore_evas, "Evas Media Test Program");
ecore_evas_name_class_set(ecore_evas, "evas_media_test", "main");
ecore_evas_show(ecore_evas);
evas = ecore_evas_get(ecore_evas);
evas_image_cache_set(evas, 8 * 1024 * 1024);
evas_font_cache_set(evas, 1 * 1024 * 1024);
// init emotion
emotion_init();
// create the checkboard background edje object
bg_setup();
// open files and webcams
for (; args < argc; args++)
init_video_object(backend, argv[args]);
if (webcams)
{
const Eina_List *wl, *l;
Emotion_Webcam *webcam;
wl = emotion_webcams_get();
EINA_LIST_FOREACH(wl, l, webcam)
{
printf("Playing stream: '%s' url: '%s'\n",
emotion_webcam_name_get(webcam),
emotion_webcam_device_get(webcam));
init_video_object(backend, emotion_webcam_device_get(webcam));
}
}
// start the main loop
ecore_main_loop_begin();
// shutdown
main_signal_exit(NULL, 0, NULL);
emotion_shutdown();
ecore_evas_free(ecore_evas);
ecore_evas_shutdown();
edje_shutdown();
return 0;
shutdown_edje:
edje_shutdown();
shutdown_ecore_evas:
ecore_evas_shutdown();
return -1;
}
Ecore_Evas.h
Evas wrapper functions.
Edje.h
Edje Graphical Design Library.
Emotion.h
Emotion Media Library.
Emotion_Vis
enum _Emotion_Vis Emotion_Vis
Type of visualization.
Definition Emotion.h:239
EMOTION_VIS_NONE
@ EMOTION_VIS_NONE
no visualization set
Definition Emotion.h:183
Evas_Coord
int Evas_Coord
Type used for coordinates (in pixels, int).
Definition Evas_Common.h:116
EVAS_CALLBACK_KEY_DOWN
@ EVAS_CALLBACK_KEY_DOWN
Key Press Event.
Definition Evas_Common.h:430
EVAS_CALLBACK_FREE
@ EVAS_CALLBACK_FREE
Object Being Freed (Called after Del).
Definition Evas_Common.h:429
ecore_app_args_set
void ecore_app_args_set(int argc, const char **argv)
Sets up the programs command-line arguments.
Definition ecore_app.c:15
ecore_evas_shaped_get
EAPI Eina_Bool ecore_evas_shaped_get(const Ecore_Evas *ee)
Queries whether an Ecore_Evas is shaped or not.
Definition ecore_evas.c:1457
ecore_evas_name_class_set
EAPI void ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c)
Sets the name and class of an Ecore_Evas' window.
Definition ecore_evas.c:1556
ecore_evas_avoid_damage_set
EAPI void ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on)
Sets whether or not an Ecore_Evas' window should avoid damage.
Definition ecore_evas.c:2482
ecore_evas_init
EAPI int ecore_evas_init(void)
Inits the Ecore_Evas system.
Definition ecore_evas.c:608
ecore_evas_title_set
EAPI void ecore_evas_title_set(Ecore_Evas *ee, const char *t)
Sets the title of an Ecore_Evas' window.
Definition ecore_evas.c:1541
ecore_evas_callback_delete_request_set
EAPI void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
Sets a callback for Ecore_Evas delete request events.
Definition ecore_evas.c:1190
ecore_evas_show
EAPI void ecore_evas_show(Ecore_Evas *ee)
Shows an Ecore_Evas' window.
Definition ecore_evas.c:1494
ecore_evas_avoid_damage_get
EAPI Ecore_Evas_Avoid_Damage_Type ecore_evas_avoid_damage_get(const Ecore_Evas *ee)
Queries whether an Ecore_Evas' window avoids damage or not.
Definition ecore_evas.c:2490
ecore_evas_fullscreen_set
EAPI void ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
Sets whether or not an Ecore_Evas' window is fullscreen.
Definition ecore_evas.c:2467
ecore_evas_borderless_get
EAPI Eina_Bool ecore_evas_borderless_get(const Ecore_Evas *ee)
Queries whether an Ecore_Evas' window is borderless or not.
Definition ecore_evas.c:2062
ecore_evas_get
EAPI Evas * ecore_evas_get(const Ecore_Evas *ee)
Gets an Ecore_Evas's Evas.
Definition ecore_evas.c:1314
ecore_evas_shaped_set
EAPI void ecore_evas_shaped_set(Ecore_Evas *ee, Eina_Bool shaped)
Sets whether an Ecore_Evas is shaped or not.
Definition ecore_evas.c:1449
ecore_getopt_callback_ecore_evas_list_engines
EAPI unsigned char ecore_getopt_callback_ecore_evas_list_engines(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage)
Helper ecore_getopt callback to list available Ecore_Evas engines.
Definition ecore_evas_util.c:423
ecore_evas_new
EAPI Ecore_Evas * ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options)
Creates a new Ecore_Evas based on engine name and common parameters.
Definition ecore_evas.c:1053
ecore_evas_callback_resize_set
EAPI void ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
Sets a callback for Ecore_Evas resize events.
Definition ecore_evas.c:1154
ecore_evas_shutdown
EAPI int ecore_evas_shutdown(void)
Shuts down the Ecore_Evas system.
Definition ecore_evas.c:672
ecore_evas_fullscreen_get
EAPI Eina_Bool ecore_evas_fullscreen_get(const Ecore_Evas *ee)
Queries whether an Ecore_Evas' window is fullscreen or not.
Definition ecore_evas.c:2475
ecore_evas_borderless_set
EAPI void ecore_evas_borderless_set(Ecore_Evas *ee, Eina_Bool on)
Sets whether an Ecore_Evas' window is borderless or not.
Definition ecore_evas.c:2053
ecore_evas_free
EAPI void ecore_evas_free(Ecore_Evas *ee)
Frees an Ecore_Evas.
Definition ecore_evas.c:1097
ECORE_EVENT_SIGNAL_EXIT
#define ECORE_EVENT_SIGNAL_EXIT
Exit signal event.
Definition Ecore_Common.h:565
ecore_event_handler_add
Ecore_Event_Handler * ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data)
Adds an event handler.
Definition ecore_events.c:13
ECORE_GETOPT_VALUE_NONE
#define ECORE_GETOPT_VALUE_NONE
Definition for options that store a NULL value.
Definition Ecore_Getopt.h:1018
ECORE_GETOPT_VALUE_INT
#define ECORE_GETOPT_VALUE_INT(val)
Definition for options that store a single value in a variable of type int.
Definition Ecore_Getopt.h:955
ECORE_GETOPT_VALUE_STR
#define ECORE_GETOPT_VALUE_STR(val)
Definition for options that store a single value in a variable of type string.
Definition Ecore_Getopt.h:934
ECORE_GETOPT_VALUE_PTR_CAST
#define ECORE_GETOPT_VALUE_PTR_CAST(val)
Definition for options that store a single value in a variable of type pointer casted.
Definition Ecore_Getopt.h:1004
ecore_getopt_callback_geometry_parse
EAPI Eina_Bool ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage)
Helper ecore_getopt callback to parse geometry (x:y:w:h).
Definition ecore_getopt.c:2173
ECORE_GETOPT_LICENSE
#define ECORE_GETOPT_LICENSE(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a license action.
Definition Ecore_Getopt.h:892
ECORE_GETOPT_CALLBACK_ARGS
#define ECORE_GETOPT_CALLBACK_ARGS(shortname, longname, help, metavar, callback_func, callback_data)
Definition for filling Ecore_Getopt_Desc table with an callback action.
Definition Ecore_Getopt.h:847
ECORE_GETOPT_VALUE_BOOL
#define ECORE_GETOPT_VALUE_BOOL(val)
Definition for options that store a single value in a variable of type boolean.
Definition Ecore_Getopt.h:941
ECORE_GETOPT_VERSION
#define ECORE_GETOPT_VERSION(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a version action.
Definition Ecore_Getopt.h:870
ecore_getopt_parse
EAPI int ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv)
Parses command line parameters.
Definition ecore_getopt.c:2032
ECORE_GETOPT_COPYRIGHT
#define ECORE_GETOPT_COPYRIGHT(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a copyright action.
Definition Ecore_Getopt.h:881
ECORE_GETOPT_STORE_TRUE
#define ECORE_GETOPT_STORE_TRUE(shortname, longname, help)
Definition for filling Ecore_Getopt_Desc table with a true boolean value.
Definition Ecore_Getopt.h:727
ECORE_GETOPT_HELP
#define ECORE_GETOPT_HELP(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a help action.
Definition Ecore_Getopt.h:859
ECORE_GETOPT_CALLBACK_NOARGS
#define ECORE_GETOPT_CALLBACK_NOARGS(shortname, longname, help, callback_func, callback_data)
Definition for filling Ecore_Getopt_Desc table with an callback action and no arguments.
Definition Ecore_Getopt.h:831
ECORE_GETOPT_STORE_INT
#define ECORE_GETOPT_STORE_INT(shortname, longname, help)
Definition for macro that fill Ecore_Getopt_Desc table with an option of type int.
Definition Ecore_Getopt.h:279
ECORE_GETOPT_STORE_STR
#define ECORE_GETOPT_STORE_STR(shortname, longname, help)
Definition for macro that fill Ecore_Getopt_Desc table with an option of type string.
Definition Ecore_Getopt.h:249
ECORE_GETOPT_SENTINEL
#define ECORE_GETOPT_SENTINEL
Definition for filling Ecore_Getopt_Desc table with a sentinel to indicate the end of descriptions.
Definition Ecore_Getopt.h:927
ecore_main_loop_quit
void ecore_main_loop_quit(void)
Quits the main loop once all the events currently on the queue have been processed.
Definition ecore_main.c:1321
ecore_main_loop_begin
void ecore_main_loop_begin(void)
Runs the application main loop.
Definition ecore_main.c:1311
ecore_time_get
double ecore_time_get(void)
Retrieves the current system time as a floating point value in seconds.
Definition ecore_time.c:33
edje_shutdown
int edje_shutdown(void)
Shuts down the Edje library.
Definition edje_main.c:262
edje_init
int edje_init(void)
Initializes the Edje library.
Definition edje_main.c:35
edje_object_signal_emit
void edje_object_signal_emit(Evas_Object *obj, const char *emission, const char *source)
Sends/emits an Edje signal to a given Edje object.
Definition edje_legacy.c:147
edje_object_add
Evas_Object * edje_object_add(Evas *evas)
Instantiates a new Edje object.
Definition edje_smart.c:22
edje_object_signal_callback_add
void edje_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
Adds a callback for an arriving Edje signal, emitted by a given Edje object.
Definition edje_legacy.c:85
edje_object_size_min_calc
void edje_object_size_min_calc(Edje_Object *obj, int *minw, int *minh)
Calculates the minimum required size for a given Edje object.
Definition edje_legacy.c:1059
edje_object_file_set
Eina_Bool edje_object_file_set(Evas_Object *obj, const char *file, const char *group)
Sets the EDJ file (and group within it) to load an Edje object's contents from.
Definition edje_smart.c:467
edje_object_part_swallow
Eina_Bool edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_swallow)
"Swallows" an object into one of the Edje object SWALLOW parts.
Definition edje_util.c:6676
edje_object_part_text_set
Eina_Bool edje_object_part_text_set(const Evas_Object *obj, const char *part, const char *text)
Sets a given text to an Edje object TEXT or TEXTBLOCK parts.
Definition edje_util.c:6723
edje_object_part_drag_value_set
Eina_Bool edje_object_part_drag_value_set(Evas_Object *obj, const char *part, double dx, double dy)
Sets the dragable object location.
Definition edje_legacy.c:228
edje_object_part_drag_value_get
Eina_Bool edje_object_part_drag_value_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
Gets the dragable object location.
Definition edje_legacy.c:234
eina_list_append
EINA_API Eina_List * eina_list_append(Eina_List *list, const void *data)
Appends the given data to the given linked list.
Definition eina_list.c:584
Eina_List
struct _Eina_List Eina_List
Type for a generic double linked list.
Definition eina_list.h:304
EINA_LIST_FOREACH
#define EINA_LIST_FOREACH(list, l, _data)
Definition for the macro to iterate over a list.
Definition eina_list.h:1415
EINA_LIST_FREE
#define EINA_LIST_FREE(list, data)
Definition for the macro to remove each list node while having access to each node's data.
Definition eina_list.h:1629
eina_list_remove_list
EINA_API Eina_List * eina_list_remove_list(Eina_List *list, Eina_List *remove_list)
Removes the specified list node.
Definition eina_list.c:786
Eina_Rectangle
struct _Eina_Rectangle Eina_Rectangle
Simple rectangle structure.
EINA_TRUE
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition eina_types.h:539
EINA_FALSE
#define EINA_FALSE
boolean value FALSE (numerical value 0)
Definition eina_types.h:533
Eina_Bool
unsigned char Eina_Bool
Type to mimic a boolean.
Definition eina_types.h:527
EINA_UNUSED
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
Definition eina_types.h:339
emotion_init
EMOTION_API Eina_Bool emotion_init(void)
Initialise Emotion library.
Definition emotion_main.c:142
Emotion_Webcam
struct _Emotion_Webcam Emotion_Webcam
Webcam description.
Definition Emotion.h:1278
emotion_shutdown
EMOTION_API Eina_Bool emotion_shutdown(void)
Shutdown Emotion library.
Definition emotion_main.c:216
emotion_object_event_simple_send
EMOTION_API void emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
Send an Emotion Event to an Evas object.
Definition emotion_smart.c:873
emotion_object_audio_mute_set
EMOTION_API void emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
Set the mute audio option for this object.
Definition emotion_smart.c:910
emotion_object_audio_mute_get
EMOTION_API Eina_Bool emotion_object_audio_mute_get(const Evas_Object *obj)
Get the mute audio option of this object.
Definition emotion_smart.c:924
emotion_object_audio_volume_set
EMOTION_API void emotion_object_audio_volume_set(Evas_Object *obj, double vol)
Set the audio volume.
Definition emotion_smart.c:883
emotion_object_last_position_load
EMOTION_API void emotion_object_last_position_load(Evas_Object *obj)
Load the last known position if available.
Definition emotion_smart.c:1424
emotion_object_title_get
EMOTION_API const char * emotion_object_title_get(const Evas_Object *obj)
Get the dvd title from this emotion object.
Definition emotion_smart.c:1196
emotion_object_last_position_save
EMOTION_API void emotion_object_last_position_save(Evas_Object *obj)
Save the lastest position if possible.
Definition emotion_smart.c:1495
emotion_object_add
EMOTION_API Evas_Object * emotion_object_add(Evas *evas)
Add an emotion object to the canvas.
Definition emotion_smart.c:237
emotion_object_file_get
EMOTION_API const char * emotion_object_file_get(const Evas_Object *obj)
Get the filename of the file associated with the emotion object.
Definition emotion_smart.c:448
emotion_object_file_set
EMOTION_API Eina_Bool emotion_object_file_set(Evas_Object *obj, const char *filename)
Set the file to be played in the Emotion object.
Definition emotion_smart.c:355
emotion_object_progress_status_get
EMOTION_API double emotion_object_progress_status_get(const Evas_Object *obj)
Get how much of the file has been played.
Definition emotion_smart.c:1214
emotion_object_progress_info_get
EMOTION_API const char * emotion_object_progress_info_get(const Evas_Object *obj)
Get how much of the file has been played.
Definition emotion_smart.c:1205
emotion_object_play_set
EMOTION_API void emotion_object_play_set(Evas_Object *obj, Eina_Bool play)
Set play/pause state of the media file.
Definition emotion_smart.c:653
emotion_object_position_set
EMOTION_API void emotion_object_position_set(Evas_Object *obj, double sec)
Set the position in the media file.
Definition emotion_smart.c:735
emotion_object_play_length_get
EMOTION_API double emotion_object_play_length_get(const Evas_Object *obj)
Get the length of play for the media file.
Definition emotion_smart.c:810
emotion_object_position_get
EMOTION_API double emotion_object_position_get(const Evas_Object *obj)
Get the position in the media file.
Definition emotion_smart.c:760
emotion_object_seekable_get
EMOTION_API Eina_Bool emotion_object_seekable_get(const Evas_Object *obj)
Get whether the media file is seekable.
Definition emotion_smart.c:784
emotion_object_video_mute_set
EMOTION_API void emotion_object_video_mute_set(Evas_Object *obj, Eina_Bool mute)
Set the mute video option for this object.
Definition emotion_smart.c:978
emotion_object_smooth_scale_set
EMOTION_API void emotion_object_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth)
Sets whether to use of high-quality image scaling algorithm of the given video object.
Definition emotion_smart.c:833
emotion_object_video_channel_count
EMOTION_API int emotion_object_video_channel_count(const Evas_Object *obj)
Get the number of available video channel.
Definition emotion_smart.c:1021
emotion_object_video_mute_get
EMOTION_API Eina_Bool emotion_object_video_mute_get(const Evas_Object *obj)
Get the mute video option of this object.
Definition emotion_smart.c:989
emotion_object_size_get
EMOTION_API void emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih)
Retrieve the video size of the loaded file.
Definition emotion_smart.c:816
emotion_object_ratio_get
EMOTION_API double emotion_object_ratio_get(const Evas_Object *obj)
Retrieve the video aspect ratio of the media file loaded.
Definition emotion_smart.c:857
emotion_object_vis_supported
EMOTION_API Eina_Bool emotion_object_vis_supported(const Evas_Object *obj, Emotion_Vis visualization)
Query whether a type of visualization is supported by this object.
Definition emotion_smart.c:1364
emotion_object_vis_set
EMOTION_API void emotion_object_vis_set(Evas_Object *obj, Emotion_Vis visualization)
Set the visualization to be used with this object.
Definition emotion_smart.c:1343
emotion_webcam_device_get
EMOTION_API const char * emotion_webcam_device_get(const Emotion_Webcam *ew)
Get the uri of a Webcam that will be understood by emotion.
Definition emotion_webcam.c:314
emotion_webcam_name_get
EMOTION_API const char * emotion_webcam_name_get(const Emotion_Webcam *ew)
Get the human understandable name of a Webcam.
Definition emotion_webcam.c:307
emotion_webcams_get
EMOTION_API const Eina_List * emotion_webcams_get(void)
Get a list of active and available webcam.
Definition emotion_webcam.c:299
Evas_Event_Key_Down
struct _Evas_Event_Key_Down Evas_Event_Key_Down
Event structure for EVAS_CALLBACK_KEY_DOWN event callbacks.
Definition Evas_Legacy.h:154
evas_output_viewport_get
EVAS_API void evas_output_viewport_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
Get the render engine's output viewport coordinates in canvas units.
Definition evas_main.c:1441
Evas
Eo Evas
An opaque handle to an Evas canvas.
Definition Evas_Common.h:163
evas_pointer_canvas_xy_get
EVAS_API void evas_pointer_canvas_xy_get(const Evas_Canvas *obj, int *x, int *y)
This function returns the current known default pointer coordinates.
Definition evas_canvas_eo.legacy.c:75
evas_font_cache_set
EVAS_API void evas_font_cache_set(Evas_Canvas *obj, int size)
Changes the size of font cache of the given evas.
Definition evas_canvas_eo.legacy.c:27
evas_image_cache_set
EVAS_API void evas_image_cache_set(Evas_Canvas *obj, int size)
Set the image cache.
Definition evas_canvas_eo.legacy.c:3
evas_object_show
EVAS_API void evas_object_show(Evas_Object *eo_obj)
Makes the given Evas object visible.
Definition evas_object_main.c:1814
evas_object_geometry_get
EVAS_API void evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
Retrieves the position and (rectangular) size of the given Evas object.
Definition evas_object_main.c:1335
evas_object_del
EVAS_API void evas_object_del(Evas_Object *obj)
Marks the given Evas object for deletion (when Evas will free its memory).
Definition evas_object_main.c:928
evas_object_color_set
EVAS_API void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
Sets the general/main color of the given Evas object to the given one.
Definition evas_object_main.c:2024
evas_object_hide
EVAS_API void evas_object_hide(Evas_Object *eo_obj)
Makes the given Evas object invisible.
Definition evas_object_main.c:1823
evas_object_event_callback_add
EVAS_API void evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
Add (register) a callback function to a given Evas object event.
Definition evas_callbacks.c:478
evas_object_data_set
EVAS_API void evas_object_data_set(Evas_Object *eo_obj, const char *key, const void *data)
Set an attached data pointer to an object with a given string key.
Definition evas_data.c:5
evas_object_move
EVAS_API void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
Move the given Evas object to the given location inside its canvas' viewport.
Definition evas_object_main.c:1171
evas_object_raise
EVAS_API void evas_object_raise(Evas_Object *obj)
Raise obj to the top of its layer.
Definition evas_stack.x:38
evas_object_layer_set
EVAS_API void evas_object_layer_set(Evas_Object *obj, short l)
Sets the layer of its canvas that the given object will be part of.
Definition evas_layer.c:212
evas_object_evas_get
EVAS_API Evas * evas_object_evas_get(const Eo *eo_obj)
Get the Evas to which this object belongs to.
Definition evas_object_main.c:2662
Evas_Object
Efl_Canvas_Object Evas_Object
An Evas Object handle.
Definition Evas_Common.h:185
evas_object_focus_set
EVAS_API void evas_object_focus_set(Efl_Canvas_Object *obj, Eina_Bool focus)
Indicates that this object is the keyboard event receiver on its canvas.
Definition efl_canvas_object_eo.legacy.c:39
evas_object_resize
EVAS_API void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
Changes the size of the given Evas object.
Definition evas_object_main.c:1236
evas_object_size_hint_min_set
EVAS_API void evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
Sets the hints for an object's minimum size.
Definition evas_object_main.c:2611
evas_object_smart_callback_add
EVAS_API void evas_object_smart_callback_add(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func, const void *data)
Add (register) a callback function to the smart event specified by event on the smart object obj.
Definition evas_object_smart.c:1040
_Eina_List::data
void * data
Pointer to list element payload.
Definition eina_list.h:319
_Eina_Rectangle::h
int h
height of rectangle
Definition eina_rectangle.h:113
_Eina_Rectangle::x
int x
top-left x coordinate of rectangle
Definition eina_rectangle.h:110
_Eina_Rectangle::y
int y
top-left y coordinate of rectangle
Definition eina_rectangle.h:111
_Eina_Rectangle::w
int w
width of rectangle
Definition eina_rectangle.h:112
_Evas_Event_Key_Down::keyname
char * keyname
the name string of the key pressed
Definition Evas_Legacy.h:315