From cb15f5013ca5747d8fd419aab3808040adc0d659 Mon Sep 17 00:00:00 2001 From: rephorm Date: Fri, 4 Jan 2002 04:18:38 +0000 Subject: [PATCH] Give the iconbars some substance. If a bit named Resist with class Decoration is added to .e_iconbar.bits.db, it will resist window movement. Makes it easy to line up windows along the edge of the iconbar. I'll commit an updated default db. SVN revision: 5807 --- src/desktops.c | 1 + src/desktops.h | 1 + src/iconbar.c | 21 +++++++++++++++++++++ src/iconbar.h | 4 +++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/desktops.c b/src/desktops.c index a084792e0..aa7a2097b 100644 --- a/src/desktops.c +++ b/src/desktops.c @@ -199,6 +199,7 @@ e_desktops_init_file_display(E_Desktop *desk) v->options.back_pixmap = 1; v->is_desktop = 1; + desk->view = v; /* fixme: later */ /* uncomment this and comment out the next line for some tress testing */ /* e_strdup(v->dir, "/dev"); */ diff --git a/src/desktops.h b/src/desktops.h index a67aac087..6d857c27b 100644 --- a/src/desktops.h +++ b/src/desktops.h @@ -32,6 +32,7 @@ struct _E_Desktop int x, y; } area; } desk; + E_View *view; int changed; }; diff --git a/src/iconbar.c b/src/iconbar.c index 13f87a47d..bf93bb384 100644 --- a/src/iconbar.c +++ b/src/iconbar.c @@ -1281,3 +1281,24 @@ ib_child_handle(Ecore_Event *ev) D_RETURN; } + +E_Rect * +e_iconbar_get_resist_rect(E_Iconbar *ib) +{ + double x, y, w, h; + int resist = 32; + E_Rect *r; + + D_ENTER; + + ebits_get_named_bit_geometry(ib->bit, "Resist", &x, &y, &w, &h); + + r = NEW(E_Rect, 1); + r->x = x; + r->y = y; + r->w = w; + r->h = h; + r->v1 = resist; + + D_RETURN_(r); +} diff --git a/src/iconbar.h b/src/iconbar.h index 8ded6f7d3..3f13897ca 100644 --- a/src/iconbar.h +++ b/src/iconbar.h @@ -6,6 +6,7 @@ #include "exec.h" #include "view.h" #include "object.h" +#include "resist.h" typedef struct _E_Iconbar_Icon E_Iconbar_Icon; #ifndef E_ICONBAR_TYPEDEF @@ -72,5 +73,6 @@ void e_iconbar_file_add(E_View *v, char *file); void e_iconbar_file_delete(E_View *v, char *file); void e_iconbar_file_change(E_View *v, char *file); void e_iconbar_save_out_final(E_Iconbar *ib); - +E_Rect * e_iconbar_get_resist_rect(E_Iconbar *ib); + #endif