The filelist fades in and out now very nicely
This commit is contained in:
parent
5d67e28cb0
commit
6ce8e91cbf
@ -3,3 +3,4 @@
|
||||
-> more graceful handling of errors
|
||||
-> ffmpeg instead of gstreamer
|
||||
-> finish interface
|
||||
-> more flexible typebuf
|
||||
|
@ -96,6 +96,15 @@ group {
|
||||
source: "b1";
|
||||
}
|
||||
|
||||
|
||||
program {
|
||||
name: "b1_clicked";
|
||||
signal: "mouse,up,1";
|
||||
signal: "mouse,clicked,1";
|
||||
action: SIGNAL_EMIT "clicked" "b1";
|
||||
source: "b1";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "b2_selected";
|
||||
signal: "mouse,down,1";
|
||||
@ -103,6 +112,14 @@ group {
|
||||
source: "b2";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "b2_clicked";
|
||||
signal: "mouse,up,1";
|
||||
signal: "mouse,clicked,1";
|
||||
action: SIGNAL_EMIT "clicked" "b2";
|
||||
source: "b2";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "b3_selected";
|
||||
signal: "mouse,down,1";
|
||||
@ -110,11 +127,27 @@ group {
|
||||
source: "b3";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "b3_clicked";
|
||||
signal: "mouse,up,1";
|
||||
signal: "mouse,clicked,1";
|
||||
action: SIGNAL_EMIT "clicked" "b3";
|
||||
source: "b3";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "b4_selected";
|
||||
signal: "mouse,down,1";
|
||||
action: SIGNAL_EMIT "selected" "b4";
|
||||
source: "b4";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "b4_clicked";
|
||||
signal: "mouse,up,1";
|
||||
signal: "mouse,clicked,1";
|
||||
action: SIGNAL_EMIT "clicked" "b4";
|
||||
source: "b4";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,21 @@ group {
|
||||
max: 99999 99999;
|
||||
min: 99999 0;
|
||||
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
description {
|
||||
state: "visible" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 145;
|
||||
@ -91,6 +106,7 @@ group {
|
||||
state: "default" 0.0;
|
||||
min: 42 5;
|
||||
max: 42 5;
|
||||
color: 255 255 255 255;
|
||||
|
||||
rel1 {
|
||||
to_y: "paned_draggie";
|
||||
@ -111,14 +127,37 @@ group {
|
||||
}
|
||||
|
||||
part {
|
||||
name: "filelist_container";
|
||||
type: IMAGE;
|
||||
name: "filelist_clip";
|
||||
type: RECT;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
|
||||
rel1 {
|
||||
offset: 5 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to_y: "paned_draggie";
|
||||
offset: -6 -12;
|
||||
}
|
||||
}
|
||||
|
||||
description {
|
||||
state: "visible" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "filelist_container";
|
||||
type: IMAGE;
|
||||
clip_to: "filelist_clip";
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 0 130;
|
||||
max: 99999 99999;
|
||||
align: 0.0 0.0;
|
||||
color: 255 255 255 0;
|
||||
|
||||
rel1 {
|
||||
@ -146,6 +185,7 @@ group {
|
||||
part {
|
||||
name: "filelist";
|
||||
type: SWALLOW;
|
||||
clip_to: "filelist_clip";
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
@ -165,6 +205,7 @@ group {
|
||||
part {
|
||||
name: "filelist_overlay";
|
||||
type: IMAGE;
|
||||
clip_to: "filelist_clip";
|
||||
mouse_events: 1;
|
||||
repeat_events: 1;
|
||||
|
||||
@ -197,6 +238,7 @@ group {
|
||||
name: "filelist_overlay_text";
|
||||
type: TEXT;
|
||||
effect: NONE;
|
||||
clip_to: "filelist_clip";
|
||||
mouse_events: 1;
|
||||
repeat_events: 1;
|
||||
|
||||
@ -256,6 +298,38 @@ group {
|
||||
}
|
||||
|
||||
programs {
|
||||
program {
|
||||
name: "filelist,visible";
|
||||
signal: "ecdb,filelist,visible";
|
||||
source: "ecdb";
|
||||
after: "filelist,visible_swallow";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
target: "paned_container";
|
||||
transition: DECELERATE 0.5;
|
||||
}
|
||||
|
||||
program {
|
||||
name: "filelist,visible_swallow";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
target: "filelist_clip";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "filelist,hide";
|
||||
signal: "ecdb,filelist,hide";
|
||||
source: "ecdb";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "paned_container";
|
||||
transition: DECELERATE 0.5;
|
||||
}
|
||||
|
||||
program {
|
||||
name: "filelist,hide_swallow";
|
||||
after: "filelist,hide";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "filelist_clip";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "filelist,focus,in";
|
||||
signal: "ecdb,filelist,in";
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
static void ecdb_handle_typebuf(Evas_Object *gui);
|
||||
static void ecdb_cb_welcome_page(void *data, Evas_Object *o,
|
||||
static void ecdb_cb_welcome_page_buttons_focused(void *data, Evas_Object *o,
|
||||
const char *emission, const char *source);
|
||||
static void ecdb_cb_welcome_page_buttons_clicked(void *data, Evas_Object *o,
|
||||
const char *emission, const char *source);
|
||||
|
||||
static void
|
||||
@ -151,9 +153,10 @@ _cb_filelist_key_down(void *data, Evas *e __UNUSED__,
|
||||
int
|
||||
ecdb_create_main_gui(void)
|
||||
{
|
||||
Evas_Object *gui, *swallow;
|
||||
Ewl_Widget *embed, *filelist;
|
||||
Evas_Object *gui;
|
||||
Evas_Coord x, y, w, h;
|
||||
Ewl_Widget *embed, *filelist;
|
||||
Evas_Object *swallow;
|
||||
|
||||
em->main_win_ee = ecore_evas_software_x11_new(0, 0, 0, 0, 255, 255);
|
||||
|
||||
@ -184,7 +187,7 @@ ecdb_create_main_gui(void)
|
||||
|
||||
ecdb_set_main_theme(NULL, "ecdb/window");
|
||||
|
||||
/* Set up the filelist swallow */
|
||||
/* Filelist swallow next */
|
||||
embed = ewl_embed_new();
|
||||
ewl_object_fill_policy_set(EWL_OBJECT(embed), EWL_FLAG_FILL_ALL);
|
||||
swallow = ewl_embed_canvas_set(EWL_EMBED(embed),
|
||||
@ -205,6 +208,7 @@ ecdb_create_main_gui(void)
|
||||
ewl_widget_show(filelist);
|
||||
|
||||
edje_object_part_geometry_get(gui, "filelist", &x, &y, &w, &h);
|
||||
evas_object_name_set(swallow, "main_filelist");
|
||||
evas_object_move(swallow, x, y);
|
||||
evas_object_resize(swallow, w, h);
|
||||
edje_object_part_swallow(gui, "filelist", swallow);
|
||||
@ -214,7 +218,7 @@ ecdb_create_main_gui(void)
|
||||
_cb_filelist_key_down, gui);
|
||||
evas_object_show(swallow);
|
||||
|
||||
// Set up the welcome page
|
||||
/* Set up the welcome page */
|
||||
Evas_Object *welcome_page;
|
||||
|
||||
welcome_page = edje_object_add(ecore_evas_get(em->main_win_ee));
|
||||
@ -225,7 +229,9 @@ ecdb_create_main_gui(void)
|
||||
evas_object_resize(welcome_page, w, h);
|
||||
edje_object_part_swallow(gui, "action_area", welcome_page);
|
||||
edje_object_signal_callback_add(welcome_page, "selected", "b*",
|
||||
ecdb_cb_welcome_page, NULL);
|
||||
ecdb_cb_welcome_page_buttons_focused, NULL);
|
||||
edje_object_signal_callback_add(welcome_page, "clicked", "b*",
|
||||
ecdb_cb_welcome_page_buttons_clicked, NULL);
|
||||
evas_object_show(welcome_page);
|
||||
|
||||
/* Buttons next, do properly next */
|
||||
@ -328,6 +334,7 @@ ecdb_handle_typebuf(Evas_Object *gui)
|
||||
{
|
||||
char *dir;
|
||||
|
||||
/* What to do about multi-word directories? */
|
||||
dir = ecdb_strip_next_argument(ext);
|
||||
|
||||
if ((dir) && (dir[0] == '/'))
|
||||
@ -395,8 +402,8 @@ ecdb_handle_typebuf(Evas_Object *gui)
|
||||
|
||||
|
||||
static void
|
||||
ecdb_cb_welcome_page(void *data, Evas_Object *o, const char *emission,
|
||||
const char *source)
|
||||
ecdb_cb_welcome_page_buttons_focused(void *data, Evas_Object *o,
|
||||
const char *emission, const char *source)
|
||||
{
|
||||
static char *old_source;
|
||||
Evas_Object *unsel;
|
||||
@ -412,3 +419,23 @@ ecdb_cb_welcome_page(void *data, Evas_Object *o, const char *emission,
|
||||
else if (!old_source)
|
||||
old_source = strdup(source);
|
||||
}
|
||||
|
||||
static void
|
||||
ecdb_cb_welcome_page_buttons_clicked(void *data, Evas_Object *o,
|
||||
const char *emission, const char *source)
|
||||
{
|
||||
Evas_Object *swallow, *gui;
|
||||
|
||||
gui = evas_object_name_find(ecore_evas_get(em->main_win_ee), "gui");
|
||||
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"main_filelist");
|
||||
|
||||
/* Actually get this to do some stuff, instead of just for show like
|
||||
* now
|
||||
*/
|
||||
if (!strcmp(source, "b1"))
|
||||
edje_object_signal_emit(gui, "ecdb,filelist,visible", "ecdb");
|
||||
else if (swallow)
|
||||
edje_object_signal_emit(gui, "ecdb,filelist,hide", "ecdb");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user