Initial commit.
Recordings, launcher and original images (1.7).
|
@ -0,0 +1,2 @@
|
|||
/tests/elm_edje_player
|
||||
*.swp
|
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 603 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,17 @@
|
|||
animations2 tests/elm_edje_player tests/animations2.edj
|
||||
basic2 tests/elm_edje_player tests/basic2.edj
|
||||
basic tests/elm_edje_player tests/basic.edj
|
||||
box tests/elm_edje_player tests/box.edj
|
||||
color-class tests/elm_edje_player tests/color-class.edj
|
||||
drag tests/elm_edje_player tests/drag.edj
|
||||
edje_example tests/elm_edje_player tests/edje_example.edj
|
||||
edje-nested tests/elm_edje_player tests/edje-nested.edj
|
||||
embryo_custom_state tests/elm_edje_player tests/embryo_custom_state.edj
|
||||
embryo_pong tests/elm_edje_player tests/embryo_pong.edj
|
||||
embryo_run_program tests/elm_edje_player tests/embryo_run_program.edj
|
||||
embryo_set_state tests/elm_edje_player tests/embryo_set_state.edj
|
||||
embryo_set_text tests/elm_edje_player tests/embryo_set_text.edj
|
||||
perspective tests/elm_edje_player tests/perspective.edj
|
||||
signalsBubble tests/elm_edje_player tests/signalsBubble.edj
|
||||
signals-messages tests/elm_edje_player tests/signals-messages.edj
|
||||
toggle_using_filter tests/elm_edje_player tests/toggle_using_filter.edj
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
gcc elm_edje_player.c ${CFLAGS} `pkg-config --cflags --libs elementary` -o elm_edje_player
|
|
@ -0,0 +1,88 @@
|
|||
#include <Elementary.h>
|
||||
#include <Evas.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void
|
||||
_my_win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_exit();
|
||||
}
|
||||
|
||||
static void
|
||||
_layout_file_set(Evas_Object *obj, const char *filename)
|
||||
{
|
||||
char *group = NULL;
|
||||
if (edje_file_group_exists(filename, "main"))
|
||||
{
|
||||
group = strdup("main");
|
||||
}
|
||||
else
|
||||
{
|
||||
Eina_List *groups = edje_file_collection_list(filename);
|
||||
if (!groups)
|
||||
{
|
||||
fprintf(stderr, "ERROR: file '%s' has no groups!\n",
|
||||
filename);
|
||||
return;
|
||||
}
|
||||
group = strdup(groups->data);
|
||||
|
||||
edje_file_collection_list_free(groups);
|
||||
}
|
||||
|
||||
elm_layout_file_set(obj, filename, group);
|
||||
free(group);
|
||||
}
|
||||
|
||||
int
|
||||
elm_main(int argc, char *argv[])
|
||||
{
|
||||
Evas_Object *win, *obj, *bg;
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
fprintf(stderr, "Usage: ./elm_edje_player <filename>\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
win = elm_win_add(NULL, "elm_edje_player", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "elm_edje_player");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
evas_object_smart_callback_add(win, "delete,request", _my_win_del, NULL);
|
||||
|
||||
bg = elm_bg_add(win);
|
||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_show(bg);
|
||||
|
||||
obj = elm_layout_add(win);
|
||||
elm_win_resize_object_add(win, obj);
|
||||
evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(obj);
|
||||
evas_object_show(win);
|
||||
|
||||
_layout_file_set(obj, argv[1]);
|
||||
|
||||
{
|
||||
Evas_Object *edje = elm_layout_edje_get(obj);
|
||||
Evas_Coord minw, minh;
|
||||
edje_object_size_min_get(edje, &minw, &minh);
|
||||
if ((minw <= 0) && (minh <= 0))
|
||||
edje_object_size_min_calc(edje, &minw, &minh);
|
||||
|
||||
if (minw < 320) minw = 320;
|
||||
if (minh < 240) minh = 240;
|
||||
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
evas_object_resize(obj, minw, minh);
|
||||
evas_object_resize(win, minw, minh);
|
||||
}
|
||||
|
||||
elm_run();
|
||||
|
||||
elm_shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ELM_MAIN()
|