working on wizard - nothing yet. dont use it! you'll regret it!

SVN revision: 31268
This commit is contained in:
Carsten Haitzler 2007-08-12 14:34:53 +00:00
parent 87934cc6fe
commit dd9a509678
5 changed files with 362 additions and 1 deletions

View File

@ -59,7 +59,8 @@ default_spectrum.edc \
default_color_well.edc \
default_sys.edc \
default_deskpreview.edc \
default_fontpreview.edc
default_fontpreview.edc \
default_wizard.edc
default.edj: Makefile $(EXTRA_DIST)
$(EDJE_CC) $(EDJE_FLAGS) \

View File

@ -77,5 +77,6 @@ collections {
#include "default_sys.edc"
#include "default_deskpreview.edc"
#include "default_fontpreview.edc"
#include "default_wizard.edc"
}

View File

@ -0,0 +1,260 @@
images {
image: "e17_logo_small.png" COMP;
image: "e17_logo_small_p1.png" COMP;
image: "e17_logo_small_p2.png" COMP;
image: "e17_logo_small_p3.png" COMP;
image: "e17_logo_small_p4.png" COMP;
image: "e17_logo_small_p5.png" COMP;
image: "e17_logo_small_p6.png" COMP;
image: "e17_logo_small_p7.png" COMP;
image: "e17_logo_small_p8.png" COMP;
image: "e17_logo_small_p9.png" COMP;
image: "e17_logo_small_p21.png" COMP;
image: "e17_logo_small_p22.png" COMP;
image: "e17_logo_small_p23.png" COMP;
image: "e17_logo_small_p24.png" COMP;
image: "e17_logo_small_p25.png" COMP;
image: "e17_logo_small_p26.png" COMP;
image: "e17_logo_small_p27.png" COMP;
image: "e17_logo_small_p28.png" COMP;
image: "e17_logo_small_p29.png" COMP;
}
styles
{
style {
name: "wizard_style";
base: "font=Edje-Vera-Bold font_size=16 text_class=tb_large align=center color=#fff style=soft_shadow shadow_color=#0002 wrap=word";
tag: "br" "\n";
tag: "hilight" "+ font=Edje-Vera-Bold text_class=tb_large_light style=glow color=#fff glow2_color=#fe87 glow_color=#fa14";
}
}
group {
name: "e/wizard/extra";
parts {
part {
name: "base";
mouse_events: 0;
type: RECT;
description {
state: "default" 0.0;
color: 255 255 255 255;
}
}
}
}
group {
name: "e/wizard/main";
parts {
part {
name: "base";
mouse_events: 0;
type: RECT;
description {
state: "default" 0.0;
color: 255 255 255 255;
}
}
/*
part {
name: "e.textblock.message";
type: TEXTBLOCK;
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to_y: "logo";
relative: 0.0 1.0;
offset: 8 8;
}
rel2 {
offset: -9 -9;
}
text {
style: "sys_style";
min: 1 1;
}
}
}
*/
part {
name: "e.title";
type: TEXT;
effect: SOFT_SHADOW;
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to: "logo";
relative: 1.0 0.0;
offset: 8 8;
}
rel2 {
to_y: "logo";
relative: 1.0 1.0;
offset: -9 -9;
}
color: 255 255 255 255;
color3: 0 0 0 32;
text {
text: "Welcome to Enlightenment";
font: "Edje Vera Bold";
size: 16;
min: 0 1;
align: 0.5 0.5;
text_class: "wizard_title";
}
}
}
part {
name: "logo";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
aspect_preference: BOTH;
min: 64 64;
max: 128 128;
align: 0.0 0.0;
rel1 {
relative: 0.0 0.0;
offset: 8 8;
}
rel2 {
relative: 1.0 0.0;
offset: -9 8;
}
image {
normal: "e17_logo_small.png";
}
}
}
#define PT(_name, _p1, _p2, _p3, _p4) \
part { \
name: _name; \
mouse_events: 0; \
description { \
state: "default" 0.0; \
visible: 0; \
rel1 { \
to: "logo"; \
relative: _p1 _p2; \
} \
rel2 { \
to: "logo"; \
relative: _p3 _p4; \
} \
image { \
normal: "e17_logo_small_"_name".png"; \
} \
color: 255 255 255 0; \
} \
description { \
state: "active" 0.0; \
inherit: "default" 0.0; \
rel1 { \
to: "logo"; \
relative: _p1 _p2; \
} \
rel2 { \
to: "logo"; \
relative: _p3 _p4; \
} \
visible: 1; \
color: 255 255 255 255; \
} \
}
PT("p1", 0.1328125, 0.1640625, 0.3359375, 0.3593750);
PT("p2", 0.1953125, 0.1093750, 0.3906250, 0.3125000);
PT("p3", 0.2656250, 0.0625000, 0.4531250, 0.2734375);
PT("p4", 0.3359375, 0.0312500, 0.5234375, 0.2500000);
PT("p5", 0.4062500, 0.0234375, 0.5937500, 0.2421875);
PT("p6", 0.4765625, 0.0312500, 0.6640625, 0.2500000);
PT("p7", 0.5468750, 0.0625000, 0.7343750, 0.2734375);
PT("p8", 0.6093750, 0.1093750, 0.8046875, 0.3125000);
PT("p9", 0.6640625, 0.1640625, 0.8671875, 0.3593750);
PT("p21", 0.1328125, 0.6406250, 0.3359375, 0.8359375);
PT("p22", 0.1953125, 0.6875000, 0.3906250, 0.8906250);
PT("p23", 0.2656250, 0.7265625, 0.4531250, 0.9375000);
PT("p24", 0.3359375, 0.7500000, 0.5234375, 0.9687500);
PT("p25", 0.4062500, 0.7578125, 0.5937500, 0.9765625);
PT("p26", 0.4765625, 0.7500000, 0.6640625, 0.9687500);
PT("p27", 0.5468750, 0.7265625, 0.7343750, 0.9375000);
PT("p28", 0.6093750, 0.6875000, 0.8046875, 0.8906250);
PT("p29", 0.6640625, 0.6406250, 0.8671875, 0.8359375);
}
programs {
program {
name: "init";
signal: "show";
source: "";
after: "go_active_pre";
}
program {
name: "go_active_pre";
action: STATE_SET "default" 0.0;
target: "logo";
after: "go_active1";
after: "go_active2";
after: "go_active3";
after: "go_active4";
after: "go_active5";
after: "go_active6";
after: "go_active7";
after: "go_active8";
after: "go_active9";
after: "go_active21";
after: "go_active22";
after: "go_active23";
after: "go_active24";
after: "go_active25";
after: "go_active26";
after: "go_active27";
after: "go_active28";
after: "go_active29";
}
#define PR(_name, _delay, _part) \
program { \
name: "go_active"_name; \
in: _delay 0.0; \
after: "go_activeb"_name; \
} \
program { \
name: "go_activeb"_name; \
action: STATE_SET "active" 0.0; \
target: _part; \
transition: LINEAR 0.5; \
after: "go_activec"_name; \
} \
program { \
name: "go_activec"_name; \
action: STATE_SET "default" 0.0; \
target: _part; \
transition: LINEAR 1.2; \
after: "go_activeb"_name; \
}
PR("1", 0.0, "p1");
PR("2", 0.2, "p2");
PR("3", 0.4, "p3");
PR("4", 0.6, "p4");
PR("5", 0.8, "p5");
PR("6", 1.0, "p6");
PR("7", 1.2, "p7");
PR("8", 1.4, "p8");
PR("9", 1.6, "p9");
PR("21", 1.6, "p21");
PR("22", 1.4, "p22");
PR("23", 1.2, "p23");
PR("24", 1.0, "p24");
PR("25", 0.8, "p25");
PR("26", 0.6, "p26");
PR("27", 0.4, "p27");
PR("28", 0.2, "p28");
PR("29", 0.0, "p29");
}
}

View File

@ -0,0 +1,7 @@
.deps
.libs
Makefile
Makefile.in
*.lo
module.la
module.desktop

View File

@ -4,14 +4,106 @@
#include "e.h"
#include "e_mod_main.h"
static E_Popup *_e_wizard_main_new(E_Zone *zone);
static E_Popup *_e_wizard_extra_new(E_Zone *zone);
static E_Popup *pop = NULL;
static Evas_List *pops = NULL;
EAPI int
e_wizard_init(void)
{
Evas_List *l;
for (l = e_manager_list(); l; l = l->next)
{
E_Manager *man;
Evas_List *l2;
man = l->data;
for (l2 = man->containers; l2; l2 = l2->next)
{
E_Container *con;
Evas_List *l3;
con = l2->data;
for (l3 = con->zones; l3; l3 = l3->next)
{
E_Zone *zone;
zone = l3->data;
if (!pop)
pop = _e_wizard_main_new(zone);
else
pops = evas_list_append(pops, _e_wizard_extra_new(zone));
}
}
}
return 1;
}
EAPI int
e_wizard_shutdown(void)
{
if (pop)
{
e_object_del(E_OBJECT(pop));
pop = NULL;
}
while (pops)
{
e_object_del(E_OBJECT(pops->data));
pops = evas_list_remove_list(pops, pops);
}
return 1;
}
static E_Popup *
_e_wizard_main_new(E_Zone *zone)
{
E_Popup *pop;
Evas_Object *o, *o_bg;
pop = e_popup_new(zone, zone->x, zone->y, zone->w, zone->h);
e_popup_layer_set(pop, 255);
o = edje_object_add(pop->evas);
/* FIXME: need a theme */
e_theme_edje_object_set(o, "base/theme/wizard",
"e/wizard/main");
evas_object_move(o, 0, 0);
evas_object_resize(o, zone->w, zone->h);
evas_object_show(o);
o_bg = o;
/* set up rest here */
e_popup_edje_bg_object_set(pop, o_bg);
e_popup_show(pop);
if (!e_grabinput_get(ecore_evas_software_x11_subwindow_get(pop->ecore_evas),
1, ecore_evas_software_x11_subwindow_get(pop->ecore_evas)))
{
e_object_del(E_OBJECT(pop));
pop = NULL;
}
return pop;
}
static E_Popup *
_e_wizard_extra_new(E_Zone *zone)
{
E_Popup *pop;
Evas_Object *o;
pop = e_popup_new(zone, zone->x, zone->y, zone->w, zone->h);
e_popup_layer_set(pop, 255);
o = edje_object_add(pop->evas);
/* FIXME: need a theme */
e_theme_edje_object_set(o, "base/theme/wizard",
"e/wizard/extra");
evas_object_move(o, 0, 0);
evas_object_resize(o, zone->w, zone->h);
evas_object_show(o);
e_popup_edje_bg_object_set(pop, o);
e_popup_show(pop);
return pop;
}