e packages build again - also not much point having an enlightenment-data as

it's built as an arch specific package and it is intrinsically required by e
and cannot work without it nor is the data shared betwene e and other apps
unless e itself is installed too


SVN revision: 22260
This commit is contained in:
Carsten Haitzler 2006-04-20 11:30:25 +00:00
parent c9cda2cb39
commit fbd972cdb9
53 changed files with 5725 additions and 7648 deletions

View File

@ -11,7 +11,7 @@ bin_SCRIPTS = enlightenment-config
EXTRA_DIST = README AUTHORS COPYING COPYING-PLAIN enlightenment.spec \
debian/changelog debian/changelog.in debian/copyright \
debian/rules debian/enlightenment.install \
debian/enlightenment.docs debian/enlightenment-data.install \
debian/enlightenment.docs \
debian/libe.install debian/libe-dev.install debian/control \
enlightenment.spec.in

View File

@ -114,6 +114,31 @@ group {
}
}
}
part {
name: "ac";
clip_to: "fade_clip";
description {
state: "default" 0.0;
aspect: 0.975609756 0.975609756;
align: 1.0 1.0;
max: 40 41;
visible: 0;
rel1 {
relative: 0.5 0.5;
}
rel2 {
relative: 1.0 1.0;
}
image {
normal: "e17_battery_ac.png";
}
}
description {
state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part {
name: "reading";
type: TEXT;
@ -170,31 +195,6 @@ group {
}
}
}
part {
name: "ac";
clip_to: "fade_clip";
description {
state: "default" 0.0;
aspect: 0.975609756 0.975609756;
align: 1.0 1.0;
max: 40 41;
visible: 0;
rel1 {
relative: 0.5 0.5;
}
rel2 {
relative: 1.0 1.0;
}
image {
normal: "e17_battery_ac.png";
}
}
description {
state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part {
name: "fade_clip";
type: RECT;

View File

@ -1,8 +1,6 @@
images {
image: "e17_clock_bg.png" COMP;
image: "e17_clock_fg.png" COMP;
image: "e17_ibar_over_h.png" COMP;
image: "e17_ibar_bg_h.png" COMP;
image: "e17_clock_seconds_00.png" COMP;
image: "e17_clock_seconds_01.png" COMP;
image: "e17_clock_seconds_02.png" COMP;
@ -189,24 +187,10 @@ group {
script {
public clock_cb(val) {
new buf[11];
new digitalVal[15];
new hourStr[4], minuteStr[4], secondStr[4];
new year, month, day, yearday, weekday, hour, minute;
new Float:second;
new v;
new isAfternoon;
new digiBuf[2];
new digitalStyle;
new DIGITAL_STYLE_NONE, DIGITAL_STYLE_NORMAL, DIGITAL_STYLE_24HOUR;
DIGITAL_STYLE_NONE = 0;
DIGITAL_STYLE_NORMAL = 1;
DIGITAL_STYLE_24HOUR = 2;
get_text(PART:"digitalStyle", digiBuf, 2);
digitalStyle = atoi(digiBuf);
date(year, month, day, yearday, weekday, hour, minute, second);
v = round(second);
#if E17_PROFILE != HIRES_PDA && E17_PROFILE != LOWRES_PDA && E17_PROFILE != MEDIUMRES_PDA
@ -216,7 +200,6 @@ group {
#endif
#if E17_PROFILE != HIRES_PDA && E17_PROFILE != LOWRES_PDA && E17_PROFILE != MEDIUMRES_PDA
buf[0] = 0;
digitalVal[0] = 0;
if (v < 10) {snprintf(buf, 10, "0%i", v);}
else {snprintf(buf, 10, "%i", v);}
set_state(PART:"seconds", buf, 0.0);
@ -232,59 +215,6 @@ group {
if (v < 10) {snprintf(buf, 10, "0%i", v);}
else {snprintf(buf, 10, "%i", v);}
set_state(PART:"hour", buf, 0.0);
buf[0] = 0;
v = round(second);
if (v < 10) {snprintf(buf, 10, "0%i", v);}
else {snprintf(buf, 10, "%i", v);}
snprintf(secondStr, 3, "%s", buf);
buf[0] = 0;
if (minute < 10) {snprintf(buf, 10, "0%i", minute);}
else {snprintf(buf, 10, "%i", minute);}
snprintf(minuteStr, 3, "%s", buf);
buf[0] = 0;
isAfternoon = 0;
v = hour;
if (hour >= 12 && hour < 24) { isAfternoon = 1; }
if (digitalStyle == DIGITAL_STYLE_NORMAL) {
v = (v % 12);
if (v == 0) { v = 12; }
}
if (digitalStyle == DIGITAL_STYLE_24HOUR && v < 10) {
snprintf(buf, 10, "0%i", v);
} else {
snprintf(buf, 10, "%i", v);
}
snprintf(hourStr, 3, "%s", buf);
buf[0] = 0;
if (isAfternoon == 1) {
snprintf(buf, 10, "PM");
} else {
snprintf(buf, 10, "AM");
}
if (digitalStyle != DIGITAL_STYLE_NONE) {
if (digitalStyle == DIGITAL_STYLE_NORMAL) {
snprintf(digitalVal, 14, "%s:%s:%s %s", hourStr, minuteStr, secondStr, buf);
} else if (digitalStyle == DIGITAL_STYLE_24HOUR) {
snprintf(digitalVal, 14, " %s:%s:%s ", hourStr, minuteStr, secondStr);
}
set_text(PART:"digital", digitalVal);
set_state(PART:"digital", "digital", 0.0);
set_state(PART:"digital_bg", "digital", 0.0);
set_state(PART:"digital_bg_overlay", "digital", 0.0);
} else {
set_text(PART:"digital", "");
set_state(PART:"digital", "hidden", 0.0);
set_state(PART:"digital_bg", "hidden", 0.0);
set_state(PART:"digital_bg_overlay", "hidden", 0.0);
}
}
}
parts {
@ -310,10 +240,10 @@ group {
state: "default" 0.0;
aspect: 1.0 1.0;
rel1 {
relative: 0.1 0.1;
relative: 0.05 0.05;
}
rel2 {
relative: 0.9 0.9;
relative: 0.95 0.95;
}
image {
normal: "e17_clock_"IND"_00.png";
@ -403,10 +333,10 @@ group {
state: "default" 0.0;
aspect: 1.0 1.0;
rel1 {
relative: 0.1 0.1;
relative: 0.05 0.05;
}
rel2 {
relative: 0.9 0.9;
relative: 0.95 0.95;
}
image {
normal: "e17_clock_"IND"_00.png";
@ -495,10 +425,10 @@ group {
state: "default" 0.0;
aspect: 1.0 1.0;
rel1 {
relative: 0.2 0.2;
relative: 0.1 0.1;
}
rel2 {
relative: 0.8 0.8;
relative: 0.9 0.9;
}
image {
normal: "e17_clock_"IND"_00.png";
@ -592,124 +522,6 @@ group {
}
}
}
part {
name: "digital_bg_area";
type: "RECT";
mouse_events: 0;
description {
state: "default" 0.0;
min: 16 16;
rel1 {
relative: 0.0 0.8;
}
rel2 {
relative: 1.0 1.0;
}
visible: 0;
}
}
part {
name: "digital_bg_overlay";
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to: "digital_bg_area";
relative: 0.0 0.0;
}
rel2 {
to: "digital_bg_area";
relative: 1.0 1.0;
}
image {
normal: "e17_ibar_over_h.png";
border: 13 13 13 13;
}
fill {
smooth: 0;
}
color: 255 255 255 192;
}
description {
state: "hidden" 0.0;
visible: 0;
image {
normal: "e17_ibar_over_h.png";
border: 13 13 13 13;
middle: 0;
}
}
}
part {
name: "digital_bg";
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to: "digital_bg_area";
relative: 0.0 0.0;
}
rel2 {
to: "digital_bg_area";
relative: 1.0 1.0;
}
image {
normal: "e17_ibar_bg_h.png";
border: 6 6 6 6;
}
fill {
smooth: 0;
}
color: 255 255 255 128;
}
description {
state: "hidden" 0.0;
visible: 0;
image {
normal: "e17_ibar_bg_h.png";
border: 6 6 6 6;
middle: 0;
}
}
}
part {
name: "digital";
type: TEXT;
effect: SOFT_SHADOW;
description {
state: "default" 0.0;
rel1 {
to: "digital_bg_area";
offset: 3 4;
}
rel2 {
to: "digital_bg_area";
offset: -2 -2;
}
color: 255 255 255 255;
color3: 0 0 0 32;
text {
text: "00:00:00 AM";
font: "Edje-Vera";
size: 15;
fit: 0 1;
align: 0.5 0.5;
text_class: "clock";
}
}
description {
state: "hidden" 0.0;
visible: 0;
}
}
part {
name: "digitalStyle";
type: TEXT;
description {
state: "hidden" 0.0;
visible: 0;
}
}
}
programs {
program {

View File

@ -621,17 +621,54 @@ group {
state: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 4 4;
offset: 2 2;
}
rel2 {
relative: 1.0 1.0;
offset: -5 -5;
offset: -3 -3;
}
color: 0 0 0 0;
}
description {
state: "bigger" 0.0;
inherit: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
}
}
part {
name: "over";
type: RECT;
repeat_events: 0;
description {
state: "default" 0.0;
color: 0 0 0 0;
}
}
}
programs {
program {
name: "hover_in";
signal: "mouse,in";
source: "over";
action: STATE_SET "bigger" 0.0;
transition: LINEAR 0.1;
target: "item";
}
program {
name: "hover_out";
signal: "mouse,out";
source: "over";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.2;
target: "item";
}
program {
name: "exec_start";
signal: "start";
@ -671,12 +708,6 @@ group {
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
offset: 4 4;
}
rel2 {
offset: -5 -5;
}
color: 255 255 255 0;
}
}

View File

@ -151,10 +151,64 @@ group {
}
}
part {
name: "pager";
name: "background";
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to: "overlay";
}
rel2 {
to: "overlay";
}
image {
normal: "e17_ibar_bg_h.png";
border: 6 6 6 6;
}
fill {
smooth: 0;
}
}
}
part {
name: "items_clip";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to: "background";
offset: 4 4;
}
rel2 {
to: "background";
offset: -5 -5;
}
color: 255 255 255 255;
}
}
part {
name: "pager";
type: SWALLOW;
description {
mouse_events: 0;
clip_to: "items_clip";
description {
state: "default" 0.0;
rel1 {
to: "overlay";
offset: 4 4;
}
rel2 {
to: "overlay";
offset: -5 -5;
}
color: 0 0 0 0;
}
}
part {
name: "overlay";
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to_y: "title_overlay";
@ -165,7 +219,14 @@ group {
relative: 1.0 1.0;
offset: -17 -17;
}
color: 0 0 0 0;
image {
normal: "e17_ibar_over_h.png";
border: 13 13 13 13;
middle: 0;
}
fill {
smooth: 0;
}
}
}
}
@ -377,7 +438,8 @@ group {
}
part {
name: "overlay";
mouse_events: 0;
repeat_events: 1;
// mouse_events: 0;
description {
state: "default" 0.0;
rel1 {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 17 KiB

15
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: enlightenment
Section: x11
Priority: optional
Maintainer: E17 Debian Team <debian@edevelop.org>
Build-Depends: libevas-dev, libecore-dev, libeet-dev, libedje-dev, edje-bin, libembryo-dev, xlibs-dev, automake1.7 | automaken, libtool, debhelper (>= 4.0)
Build-Depends: libevas-dev, libecore-dev, libeet-dev, libedje-dev, edje-bin, libembryo-dev, libx11-dev, x-dev, libxext-dev, automake1.7 | automaken, libtool, debhelper (>= 4.0)
Standards-Version: 3.6.2.2
Package: enlightenment
@ -10,24 +10,13 @@ Architecture: any
Section: x11
Recommends: libevas-engine-xrender
Suggests: entrance
Depends: ${shlibs:Depends}, libe, enlightenment-data (>= 0.16.999), libevas, libecore, libecore-con, libecore-evas, libecore-file, libecore-ipc, libecore-job, libecore-txt, libecore-x, libeet, libembryo, embryo-bin, edje-bin, libedje, libevas-loader-eet, libevas-loader-jpeg, libevas-loader-png, libevas-saver-eet, libevas-saver-jpeg, libevas-saver-png, libevas-engine-buffer, libevas-engine-software-x11
Depends: ${shlibs:Depends}, libe, libevas, libecore, libecore-con, libecore-evas, libecore-file, libecore-ipc, libecore-job, libecore-txt, libecore-x, libeet, libembryo, embryo-bin, edje-bin, libedje, libevas-loader-eet, libevas-loader-jpeg, libevas-loader-png, libevas-saver-eet, libevas-saver-jpeg, libevas-saver-png, libevas-engine-buffer, libevas-engine-software-x11
Description: Enlightenment themes, etc.
Enlightenment is an advanced window manager for X11. Unique
features include: a fully animated background, nice drop shadows
around windows, backed by an extremely clean and optimized
foundation of APIs.
Package: enlightenment-data
Architecture: any
Section: x11
Depends: enlightenment (= ${Source-Version})
Conflicts: enlightenment-data (< 0.16.999)
Description: Enlightenment themes, etc.
Enlightenment is an advanced window manager for X11. Unique
features include: a fully animated background, nice drop shadows
around windows, a unique application launcher module (ibar). All
backed by an extremely clean and optimized foundation of APIs.
Package: libe
Section: libs
Architecture: any

View File

@ -1,2 +0,0 @@
debian/tmp/usr/share/enlightenment/data/themes/*.edj
debian/tmp/usr/share/enlightenment/data/init/*.edj

View File

@ -21,9 +21,5 @@ debian/tmp/usr/lib/enlightenment/modules/start/*.png
debian/tmp/usr/lib/enlightenment/modules/temperature/*/*.so
debian/tmp/usr/lib/enlightenment/modules/temperature/*.png
debian/tmp/usr/share/enlightenment
debian/tmp/usr/share/enlightenment
debian/tmp/usr/share/enlightenment
debian/tmp/usr/share/enlightenment
debian/tmp/usr/share/enlightenment
debian/tmp/usr/share/locale
debian/tmp/usr/share/xsessions

View File

@ -5727,6 +5727,21 @@ _e_border_eval(E_Border *bd)
changed = 0;
for (i = 0; i < num; i++)
{
if (rects[i].x < 0)
{
rects[i].width -= rects[i].x;
rects[i].x = 0;
}
if ((rects[i].x + rects[i].width) > bd->w)
rects[i].width = rects[i].width - rects[i].x;
if (rects[i].y < 0)
{
rects[i].height -= rects[i].y;
rects[i].y = 0;
}
if ((rects[i].y + rects[i].height) > bd->h)
rects[i].height = rects[i].height - rects[i].y;
if ((orects[i].x != rects[i].x) ||
(orects[i].y != rects[i].y) ||
(orects[i].width != rects[i].width) ||

View File

@ -91,6 +91,7 @@ e_config_init(void)
E_CONFIG_VAL(D, T, geom.res, INT);
E_CONFIG_VAL(D, T, style, STR);
E_CONFIG_VAL(D, T, autoscroll, UCHAR);
E_CONFIG_VAL(D, T, resizable, UCHAR);
_e_config_gadcon_edd = E_CONFIG_DD_NEW("E_Config_Gadcon", E_Config_Gadcon);
#undef T
@ -1016,71 +1017,111 @@ e_config_init(void)
"desk_linear_flip_by", "1");
}
IFCFGEND;
/* yes - this causes a small leak - i know. it is for testing temporarily x*/
IFCFG(0x0093); /* the version # where this value(s) was introduced */
/* FIXME: wipe previous shelves and gadcons - remove this eventually */
e_config->shelves = NULL;
e_config->gadcons = NULL;
// IFCFG(0x008e); /* the version # where this value(s) was introduced */
#if 1 // this is liable to change
{
E_Config_Shelf *cf_es;
cf_es = E_NEW(E_Config_Shelf, 1);
cf_es->name = evas_stringshare_add("shelf");
cf_es->container = 0;
cf_es->zone = 0;
cf_es->popup = 1;
cf_es->layer = 200;
cf_es->orient = E_GADCON_ORIENT_TOP;
cf_es->fit_along = 1;
cf_es->fit_size = 0;
cf_es->style = evas_stringshare_add("default");
cf_es->size = 40;
e_config->shelves = evas_list_append(e_config->shelves, cf_es);
#define CFG_SHELF(_name, _con, _zone, _pop, _lay, _orient, _fita, _fits, _style, _size) \
cf_es = E_NEW(E_Config_Shelf, 1); \
cf_es->name = evas_stringshare_add(_name); \
cf_es->container = _con; \
cf_es->zone = _zone; \
cf_es->popup = _pop; \
cf_es->layer = _lay; \
cf_es->orient = _orient; \
cf_es->fit_along = _fita; \
cf_es->fit_size = _fits; \
cf_es->style = evas_stringshare_add(_style); \
cf_es->size = _size; \
e_config->shelves = evas_list_append(e_config->shelves, cf_es)
/* shelves for 4 zones on head 0 by default */
CFG_SHELF("shelf", 0, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
CFG_SHELF("shelf", 0, 1,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
CFG_SHELF("shelf", 0, 2,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
CFG_SHELF("shelf", 0, 3,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
/* shelves for heada 1, 2, and 3 by default */
CFG_SHELF("shelf", 1, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
CFG_SHELF("shelf", 2, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
CFG_SHELF("shelf", 3, 0,
1, 200, E_GADCON_ORIENT_BOTTOM,
1, 0, "default", 40);
}
{
E_Config_Gadcon *cf_gc;
E_Config_Gadcon_Client *cf_gcc;
#define CFG_GADCON(_name, _id) \
cf_gc = E_NEW(E_Config_Gadcon, 1);\
cf_gc->name = evas_stringshare_add(_name); \
cf_gc->id = evas_stringshare_add(_id); \
e_config->gadcons = evas_list_append(e_config->gadcons, cf_gc)
#define CFG_GADCON_CLIENT(_name, _id, _res, _size, _pos, _style, _autoscr, _resizable) \
cf_gcc = E_NEW(E_Config_Gadcon_Client, 1); \
cf_gcc->name = evas_stringshare_add(_name); \
cf_gcc->id = evas_stringshare_add(_id); \
cf_gcc->geom.res = _res; \
cf_gcc->geom.size = _size; \
cf_gcc->geom.pos = _pos; \
if (_style) cf_gcc->style = evas_stringshare_add(_style); \
else cf_gcc->style = NULL; \
cf_gcc->autoscroll = _autoscr; \
cf_gcc->resizable = _resizable; \
cf_gc->clients = evas_list_append(cf_gc->clients, cf_gcc)
/* the default shelf on the default head/zone */
CFG_GADCON("shelf", "0");
CFG_GADCON_CLIENT("start", "default", 800, 32,
0, NULL, 0, 0);
CFG_GADCON_CLIENT("pager", "default", 800, 120,
32, "inset", 0, 0);
CFG_GADCON_CLIENT("ibar", "default", 800, 200,
400 - (16 / 2), "inset", 1, 0);
CFG_GADCON_CLIENT("temperature", "default", 800, 32,
800 - (4 * 32), NULL, 0, 0);
CFG_GADCON_CLIENT("cpufreq", "default", 800, 32,
800 - (3 * 32), NULL, 0, 0);
CFG_GADCON_CLIENT("battery", "default", 800, 32,
800 - (2 * 32), NULL, 0, 0);
CFG_GADCON_CLIENT("clock", "default", 800, 32,
800 - (1 * 32), NULL, 0, 0);
/* additional shelves for up to 3 more heads by default */
CFG_GADCON("shelf", "1");
CFG_GADCON_CLIENT("pager", "default2", 800, 120,
0, "inset", 0, 0);
CFG_GADCON_CLIENT("ibar", "default2", 800, 16,
400 - (16 / 2), "inset", 1, 0);
cf_gc = E_NEW(E_Config_Gadcon, 1);
cf_gc->name = evas_stringshare_add("shelf");
cf_gc->id = evas_stringshare_add("0");
e_config->gadcons = evas_list_append(e_config->gadcons, cf_gc);
CFG_GADCON("shelf", "2");
CFG_GADCON_CLIENT("pager", "default3", 800, 120,
0, "inset", 0, 0);
CFG_GADCON_CLIENT("ibar", "default2", 800, 16,
400 - (16 / 2), "inset", 1, 0);
cf_gcc = E_NEW(E_Config_Gadcon_Client, 1);
cf_gcc->name = evas_stringshare_add("ibar");
cf_gcc->id = evas_stringshare_add("default");
cf_gcc->geom.res = 800;
cf_gcc->geom.size = 200;
cf_gcc->geom.pos = 400 - (cf_gcc->geom.size / 2);
cf_gcc->style = evas_stringshare_add("inset");
cf_gcc->autoscroll = 0;
cf_gc->clients = evas_list_append(cf_gc->clients, cf_gcc);
cf_gcc = E_NEW(E_Config_Gadcon_Client, 1);
cf_gcc->name = evas_stringshare_add("clock");
cf_gcc->id = evas_stringshare_add("default");
cf_gcc->geom.res = 800;
cf_gcc->geom.size = 32;
cf_gcc->geom.pos = 800 - (cf_gcc->geom.size);
cf_gcc->style = NULL;
cf_gcc->autoscroll = 0;
cf_gc->clients = evas_list_append(cf_gc->clients, cf_gcc);
cf_gcc = E_NEW(E_Config_Gadcon_Client, 1);
cf_gcc->name = evas_stringshare_add("start");
cf_gcc->id = evas_stringshare_add("default");
cf_gcc->geom.res = 800;
cf_gcc->geom.size = 32;
cf_gcc->geom.pos = 0;
cf_gcc->style = NULL;
cf_gcc->autoscroll = 0;
cf_gc->clients = evas_list_append(cf_gc->clients, cf_gcc);
CFG_GADCON("shelf", "3");
CFG_GADCON_CLIENT("pager", "default4", 800, 120,
0, "inset", 0, 0);
CFG_GADCON_CLIENT("ibar", "default2", 800, 16,
400 - (16 / 2), "inset", 1, 0);
}
#endif
// IFCFGEND;
IFCFGEND;
#if 0 /* example of new config */
IFCFG(0x008e); /* the version # where this value(s) was introduced */
IFCFG(0x0090); /* the version # where this value(s) was introduced */
e_config->new_value = 10; /* set the value(s) */
IFCFGEND;
#endif

View File

@ -50,7 +50,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
/* increment this whenever a new set of configvalues are added but the users
* config doesn't need top be wiped - simply new values need to be put in
*/
#define E_CONFIG_FILE_GENERATION 0x008e
#define E_CONFIG_FILE_GENERATION 0x0093
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
#define E_EVAS_ENGINE_DEFAULT 0
@ -317,6 +317,7 @@ struct _E_Config_Gadcon_Client
} geom;
const char *style;
unsigned char autoscroll;
unsigned char resizable;
};
struct _E_Config_Shelf

View File

@ -3,6 +3,11 @@
*/
#include "e.h"
/* FIXME: broken when drop areas intersect
* (sub window has drop area on top of lower window or desktop -
* also shutdown is broken (walking list and deleting from the list as u go
* in this code is broken)
*/
/*
* TODO:
* - Let an internal drag work with several types.

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@ struct _E_Gadcon
struct {
void (*func) (void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
void *data;
} resize_request;
} resize_request, min_size_request;
struct {
Evas_Object *(*func) (void *data, E_Gadcon_Client *gcc, const char *style);
void *data;
@ -91,20 +91,30 @@ struct _E_Gadcon_Client
char *name;
char *id;
Evas_Object *o_base;
Evas_Object *o_box;
Evas_Object *o_frame;
Evas_Object *o_control;
Evas_Object *o_event;
E_Gadcon_Client_Class client_class;
E_Gadcon_Client_Class *client_class;
void *data;
struct {
int pos, size, res;
} config;
struct {
Evas_Coord w, h;
} pad;
} pad, min, aspect;
unsigned char inset : 1;
unsigned char autoscroll : 1;
unsigned char resizable : 1;
Ecore_Timer *scroll_timer;
Ecore_Animator *scroll_animator;
double scroll_pos;
double scroll_wanted;
E_Menu *menu;
unsigned char moving : 1;
Evas_Coord dx, dy, sx, sy;
unsigned char resizing : 1;
Evas_Coord dx, dy, sx, sy, sw, sh;
};
EAPI int e_gadcon_init(void);
@ -113,10 +123,13 @@ EAPI void e_gadcon_provider_register(E_Gadcon_Client_Class *cc);
EAPI void e_gadcon_provider_unregister(E_Gadcon_Client_Class *cc);
EAPI E_Gadcon *e_gadcon_swallowed_new(const char *name, char *id, Evas_Object *obj, char *swallow_name);
EAPI void e_gadcon_swallowed_min_size_set(E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
EAPI void e_gadcon_min_size_request_callback_set(E_Gadcon *gc, void (*func) (void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h), void *data);
EAPI void e_gadcon_size_request_callback_set(E_Gadcon *gc, void (*func) (void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h), void *data);
EAPI void e_gadcon_frame_request_callback_set(E_Gadcon *gc, Evas_Object *(*func) (void *data, E_Gadcon_Client *gcc, const char *style), void *data);
EAPI void e_gadcon_layout_policy_set(E_Gadcon *gc, E_Gadcon_Layout_Policy layout_policy);
EAPI void e_gadcon_populate(E_Gadcon *gc);
EAPI void e_gadcon_unpopulate(E_Gadcon *gc);
EAPI void e_gadcon_populate_class(E_Gadcon *gc, E_Gadcon_Client_Class *cc);
EAPI void e_gadcon_orient(E_Gadcon *gc, E_Gadcon_Orient orient);
EAPI void e_gadcon_edit_begin(E_Gadcon *gc);
EAPI void e_gadcon_edit_end(E_Gadcon *gc);
@ -128,11 +141,16 @@ EAPI void e_gadcon_ecore_evas_set(E_Gadcon *gc, Ecore_Evas *ee);
EAPI int e_gadcon_canvas_zone_geometry_get(E_Gadcon *gc, int *x, int *y, int *w, int *h);
EAPI E_Gadcon_Client *e_gadcon_client_new(E_Gadcon *gc, char *name, char *id, char *style, Evas_Object *base_obj);
EAPI void e_gadcon_client_edit_begin(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_edit_end(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_size_request(E_Gadcon_Client *gcc, Evas_Coord w, Evas_Coord h);
EAPI void e_gadcon_client_min_size_set(E_Gadcon_Client *gcc, Evas_Coord w, Evas_Coord h);
EAPI void e_gadcon_client_aspect_set(E_Gadcon_Client *gcc, int w, int h);
EAPI void e_gadcon_client_edit_begin(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_edit_end(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_autoscroll_set(E_Gadcon_Client *gcc, int autoscroll);
EAPI void e_gadcon_client_resizable_set(E_Gadcon_Client *gcc, int resizable);
EAPI void e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu, int flags);
EAPI void e_gadcon_client_util_menu_attach(E_Gadcon_Client *gcc);
#endif
#endif

View File

@ -129,5 +129,6 @@
#include "e_gadcon.h"
#include "e_shelf.h"
#include "e_tlist.h"
#include "e_widget_tlist.h"
#include "e_widget_preview.h"
#include "e_int_config_paths.h"

View File

@ -676,7 +676,8 @@ main(int argc, char **argv)
e_test();
/* FIXME: for testing only */
// e_shelf_config_init();
//
e_shelf_config_init();
/* no longer starting up */
starting = 0;

View File

@ -64,6 +64,83 @@ _e_place_cb_sort_cmp(const void *v1, const void *v2)
return (*((int *)v1)) - (*((int *)v2));
}
static int
_e_place_coverage_border_add(E_Zone *zone, Evas_List *skiplist, int ar, int x, int y, int w, int h)
{
Evas_List *ll;
E_Border_List *bl;
E_Border *bd;
int x2, y2, w2, h2;
int ok;
int iw, ih;
int x0, x00, y0, y00;
bl = e_container_border_list_first(zone->container);
while ((bd = e_container_border_list_next(bl)))
{
ok = 1;
x2 = (bd->x - zone->x); y2 = (bd->y - zone->y); w2 = bd->w; h2 = bd->h;
for (ll = skiplist; ll; ll = ll->next)
{
if (ll->data == bd)
{
ok = 0;
break;
}
}
if ((ok) && (bd->visible) && E_INTERSECTS(x, y, w, h, x2, y2, w2, h2))
{
x0 = x;
if (x < x2) x0 = x2;
x00 = (x + w);
if ((x2 + w2) < (x + w)) x00 = (x2 + w2);
y0 = y;
if (y < y2) y0 = y2;
y00 = (y + h);
if ((y2 + h2) < (y + h)) y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - y0;
ar += (iw * ih);
}
}
e_container_border_list_free(bl);
return ar;
}
static int
_e_place_coverage_shelf_add(E_Zone *zone, int ar, int x, int y, int w, int h)
{
Evas_List *l;
E_Shelf *es;
int x2, y2, w2, h2;
int ok;
int iw, ih;
int x0, x00, y0, y00;
for (l = e_shelf_list(); l; l = l->next)
{
es = l->data;
if (es->zone != zone) continue;
x2 = es->x; y2 = es->y; w2 = es->w; h2 = es->h;
if (E_INTERSECTS(x, y, w, h, x2, y2, w2, h2))
{
x0 = x;
if (x < x2) x0 = x2;
x00 = (x + w);
if ((x2 + w2) < (x + w)) x00 = (x2 + w2);
y0 = y;
if (y < y2) y0 = y2;
y00 = (y + h);
if ((y2 + h2) < (y + h)) y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - y0;
ar += (iw * ih) * 100; /* 100 == 100 times more unlikely for overlap than a normal window */
}
}
return ar;
}
EAPI int
e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w, int h, int *rx, int *ry)
{
@ -90,59 +167,9 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
x -= zone->x;
y -= zone->y;
zw = zone->w;
zh = zone->h;
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_ANTIGADGET)
{
Evas_List *l;
int cx1, cx2, cy1, cy2;
cx1 = zone->x;
cy1 = zone->y;
cx2 = zone->x + zone->w;
cy2 = zone->y + zone->h;
/* Find the smallest box */
for (l = zone->container->gadman->clients; l; l = l->next)
{
E_Gadman_Client *gmc;
double ax, ay;
gmc = l->data;
if ((gmc->zone != zone)) continue;
ax = gmc->ax;
ay = gmc->ay;
if (((ax == 0.0) || (ax == 1.0)) &&
((ay == 0.0) || (ay == 1.0)))
{
/* corner gadget */
/* Fake removal from one alignment :) */
if (gmc->w > gmc->h)
ax = 0.5;
else
ay = 0.5;
}
if ((ax == 0.0) && (gmc->x + gmc->w) > cx1)
cx1 = (gmc->x + gmc->w);
else if ((ax == 1.0) && (gmc->x < cx2))
cx2 = gmc->x;
else if ((ay == 0.0) && ((gmc->y + gmc->h) > cy1))
cy1 = (gmc->y + gmc->h);
else if ((ay == 1.0) && (gmc->y < cy2))
cy2 = gmc->y;
}
zw = cx2 - cx1;
zh = cy2 - cy1;
}
else
{
zw = zone->w;
zh = zone->h;
}
u_x = calloc(zw + 1, sizeof(char));
u_y = calloc(zh + 1, sizeof(char));
@ -150,7 +177,135 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
a_x[1] = zw;
a_y[0] = 0;
a_y[1] = zh;
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_ANTIGADGET)
{
Evas_List *l;
for (l = zone->container->gadman->clients; l; l = l->next)
{
E_Gadman_Client *gmc;
int bx, by, bw, bh;
gmc = l->data;
if ((gmc->zone != zone)) continue;
bx = gmc->x;
by = gmc->y;
bw = gmc->w;
bh = gmc->h;
if (E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh))
{
if ((bx > 0) && (bx <= zw) && (!u_x[bx]))
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (((bx + bw) > 0) && ((bx + bw) <= zw) && (!u_x[bx + bw]))
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if ((by > 0) && (by <= zh) && (!u_y[by]))
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (((by + bh) > 0) && ((by + bh) <= zh) && (!u_y[by + bh]))
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
}
for (l = e_shelf_list(); l; l = l->next)
{
E_Shelf *es;
es = l->data;
if (es->zone == zone)
{
int bx, by, bw, bh;
bx = es->x;
by = es->y;
bw = es->w;
bh = es->h;
if (E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh))
{
if ((bx > 0) && (bx <= zw) && (!u_x[bx]))
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (((bx + bw) > 0) && ((bx + bw) <= zw) && (!u_x[bx + bw]))
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if ((by > 0) && (by <= zh) && (!u_y[by]))
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (((by + bh) > 0) && ((by + bh) <= zh) && (!u_y[by + bh]))
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
}
}
}
bl = e_container_border_list_first(zone->container);
while ((bd = e_container_border_list_next(bl)))
{
@ -240,252 +395,72 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
{
int ar = 0;
bl = e_container_border_list_first(zone->container);
while ((bd = e_container_border_list_next(bl)))
{
int x1, y1, w1, h1, x2, y2, w2, h2;
int ok;
ok = 1;
x1 = a_x[i];
y1 = a_y[j];
w1 = w;
h1 = h;
x2 = (bd->x - zone->x);
y2 = (bd->y - zone->y);
w2 = bd->w;
h2 = bd->h;
for (ll = skiplist; ll; ll = ll->next)
{
if (ll->data == bd)
{
ok = 0;
break;
}
}
if ((ok) && (bd->visible) &&
E_INTERSECTS(x1, y1, w1, h1, x2, y2, w2, h2))
{
int iw, ih;
int x0, x00, y0, y00;
x0 = x1;
if (x1 < x2)
x0 = x2;
x00 = (x1 + w1);
if ((x2 + w2) < (x1 + w1))
x00 = (x2 + w2);
y0 = y1;
if (y1 < y2)
y0 = y2;
y00 = (y1 + h1);
if ((y2 + h2) < (y1 + h1))
y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - y0;
ar += (iw * ih);
}
}
e_container_border_list_free(bl);
ar = _e_place_coverage_border_add(zone, skiplist, ar,
a_x[i], a_y[j],
w, h);
ar = _e_place_coverage_shelf_add(zone, ar,
a_x[i], a_y[j],
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i];
*ry = a_y[j];
if (ar == 0)
goto done;
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j] < (zh - h)))
{
int ar = 0;
bl = e_container_border_list_first(zone->container);
while ((bd = e_container_border_list_next(bl)))
{
int x1, y1, w1, h1, x2, y2, w2, h2;
int ok;
ok = 1;
x1 = a_x[i + 1] - w;
y1 = a_y[j];
w1 = w;
h1 = h;
x2 = (bd->x - zone->x);
y2 = (bd->y - zone->y);
w2 = bd->w;
h2 = bd->h;
for (ll = skiplist; ll; ll = ll->next)
{
if (ll->data == bd)
{
ok = 0;
break;
}
}
if ((ok) && (bd->visible) &&
E_INTERSECTS(x1, y1, w1, h1, x2, y2, w2, h2))
{
int iw, ih;
int x0, x00, y0, y00;
x0 = x1;
if (x1 < x2)
x0 = x2;
x00 = (x1 + w1);
if ((x2 + w2) < (x1 + w1))
x00 = (x2 + w2);
y0 = y1;
if (y1 < y2)
y0 = y2;
y00 = (y1 + h1);
if ((y2 + h2) < (y1 + h1))
y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - y0;
ar += (iw * ih);
}
}
e_container_border_list_free(bl);
ar = _e_place_coverage_border_add(zone, skiplist, ar,
a_x[i + 1] - w, a_y[j],
w, h);
ar = _e_place_coverage_shelf_add(zone, ar,
a_x[i + 1] - w, a_y[j],
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i + 1] - w;
*ry = a_y[j];
if (ar == 0)
goto done;
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j + 1] - h > 0))
{
int ar = 0;
bl = e_container_border_list_first(zone->container);
while ((bd = e_container_border_list_next(bl)))
{
int x1, y1, w1, h1, x2, y2, w2, h2;
int ok;
ok = 1;
x1 = a_x[i + 1] - w;
y1 = a_y[j + 1] - h;
w1 = w;
h1 = h;
x2 = (bd->x - zone->x);
y2 = (bd->y - zone->y);
w2 = bd->w;
h2 = bd->h;
for (ll = skiplist; ll; ll = ll->next)
{
if (ll->data == bd)
{
ok = 0;
break;
}
}
if ((ok) && (bd->visible) &&
E_INTERSECTS(x1, y1, w1, h1, x2, y2, w2, h2))
{
int iw, ih;
int x0, x00, y0, y00;
x0 = x1;
if (x1 < x2)
x0 = x2;
x00 = (x1 + w1);
if ((x2 + w2) < (x1 + w1))
x00 = (x2 + w2);
y0 = y1;
if (y1 < y2)
y0 = y2;
y00 = (y1 + h1);
if ((y2 + h2) < (y1 + h1))
y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - y0;
ar += (iw * ih);
}
}
e_container_border_list_free(bl);
ar = _e_place_coverage_border_add(zone, skiplist, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
ar = _e_place_coverage_shelf_add(zone, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i + 1] - w;
*ry = a_y[j + 1] - h;
if (ar == 0)
goto done;
if (ar == 0) goto done;
}
}
if ((a_x[i] < (zw - w)) && (a_y[j + 1] - h > 0))
{
int ar = 0;
bl = e_container_border_list_first(zone->container);
while ((bd = e_container_border_list_next(bl)))
{
int x1, y1, w1, h1, x2, y2, w2, h2;
int ok;
ok = 1;
x1 = a_x[i];
y1 = a_y[j + 1] - h;
w1 = w;