@ -0,0 +1,598 @@ |
||||
images { |
||||
image: "e17_menu_bg_border.png" COMP; |
||||
image: "e17_button2.png" COMP; |
||||
image: "e17_button.png" COMP; |
||||
image: "e17_dialog_watermark.png" COMP; |
||||
image: "e17_about_bg_v.png" COMP; |
||||
image: "e17_about_over_v.png" COMP; |
||||
image: "e17_logo.png" COMP; |
||||
image: "e17_about_sky0.png" LOSSY 70; |
||||
image: "e17_about_sky1.png" LOSSY 70; |
||||
image: "e17_about_sky2.png" LOSSY 70; |
||||
image: "e17_about_sky3.png" LOSSY 70; |
||||
image: "e17_about_sky4.png" LOSSY 70; |
||||
image: "e17_about_sky_overlay.png" COMP; |
||||
} |
||||
|
||||
styles |
||||
{ |
||||
style { |
||||
name: "about_style"; |
||||
base: "font=Edje-Vera font_size=10 align=center color=#000 style=shadow shadow_color=#ffffff80 wrap=word"; |
||||
|
||||
tag: "br" "\n"; |
||||
tag: "hilight" "+ font=Edje-Vera-Bold style=glow color=#fff glow2_color=#fe87 glow_color=#fa14"; |
||||
tag: "title" "+ font_size=12 font=Edje-Vera-Bold style=glow color=#fff glow2_color=#0003 glow_color=#0002"; |
||||
tag: "/title" "- \n \n"; |
||||
} |
||||
} |
||||
|
||||
group { |
||||
name: "widgets/about/main"; |
||||
parts { |
||||
part { |
||||
name: "base"; |
||||
mouse_events: 0; |
||||
type: RECT; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
relative: 0.0 0.0; |
||||
offset: 1 1; |
||||
} |
||||
rel2 { |
||||
relative: 1.0 1.0; |
||||
offset: -2 -2; |
||||
} |
||||
color: 221 221 221 255; |
||||
} |
||||
} |
||||
part { |
||||
name: "sky"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
min: 400 160; |
||||
max: 400 160; |
||||
align: 0.5 1.0; |
||||
fixed: 1 1; |
||||
rel1 { |
||||
relative: 0.0 1.0; |
||||
offset: 7 -1; |
||||
} |
||||
rel2 { |
||||
relative: 1.0 1.0; |
||||
offset: -8 -1; |
||||
} |
||||
image { |
||||
normal: "e17_about_sky0.png"; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "sky1"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "sky"; |
||||
} |
||||
rel2 { |
||||
to: "sky"; |
||||
} |
||||
image { |
||||
normal: "e17_about_sky1.png"; |
||||
} |
||||
fill { |
||||
smooth: 0; |
||||
size { |
||||
relative: 1.1075 1.0; |
||||
} |
||||
} |
||||
} |
||||
description { |
||||
state: "drift" 0.0; |
||||
inherit: "default" 0.0; |
||||
fill { |
||||
origin { |
||||
relative: -1.1075 0.0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "sky4"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "sky"; |
||||
} |
||||
rel2 { |
||||
to: "sky"; |
||||
} |
||||
image { |
||||
normal: "e17_about_sky4.png"; |
||||
} |
||||
fill { |
||||
smooth: 0; |
||||
size { |
||||
relative: 1.12 1.0; |
||||
} |
||||
} |
||||
} |
||||
description { |
||||
state: "drift" 0.0; |
||||
inherit: "default" 0.0; |
||||
fill { |
||||
origin { |
||||
relative: -1.12 0.0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "sky2"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "sky"; |
||||
} |
||||
rel2 { |
||||
to: "sky"; |
||||
} |
||||
image { |
||||
normal: "e17_about_sky2.png"; |
||||
} |
||||
fill { |
||||
smooth: 0; |
||||
size { |
||||
relative: 1.1765 1.0; |
||||
} |
||||
} |
||||
} |
||||
description { |
||||
state: "drift" 0.0; |
||||
inherit: "default" 0.0; |
||||
fill { |
||||
origin { |
||||
relative: -1.1765 0.0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "sky3"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "sky"; |
||||
} |
||||
rel2 { |
||||
to: "sky"; |
||||
} |
||||
image { |
||||
normal: "e17_about_sky3.png"; |
||||
} |
||||
fill { |
||||
smooth: 0; |
||||
size { |
||||
relative: 2.1325 1.0; |
||||
} |
||||
} |
||||
} |
||||
description { |
||||
state: "drift" 0.0; |
||||
inherit: "default" 0.0; |
||||
fill { |
||||
origin { |
||||
relative: -2.1325 0.0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "sky_over"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "sky"; |
||||
} |
||||
rel2 { |
||||
to: "sky"; |
||||
} |
||||
image { |
||||
normal: "e17_about_sky_overlay.png"; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "about_bg"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "about"; |
||||
offset: -7 -7; |
||||
} |
||||
rel2 { |
||||
to: "about"; |
||||
offset: 6 6; |
||||
} |
||||
image { |
||||
normal: "e17_about_bg_v.png"; |
||||
border: 7 7 7 7; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "authors_bg"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "authors"; |
||||
offset: -7 -7; |
||||
} |
||||
rel2 { |
||||
to: "authors"; |
||||
offset: 6 6; |
||||
} |
||||
image { |
||||
normal: "e17_about_bg_v.png"; |
||||
border: 7 7 7 7; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "base2"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
min: 200 138; |
||||
max: 200 138; |
||||
align: 1.0 1.0; |
||||
fixed: 1 1; |
||||
rel1 { |
||||
relative: 1.0 1.0; |
||||
offset: -1 -1; |
||||
} |
||||
rel2 { |
||||
relative: 1.0 1.0; |
||||
offset: -1 -1; |
||||
} |
||||
image { |
||||
normal: "e17_dialog_watermark.png"; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "base3"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
image { |
||||
normal: "e17_menu_bg_border.png"; |
||||
border: 1 1 1 1; |
||||
middle: 0; |
||||
} |
||||
fill { |
||||
smooth: 0; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "about"; |
||||
type: TEXTBLOCK; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
max: 200 1000; |
||||
min: 200 0; |
||||
rel1 { |
||||
to_y: "logo"; |
||||
relative: 0.0 1.0; |
||||
offset: 8 8; |
||||
} |
||||
rel2 { |
||||
to_y: "sky"; |
||||
relative: 0.5 0.4; |
||||
offset: -9 -9; |
||||
} |
||||
text { |
||||
style: "about_style"; |
||||
min: 0 1; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "authors"; |
||||
type: TEXTBLOCK; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
max: 1000 1000; |
||||
min: 200 0; |
||||
rel1 { |
||||
to_y: "logo"; |
||||
relative: 0.5 1.0; |
||||
offset: 8 8; |
||||
} |
||||
rel2 { |
||||
to_y: "sky"; |
||||
relative: 1.0 0.4; |
||||
offset: -9 -9; |
||||
} |
||||
text { |
||||
style: "about_style"; |
||||
min: 1 1; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "about_over"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "about_bg"; |
||||
} |
||||
rel2 { |
||||
to: "about_bg"; |
||||
} |
||||
image { |
||||
normal: "e17_about_over_v.png"; |
||||
border: 13 13 13 13; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "authors_over"; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
to: "authors_bg"; |
||||
} |
||||
rel2 { |
||||
to: "authors_bg"; |
||||
} |
||||
image { |
||||
normal: "e17_about_over_v.png"; |
||||
border: 13 13 13 13; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "title"; |
||||
type: TEXT; |
||||
effect: SOFT_SHADOW; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
fixed: 0 1; |
||||
align: 0.5 0.0; |
||||
rel1 { |
||||
to_y: "logo"; |
||||
relative: 0.0 0.0; |
||||
offset: 6 0; |
||||
} |
||||
rel2 { |
||||
to_y: "logo"; |
||||
relative: 1.0 0.0; |
||||
offset: -7 6; |
||||
} |
||||
color: 255 255 255 255; |
||||
color3: 0 0 0 32; |
||||
text { |
||||
text: "Enlightenment"; |
||||
font: "Edje-Vera-Bold"; |
||||
size: 16; |
||||
min: 1 1; |
||||
align: 0.5 0.5; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "version"; |
||||
type: TEXT; |
||||
effect: SOFT_SHADOW; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
fixed: 0 1; |
||||
align: 0.5 0.0; |
||||
rel1 { |
||||
to: "title"; |
||||
relative: 0.0 1.0; |
||||
offset: 6 2; |
||||
} |
||||
rel2 { |
||||
to: "title"; |
||||
relative: 1.0 1.0; |
||||
offset: -7 2; |
||||
} |
||||
color: 255 255 255 255; |
||||
color3: 0 0 0 32; |
||||
text { |
||||
text: "0.17.0.000"; |
||||
font: "Edje-Vera-Bold"; |
||||
size: 12; |
||||
min: 1 1; |
||||
align: 0.5 0.5; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "logo"; |
||||
type: IMAGE; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
min: 63 63; |
||||
max: 63 63; |
||||
align: 0.0 0.0; |
||||
fixed: 1 1; |
||||
rel1 { |
||||
relative: 0.0 0.0; |
||||
offset: 8 8; |
||||
} |
||||
rel2 { |
||||
relative: 0.5 0.0; |
||||
offset: 8 8; |
||||
} |
||||
image { |
||||
normal: "e17_logo.png"; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "button"; |
||||
type: IMAGE; |
||||
mouse_events: 1; |
||||
description { |
||||
state: "default" 0.0; |
||||
min: 64 32; |
||||
align: 0.5 1.0; |
||||
fixed: 1 1; |
||||
rel1 { |
||||
relative: 0.5 1.0; |
||||
offset: 0 -7; |
||||
} |
||||
rel2 { |
||||
relative: 0.5 1.0; |
||||
offset: 0 -7; |
||||
} |
||||
image { |
||||
normal: "e17_button.png"; |
||||
border: 8 8 8 8; |
||||
} |
||||
} |
||||
description { |
||||
state: "clicked" 0.0; |
||||
inherit: "default" 0.0; |
||||
image { |
||||
normal: "e17_button2.png"; |
||||
} |
||||
} |
||||
} |
||||
part { |
||||
name: "button_text"; |
||||
type: TEXT; |
||||
effect: SHADOW; |
||||
mouse_events: 0; |
||||
description { |
||||
state: "default" 0.0; |
||||
rel1 { |
||||
relative: 0.0 0.0; |
||||
offset: 6 6; |
||||
to: "button"; |
||||
} |
||||
rel2 { |
||||
relative: 1.0 1.0; |
||||
offset: -7 -7; |
||||
to: "button"; |
||||
} |
||||
color: 0 0 0 255; |
||||
color3: 255 255 255 128; |
||||
text { |
||||
text: "OK"; |
||||
font: "Edje-Vera"; |
||||
size: 10; |
||||
min: 1 1; |
||||
align: 0.5 0.5; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
programs { |
||||
program { |
||||
name: "button_click"; |
||||
signal: "mouse,down,1"; |
||||
source: "button"; |
||||
action: STATE_SET "clicked" 0.0; |
||||
target: "button"; |
||||
} |
||||
program { |
||||
name: "button_unclick"; |
||||
signal: "mouse,up,1"; |
||||
source: "button"; |
||||
action: STATE_SET "default" 0.0; |
||||
target: "button"; |
||||
} |
||||
program { |
||||
name: "button_unclick2"; |
||||
signal: "mouse,clicked,1"; |
||||
source: "button"; |
||||
action: SIGNAL_EMIT "close" ""; |
||||
} |
||||
|
||||
program { |
||||
name: "anim_sky1a"; |
||||
signal: "show"; |
||||
source: ""; |
||||
action: STATE_SET "drift" 0.0; |
||||
transition: LINEAR 20.0; |
||||
target: "sky1"; |
||||
after: "anim_sky1b"; |
||||
} |
||||
program { |
||||
name: "anim_sky1b"; |
||||
action: STATE_SET "default" 0.0; |
||||
target: "sky1"; |
||||
after: "anim_sky1a"; |
||||
} |
||||
|
||||
program { |
||||
name: "anim_sky4a"; |
||||
signal: "show"; |
||||
source: ""; |
||||
action: STATE_SET "drift" 0.0; |
||||
transition: LINEAR 15.0; |
||||
target: "sky4"; |
||||
after: "anim_sky4b"; |
||||
} |
||||
program { |
||||
name: "anim_sky4b"; |
||||
action: STATE_SET "default" 0.0; |
||||
target: "sky4"; |
||||
after: "anim_sky4a"; |
||||
} |
||||
|
||||
program { |
||||
name: "anim_sky2a"; |
||||
signal: "show"; |
||||
source: ""; |
||||
action: STATE_SET "drift" 0.0; |
||||
transition: LINEAR 15.0; |
||||
target: "sky2"; |
||||
after: "anim_sky2b"; |
||||
} |
||||
program { |
||||
name: "anim_sky2b"; |
||||
action: STATE_SET "default" 0.0; |
||||
target: "sky2"; |
||||
after: "anim_sky2a"; |
||||
} |
||||
|
||||
program { |
||||
name: "anim_sky3a"; |
||||
signal: "show"; |
||||
source: ""; |
||||
action: STATE_SET "drift" 0.0; |
||||
transition: LINEAR 15.0; |
||||
target: "sky3"; |
||||
after: "anim_sky3b"; |
||||
} |
||||
program { |
||||
name: "anim_sky3b"; |
||||
action: STATE_SET "default" 0.0; |
||||
target: "sky3"; |
||||
after: "anim_sky3a"; |
||||
} |
||||
|
||||
} |
||||
} |
After Width: | Height: | Size: 421 B |
After Width: | Height: | Size: 971 B |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 9.1 KiB |
@ -0,0 +1,167 @@ |
||||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 |
||||
*/ |
||||
#include "e.h" |
||||
|
||||
/* local subsystem functions */ |
||||
static void _e_about_free(E_About *about); |
||||
static void _e_about_cb_delete(E_Win *win); |
||||
static void _e_dialog_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source); |
||||
|
||||
/* local subsystem globals */ |
||||
|
||||
/* externally accessible functions */ |
||||
|
||||
E_About * |
||||
e_about_new(E_Container *con) |
||||
{ |
||||
E_About *about; |
||||
E_Manager *man; |
||||
Evas_Object *o; |
||||
|
||||
if (!con) |
||||
{ |
||||
man = e_manager_current_get(); |
||||
if (!man) return NULL; |
||||
con = e_container_current_get(man); |
||||
if (!con) con = e_container_number_get(man, 0); |
||||
if (!con) return NULL; |
||||
} |
||||
about = E_OBJECT_ALLOC(E_About, E_ABOUT_TYPE, _e_about_free); |
||||
if (!about) return NULL; |
||||
about->win = e_win_new(con); |
||||
if (!about->win) |
||||
{ |
||||
free(about); |
||||
return NULL; |
||||
} |
||||
e_win_delete_callback_set(about->win, _e_about_cb_delete); |
||||
about->win->data = about; |
||||
e_win_name_class_set(about->win, "E", "_about"); |
||||
e_win_title_set(about->win, _("About Enlightenment")); |
||||
|
||||
o = edje_object_add(e_win_evas_get(about->win)); |
||||
about->bg_object = o; |
||||
e_theme_edje_object_set(o, "base/theme/about", |
||||
"widgets/about/main"); |
||||
evas_object_move(o, 0, 0); |
||||
evas_object_show(o); |
||||
|
||||
edje_object_part_text_set(about->bg_object, "title", _("Enlightenment")); |
||||
edje_object_part_text_set(about->bg_object, "version", VERSION); |
||||
edje_object_part_text_set |
||||
(about->bg_object, "about", |
||||
_( |
||||
"Copyright © 1999-2005, by the Enlightenment Dev Team.<br>" |
||||
"<br>" |
||||
"We hope you enjoy using this software as much as we enjoyed writing it.<br>" |
||||
"<br>" |
||||
"Please think of the aardvarks. They need some love too." |
||||
) |
||||
); |
||||
edje_object_signal_callback_add(about->bg_object, "close", "", |
||||
_e_dialog_cb_close, about); |
||||
{ |
||||
FILE *f; |
||||
char buf[4096], buf2[4096], *tbuf; |
||||
|
||||
snprintf(buf, sizeof(buf), "%s/AUTHORS", e_prefix_data_get()); |
||||
f = fopen(buf, "r"); |
||||
if (f) |
||||
{ |
||||
tbuf = strdup(_("<title>Authors</title>")); |
||||
while (fgets(buf, sizeof(buf), f)) |
||||
{ |
||||
int len; |
||||
|
||||
len = strlen(buf); |
||||
if (len > 0) |
||||
{
|
||||
if (buf[len - 1] == '\n') |
||||
{ |
||||
buf[len - 1] = 0; |
||||
len--; |
||||
} |
||||
if (len > 0) |
||||
{ |
||||
char *p; |
||||
|
||||
do |
||||
{ |
||||
p = strchr(buf, '<'); |
||||
if (p) *p = 0; |
||||
} |
||||
while (p); |
||||
do |
||||
{ |
||||
p = strchr(buf, '>'); |
||||
if (p) *p = 0; |
||||
} |
||||
while (p); |
||||
snprintf(buf2, sizeof(buf2), "%s<br>", buf); |
||||
tbuf = realloc(tbuf, strlen(tbuf) + strlen(buf2) + 1); |
||||
strcat(tbuf, buf2); |
||||
} |
||||
} |
||||
} |
||||
fclose(f); |
||||
if (tbuf) |
||||
{ |
||||
edje_object_part_text_set(about->bg_object, "authors", tbuf); |
||||
free(tbuf); |
||||
} |
||||
} |
||||
} |
||||
e_win_centered_set(about->win, 1); |
||||
return about; |
||||
} |
||||
|
||||
void |
||||
e_about_show(E_About *about) |
||||
{ |
||||
Evas_Coord w, h, mw, mh; |
||||
|
||||
edje_object_size_min_get(about->bg_object, &w, &h); |
||||
edje_object_size_min_calc(about->bg_object, &mw, &mh); |
||||
if (w > mw) mw = w; |
||||
if (h > mh) mh = h; |
||||
evas_object_resize(about->bg_object, mw, mh); |
||||
e_win_resize(about->win, mw, mh); |
||||
e_win_size_min_set(about->win, mw, mh); |
||||
|
||||
edje_object_size_max_get(about->bg_object, &w, &h); |
||||
if ((w > 0) && (h > 0)) |
||||
{ |
||||
if (w < mw) w = mw; |
||||
if (h < mh) h = mh; |
||||
e_win_size_max_set(about->win, mw, mh); |
||||
} |
||||
e_win_show(about->win); |
||||
} |
||||
|
||||
/* local subsystem functions */ |
||||
static void |
||||
_e_about_free(E_About *about) |
||||
{ |
||||
if (about->bg_object) evas_object_del(about->bg_object); |
||||
e_object_del(E_OBJECT(about->win)); |
||||
free(about); |
||||
} |
||||
|
||||
static void |
||||
_e_about_cb_delete(E_Win *win) |
||||
{ |
||||
E_About *about; |
||||
|
||||
about = win->data; |
||||
e_object_del(E_OBJECT(about)); |
||||
} |
||||
|
||||
static void |
||||
_e_dialog_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source) |
||||
{ |
||||
E_About *about; |
||||
|
||||
about = data; |
||||
e_object_del(E_OBJECT(about)); |
||||
} |
@ -0,0 +1,27 @@ |
||||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 |
||||
*/ |
||||
#ifdef E_TYPEDEFS |
||||
|
||||
typedef struct _E_About E_About; |
||||
|
||||
#else |
||||
#ifndef E_ABOUT_H |
||||
#define E_ABOUT_H |
||||
|
||||
#define E_ABOUT_TYPE 0xE0b01013 |
||||
|
||||
struct _E_About |
||||
{ |
||||
E_Object e_obj_inherit; |
||||
|
||||
E_Win *win; |
||||
Evas_Object *bg_object; |
||||
void *data; |
||||
}; |
||||
|
||||
EAPI E_About *e_about_new (E_Container *con); |
||||
EAPI void e_about_show (E_About *about); |
||||
|
||||
#endif |
||||
#endif |