Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h Makefile.am borders.c config.c coords.c dialog.h draw.c ewin-ops.c ewins.c ewins.h ewmh.c finders.c groups.c hints.c iconify.c ipc.c menus-misc.c menus.c moveresize.c size.c slideout.c snaps.c windowmatch.c zoom.c Added Files: borders.h Log Message: Split off borders.h. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.519 retrieving revision 1.520 diff -u -3 -r1.519 -r1.520 --- E.h 8 Dec 2005 18:45:39 -0000 1.519 +++ E.h 22 Dec 2005 18:43:14 -0000 1.520 @@ -252,16 +252,19 @@ * Types */ -struct _imageclass; -struct _imagestate; -struct _textclass; -struct _textstate; +struct _border; typedef struct _ewin EWin; typedef struct _ecursor ECursor; typedef struct _client Client; +typedef struct _constraints +{ + int min, max; +} +Constraints; + typedef struct { void (*func) (const char *line, Client * c); @@ -294,74 +297,6 @@ } VirtRoot; -typedef struct _constraints -{ - int min, max; -} -Constraints; - -typedef struct _winpoint -{ - int originbox; - struct - { - int percent; - int absolute; - } - x , y; -} -WinPoint; - -typedef struct _geometry -{ - Constraints width, height; - WinPoint topleft, bottomright; -} -Geometry; - -typedef struct _winpart -{ - Geometry geom; - struct _imageclass *iclass; - struct _actionclass *aclass; - struct _textclass *tclass; - ECursor *ec; - signed char ontop; - int flags; - char keep_for_shade; -} -WinPart; - -typedef struct _border -{ - char *name; - char *group_border_name; - Imlib_Border border; - int num_winparts; - WinPart *part; - char changes_shape; - char shadedir; - char throwaway; - unsigned int ref_count; - struct _actionclass *aclass; -} -Border; - -typedef struct _ewinbit -{ - EWin *ewin; /* Belongs to */ - Window win; - int x, y, w, h; - int cx, cy, cw, ch; - int state; - char expose; - char no_expose; - char left; - struct _imagestate *is; - struct _textstate *ts; -} -EWinBit; - /* Configuration parameters */ typedef struct { @@ -690,27 +625,6 @@ void ArrangeEwinCenteredXY(EWin * ewin, int *px, int *py); void ArrangeEwins(const char *params); -/* borders.c */ -void BorderIncRefcount(const Border * b); -void BorderDecRefcount(const Border * b); -const char *BorderGetName(const Border * b); -int BorderConfigLoad(FILE * fs); -void EwinBorderSelect(EWin * ewin); -void EwinBorderDetach(EWin * ewin); -void EwinBorderSetTo(EWin * ewin, const Border * b); -void EwinBorderDraw(EWin * ewin, int do_shape, int do_paint); -void EwinBorderCalcSizes(EWin * ewin, int propagate); -void EwinBorderMinShadeSize(EWin * ewin, int *mw, int *mh); -void EwinBorderUpdateInfo(EWin * ewin); -void EwinBorderUpdateState(EWin * ewin); -void EwinBorderEventsConfigure(EWin * ewin, int mode); -void EwinSetBorder(EWin * ewin, const Border * b, int apply); -void EwinSetBorderByName(EWin * ewin, const char *name); -int BorderWinpartIndex(EWin * ewin, Window win); -Border *BorderCreateFiller(int left, int right, int top, - int bottom); -void BordersSetupFallback(void); - /* comms.c */ void CommsInit(void); void CommsSend(Client * c, const char *s); @@ -1084,7 +998,7 @@ /* windowmatch.c */ int WindowMatchConfigLoad(FILE * fs); -Border *WindowMatchEwinBorder(const EWin * ewin); +struct _border *WindowMatchEwinBorder(const EWin * ewin); const char *WindowMatchEwinIcon(const EWin * ewin); void WindowMatchEwinOps(EWin * ewin); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Makefile.am,v retrieving revision 1.62 retrieving revision 1.63 diff -u -3 -r1.62 -r1.63 --- Makefile.am 27 Nov 2005 13:11:03 -0000 1.62 +++ Makefile.am 22 Dec 2005 18:43:14 -0000 1.63 @@ -23,6 +23,7 @@ backgrounds.c \ backgrounds.h \ borders.c \ + borders.h \ buttons.c \ buttons.h \ cmclass.c \ =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v retrieving revision 1.279 retrieving revision 1.280 diff -u -3 -r1.279 -r1.280 --- borders.c 27 Nov 2005 13:11:04 -0000 1.279 +++ borders.c 22 Dec 2005 18:43:14 -0000 1.280 @@ -23,6 +23,7 @@ */ #include "E.h" #include "aclass.h" +#include "borders.h" #include "ewins.h" #include "hints.h" #include "iclass.h" @@ -41,12 +42,6 @@ static void BorderWinpartHandleEvents(XEvent * ev, void *prm); static void BorderFrameHandleEvents(XEvent * ev, void *prm); -void -EwinBorderUpdateState(EWin * ewin) -{ - EwinBorderDraw(ewin, 0, 0); -} - static void BorderWinpartRealise(EWin * ewin, int i) { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v retrieving revision 1.142 retrieving revision 1.143 diff -u -3 -r1.142 -r1.143 --- config.c 27 Nov 2005 13:11:04 -0000 1.142 +++ config.c 22 Dec 2005 18:43:14 -0000 1.143 @@ -24,6 +24,7 @@ #include "E.h" #include "aclass.h" #include "backgrounds.h" +#include "borders.h" #include "buttons.h" #include "conf.h" #include "iclass.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/coords.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- coords.c 5 Nov 2005 17:12:53 -0000 1.38 +++ coords.c 22 Dec 2005 18:43:15 -0000 1.39 @@ -43,6 +43,7 @@ int cx, cy, cw, ch; EObj *eo = coord_eo; Imlib_Border *pad; + int bl, br, bt, bb; if (!Conf.movres.mode_info) return; @@ -85,13 +86,10 @@ case 0: case 1: case 2: - cx = - x + (ewin->shape_w + ewin->border->border.left + - ewin->border->border.right - cw) / 2 + + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); + cx = x + (ewin->shape_w + bl + br - cw) / 2 + EoGetX(EoGetDesk(ewin)); - cy = - y + (ewin->shape_h + ewin->border->border.top + - ewin->border->border.bottom - ch) / 2 + + cy = y + (ewin->shape_h + bt + bb - ch) / 2 + EoGetY(EoGetDesk(ewin)); break; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/dialog.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- dialog.h 30 Oct 2005 19:40:49 -0000 1.2 +++ dialog.h 22 Dec 2005 18:43:15 -0000 1.3 @@ -48,6 +48,9 @@ #define DLG_OAC 7 #define DLG_OC 5 +struct _imageclass; +struct _textclass; + typedef struct _dialog Dialog; typedef struct _ditem DItem; typedef void (DialogCallbackFunc) (Dialog * d, int val, void *data); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -3 -r1.87 -r1.88 --- draw.c 19 Nov 2005 15:47:10 -0000 1.87 +++ draw.c 22 Dec 2005 18:43:15 -0000 1.88 @@ -628,6 +628,7 @@ static Font font = 0; Window root = VRoot.win; int x1, y1, w1, h1, i, j, dx, dy; + int bl, br, bt, bb; char str[32]; switch (md) @@ -686,6 +687,8 @@ w = ewin->shape_w; h = ewin->shape_h; + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); + if (!gc) { XGCValues gcv; @@ -726,94 +729,50 @@ Esnprintf(str, sizeof(str), "%i", (y2) - (y1) + 1); \ XDrawString(disp, root, gc, (x1) + 10, ((y1) + (y2)) / 2, str, strlen(str)); \ } -#define DO_DRAW_MODE_1(aa, bb, cc, dd) \ +#define DO_DRAW_MODE_1(_a, _b, _c, _d) \ if (!font) \ font = XLoadFont(disp, "-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); \ XSetFont(disp, gc, font); \ - if (cc < 3) cc = 3; \ - if (dd < 3) dd = 3; \ - DRAW_H_ARROW(aa + ewin->border->border.left, \ - aa + ewin->border->border.left + cc - 1, \ - bb + ewin->border->border.top + dd - 16); \ - DRAW_H_ARROW(0, \ - aa - 1, \ - bb + ewin->border->border.top + (dd / 2)); \ - DRAW_H_ARROW(aa + cc + ewin->border->border.left + ewin->border->border.right, \ - VRoot.w - 1, \ - bb + ewin->border->border.top + (dd / 2)); \ - DRAW_V_ARROW(bb + ewin->border->border.top, \ - bb + ewin->border->border.top + dd - 1, \ - aa + ewin->border->border.left + 16); \ - DRAW_V_ARROW(0, \ - bb - 1, \ - aa + ewin->border->border.left + (cc / 2)); \ - DRAW_V_ARROW(bb + dd + ewin->border->border.top + ewin->border->border.bottom, \ - VRoot.h - 1, \ - aa + ewin->border->border.left + (cc / 2)); \ - XDrawLine(disp, root, gc, aa, 0, aa, VRoot.h); \ - XDrawLine(disp, root, gc, \ - aa + cc + ewin->border->border.left + \ - ewin->border->border.right - 1, 0, \ - aa + cc + ewin->border->border.left + \ - ewin->border->border.right - 1, VRoot.h); \ - XDrawLine(disp, root, gc, 0, bb, VRoot.w, bb); \ - XDrawLine(disp, root, gc, 0, \ - bb + dd + ewin->border->border.top + \ - ewin->border->border.bottom - 1, VRoot.w, \ - bb + dd + ewin->border->border.top + \ - ewin->border->border.bottom - 1); \ - XDrawRectangle(disp, root, gc, aa + ewin->border->border.left + 1, \ - bb + ewin->border->border.top + 1, cc - 3, dd - 3); - -#define DO_DRAW_MODE_2(aa, bb, cc, dd) \ - if (cc < 3) cc = 3; \ - if (dd < 3) dd = 3; \ - XDrawRectangle(disp, root, gc, aa, bb, \ - cc + ewin->border->border.left + \ - ewin->border->border.right - 1, \ - dd + ewin->border->border.top + \ - ewin->border->border.bottom - 1); \ - XDrawRectangle(disp, root, gc, aa + ewin->border->border.left + 1, \ - bb + ewin->border->border.top + 1, cc - 3, dd - 3); + if (_c < 3) _c = 3; \ + if (_d < 3) _d = 3; \ + DRAW_H_ARROW(_a + bl, _a + bl + _c - 1, _b + bt + _d - 16); \ + DRAW_H_ARROW(0, _a - 1, _b + bt + (_d / 2)); \ + DRAW_H_ARROW(_a + _c + bl + br, VRoot.w - 1, _b + bt + (_d / 2)); \ + DRAW_V_ARROW(_b + bt, _b + bt + _d - 1, _a + bl + 16); \ + DRAW_V_ARROW(0, _b - 1, _a + bl + (_c / 2)); \ + DRAW_V_ARROW(_b + _d + bt + bb, VRoot.h - 1, _a + bl + (_c / 2)); \ + XDrawLine(disp, root, gc, _a, 0, _a, VRoot.h); \ + XDrawLine(disp, root, gc, _a + _c + bl + br - 1, 0, _a + _c + bl + br - 1, VRoot.h); \ + XDrawLine(disp, root, gc, 0, _b, VRoot.w, _b); \ + XDrawLine(disp, root, gc, 0, _b + _d + bt + bb - 1, VRoot.w, _b + _d + bt + bb - 1); \ + XDrawRectangle(disp, root, gc, _a + bl + 1, _b + bt + 1, _c - 3, _d - 3); + +#define DO_DRAW_MODE_2(_a, _b, _c, _d) \ + if (_c < 3) _c = 3; \ + if (_d < 3) _d = 3; \ + XDrawRectangle(disp, root, gc, _a, _b, _c + bl + br - 1, _d + bt + bb - 1); \ + XDrawRectangle(disp, root, gc, _a + bl + 1, _b + bt + 1, _c - 3, _d - 3); -#define DO_DRAW_MODE_3(aa, bb, cc, dd) \ +#define DO_DRAW_MODE_3(_a, _b, _c, _d) \ XSetFillStyle(disp, gc, FillStippled); \ XSetStipple(disp, gc, b2); \ - if ((cc + ewin->border->border.left + ewin->border->border.right > 0) && \ - (ewin->border->border.top > 0)) \ - XFillRectangle(disp, root, gc, aa, bb, \ - cc + ewin->border->border.left + \ - ewin->border->border.right, \ - ewin->border->border.top); \ - if ((cc + ewin->border->border.left + ewin->border->border.right > 0) && \ - (ewin->border->border.bottom > 0)) \ - XFillRectangle(disp, root, gc, aa, bb + dd + \ - ewin->border->border.top, \ - cc + ewin->border->border.left + \ - ewin->border->border.right, \ - ewin->border->border.bottom); \ - if ((dd > 0) && (ewin->border->border.left > 0)) \ - XFillRectangle(disp, root, gc, aa, bb + ewin->border->border.top, \ - ewin->border->border.left, \ - dd); \ - if ((dd > 0) && (ewin->border->border.right > 0)) \ - XFillRectangle(disp, root, gc, aa + cc + ewin->border->border.left, \ - bb + ewin->border->border.top, \ - ewin->border->border.right, \ - dd); \ + if ((_c + bl + br > 0) && (bt > 0)) \ + XFillRectangle(disp, root, gc, _a, _b, _c + bl + br, bt); \ + if ((_c + bl + br > 0) && (bb > 0)) \ + XFillRectangle(disp, root, gc, _a, _b + _d + bt, _c + bl + br, bb); \ + if ((_d > 0) && (bl > 0)) \ + XFillRectangle(disp, root, gc, _a, _b + bt, bl, _d); \ + if ((_d > 0) && (br > 0)) \ + XFillRectangle(disp, root, gc, _a + _c + bl, _b + bt, br, _d); \ XSetStipple(disp, gc, b3); \ - if ((cc > 0) && (dd > 0)) \ - XFillRectangle(disp, root, gc, aa + ewin->border->border.left + 1, \ - bb + ewin->border->border.top + 1, cc - 3, dd - 3); + if ((_c > 0) && (_d > 0)) \ + XFillRectangle(disp, root, gc, _a + bl + 1, _b + bt + 1, _c - 3, _d - 3); -#define DO_DRAW_MODE_4(aa, bb, cc, dd) \ +#define DO_DRAW_MODE_4(_a, _b, _c, _d) \ XSetFillStyle(disp, gc, FillStippled); \ XSetStipple(disp, gc, b2); \ - XFillRectangle(disp, root, gc, aa, bb, \ - cc + ewin->border->border.left + \ - ewin->border->border.right, \ - dd + ewin->border->border.top + \ - ewin->border->border.bottom); + XFillRectangle(disp, root, gc, _a, _b, _c + bl + br, _d + bt + bb); + if (md == 1) { if (firstlast > 0) =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -3 -r1.83 -r1.84 --- ewin-ops.c 1 Dec 2005 17:00:24 -0000 1.83 +++ ewin-ops.c 22 Dec 2005 18:43:15 -0000 1.84 @@ -22,6 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "E.h" +#include "borders.h" #include "desktops.h" #include "emodule.h" #include "eobj.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v retrieving revision 1.134 retrieving revision 1.135 diff -u -3 -r1.134 -r1.135 --- ewins.c 8 Dec 2005 18:45:41 -0000 1.134 +++ ewins.c 22 Dec 2005 18:43:15 -0000 1.135 @@ -23,6 +23,7 @@ */ #include "E.h" #include "aclass.h" +#include "borders.h" #include "desktops.h" #include "ecompmgr.h" #include "emodule.h" @@ -1471,6 +1472,35 @@ return (name && strlen(name)) ? name : NULL; } +const char * +EwinBorderGetName(const EWin * ewin) +{ + return (ewin->border) ? BorderGetName(ewin->border) : "?"; +} + +void +EwinBorderGetSize(const EWin * ewin, int *bl, int *br, int *bt, int *bb) +{ + const Border *b = ewin->border; + + if (!b) + { + *bl = *br = *bt = *bb = 0; + return; + } + + *bl = b->border.left; + *br = b->border.right; + *bt = b->border.top; + *bb = b->border.bottom; +} + +void +EwinBorderUpdateState(EWin * ewin) +{ + EwinBorderDraw(ewin, 0, 0); +} + int EwinIsOnScreen(const EWin * ewin) { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewins.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- ewins.h 7 Dec 2005 23:18:27 -0000 1.36 +++ ewins.h 22 Dec 2005 18:43:15 -0000 1.37 @@ -27,6 +27,8 @@ #include "eobj.h" #include "xwin.h" +struct _border; +struct _ewinbit; struct _desk; struct _group; struct _snapshot; @@ -68,10 +70,10 @@ char type; Window win_container; - const Border *border; - const Border *normal_border; - const Border *previous_border; - EWinBit *bits; + const struct _border *border; + const struct _border *normal_border; + const struct _border *previous_border; + struct _ewinbit *bits; struct { @@ -300,6 +302,10 @@ Window EwinGetClientWin(const EWin * ewin); const char *EwinGetName(const EWin * ewin); const char *EwinGetIconName(const EWin * ewin); +const char *EwinBorderGetName(const EWin * ewin); +void EwinBorderGetSize(const EWin * ewin, int *bl, int *br, + int *bt, int *bb); +void EwinBorderUpdateState(EWin * ewin); int EwinIsOnScreen(const EWin * ewin); void EwinRememberPositionSet(EWin * ewin); void EwinRememberPositionGet(EWin * ewin, struct _desk *dsk, =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -3 -r1.99 -r1.100 --- ewmh.c 19 Nov 2005 19:32:45 -0000 1.99 +++ ewmh.c 22 Dec 2005 18:43:15 -0000 1.100 @@ -424,10 +424,13 @@ if (ewin->border) { - val[0] = ewin->border->border.left; - val[1] = ewin->border->border.right; - val[2] = ewin->border->border.top; - val[3] = ewin->border->border.bottom; + int bl, br, bt, bb; + + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); + val[0] = (unsigned int)bl; + val[1] = (unsigned int)br; + val[2] = (unsigned int)bt; + val[3] = (unsigned int)bb; } else val[0] = val[1] = val[2] = val[3] = 0; @@ -579,7 +582,7 @@ EwinInhSetUser(ewin, move, 1); EwinInhSetUser(ewin, size, 1); ewin->props.donthide = 1; - EwinSetBorderByName(ewin, "BORDERLESS"); + ewin->props.no_border = 1; } else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK) { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/finders.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -3 -r1.44 -r1.45 --- finders.c 19 Nov 2005 15:47:10 -0000 1.44 +++ finders.c 22 Dec 2005 18:43:15 -0000 1.45 @@ -21,6 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "E.h" +#include "borders.h" #include "ewins.h" #include "groups.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/groups.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -3 -r1.74 -r1.75 --- groups.c 19 Nov 2005 15:47:10 -0000 1.74 +++ groups.c 22 Dec 2005 18:43:15 -0000 1.75 @@ -22,6 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "E.h" +#include "borders.h" #include "dialog.h" #include "emodule.h" #include "ewins.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -3 -r1.56 -r1.57 --- hints.c 19 Nov 2005 07:39:30 -0000 1.56 +++ hints.c 22 Dec 2005 18:43:15 -0000 1.57 @@ -24,7 +24,8 @@ * Feeble attempt to collect hint stuff in one place */ #include "E.h" -#include "desktops.h" /* Should not be here */ +#include "borders.h" /* FIXME - Should not be here */ +#include "desktops.h" /* FIXME - Should not be here */ #include "ecore-e16.h" #include "ewins.h" #include "hints.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v retrieving revision 1.190 retrieving revision 1.191 diff -u -3 -r1.190 -r1.191 --- iconify.c 12 Nov 2005 19:55:42 -0000 1.190 +++ iconify.c 22 Dec 2005 18:43:15 -0000 1.191 @@ -1517,26 +1517,24 @@ if (ib->auto_resize) { int add = 0; + int bl, br, bt, bb; + + EwinBorderGetSize(ib->ewin, &bl, &br, &bt, &bb); if (ib->orientation) { add = ib->max; if (ib->ewin->border) { - if ((ib->ewin->border->border.top + - ib->ewin->border->border.bottom + add) > VRoot.h) - add = - VRoot.h - (ib->ewin->border->border.top + - ib->ewin->border->border.bottom); + if ((bt + bb + add) > VRoot.h) + add = VRoot.h - (bt + bb); } y += (((ib->ewin->client.h - add) * ib->auto_resize_anchor) >> 10); h = add; if (ib->ewin->border) { - if ((EoGetY(ib->ewin) + ib->ewin->border->border.top + - ib->ewin->border->border.bottom + add) > VRoot.h) - y = VRoot.h - (ib->ewin->border->border.top + - ib->ewin->border->border.bottom + add); + if ((EoGetY(ib->ewin) + bt + bb + add) > VRoot.h) + y = VRoot.h - (bt + bb + add); } } else @@ -1544,20 +1542,15 @@ add = ib->max; if (ib->ewin->border) { - if ((ib->ewin->border->border.left + - ib->ewin->border->border.right + add) > VRoot.w) - add = - VRoot.w - (ib->ewin->border->border.left + - ib->ewin->border->border.right); + if ((bl + br + add) > VRoot.w) + add = VRoot.w - (bl + br); } x += (((ib->ewin->client.w - add) * ib->auto_resize_anchor) >> 10); w = add; if (ib->ewin->border) { - if ((EoGetX(ib->ewin) + ib->ewin->border->border.left + - ib->ewin->border->border.right + add) > VRoot.w) - x = VRoot.w - (ib->ewin->border->border.left + - ib->ewin->border->border.right + add); + if ((EoGetX(ib->ewin) + bl + br + add) > VRoot.w) + x = VRoot.w - (bl + br + add); } } } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v retrieving revision 1.249 retrieving revision 1.250 diff -u -3 -r1.249 -r1.250 --- ipc.c 1 Dec 2005 16:56:45 -0000 1.249 +++ ipc.c 22 Dec 2005 18:43:15 -0000 1.250 @@ -23,6 +23,7 @@ */ #include "E.h" #include "aclass.h" +#include "borders.h" /* FIXME - Should not be here */ #include "desktops.h" #include "emodule.h" #include "eobj.h" @@ -964,15 +965,9 @@ static void EwinShowInfo(const EWin * ewin) { - Border NoBorder; - const Border *border; + int bl, br, bt, bb; - border = ewin->border; - if (border == NULL) - { - border = &NoBorder; - memset(&NoBorder, 0, sizeof(Border)); - } + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); IpcPrintf("WM_NAME %s\n" "WM_ICON_NAME %s\n" @@ -1021,8 +1016,7 @@ #if USE_COMPOSITE EoGetPixmap(ewin), #endif - border->name, border->border.left, border->border.right, - border->border.top, border->border.bottom, + EwinBorderGetName(ewin), bl, br, bt, bb, ewin->icccm.icon_win, ewin->icccm.icon_pmap, ewin->icccm.icon_mask, EwinIsWindowGroupLeader(ewin), EwinGetWindowGroup(ewin), =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/menus-misc.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- menus-misc.c 19 Nov 2005 15:47:10 -0000 1.25 +++ menus-misc.c 22 Dec 2005 18:43:15 -0000 1.26 @@ -23,6 +23,7 @@ */ #include "E.h" #include "backgrounds.h" +#include "borders.h" #include "desktops.h" #include "ewins.h" #include "groups.h" @@ -576,7 +577,7 @@ BorderNameCompare(void *b1, void *b2) { if (b1 && b2) - return strcmp(((Border *) b1)->name, ((Border *) b2)->name); + return strcmp(BorderGetName(b1), BorderGetName(b2)); return 0; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v retrieving revision 1.223 retrieving revision 1.224 diff -u -3 -r1.223 -r1.224 --- menus.c 12 Nov 2005 17:51:11 -0000 1.223 +++ menus.c 22 Dec 2005 18:43:15 -0000 1.224 @@ -22,6 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "E.h" +#include "borders.h" #include "dialog.h" #include "emodule.h" #include "eobj.h" @@ -1439,6 +1440,8 @@ MenuItem *mi; EWin *ewin2, *ewin; struct _mdata *data; + int bl1, br1, bt1, bb1; + int bl2, br2, bt2, bb2; data = (struct _mdata *)dat; if (!data) @@ -1476,8 +1479,10 @@ NULL); /* Sub-menu offsets relative to parent menu origin */ - xo = ewin->border->border.left + mx + mw; - yo = ewin->border->border.top + my - (ewin2->border->border.top + my2); + EwinBorderGetSize(ewin, &bl1, &br1, &bt1, &bb1); + EwinBorderGetSize(ewin2, &bl2, &br2, &bt2, &bb2); + xo = bl1 + mx + mw; + yo = bt1 + my - (bt2 + my2); if (Conf.menus.onscreen) { @@ -1487,10 +1492,8 @@ int xdist = 0, ydist = 0; /* Size of new submenu (may be shaded atm.) */ - ww = mi->child->w + ewin2->border->border.left + - ewin2->border->border.right; - hh = mi->child->h + ewin2->border->border.top + - ewin2->border->border.bottom; + ww = mi->child->w + bl2 + br2; + hh = mi->child->h + bt2 + bb2; if (EoGetX(ewin) + xo + ww > VRoot.w) xdist = VRoot.w - (EoGetX(ewin) + xo + ww); @@ -1739,7 +1742,7 @@ b = FindItem(ms->border_name, 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER); if (b) - b->ref_count++; + BorderIncRefcount(b); } break; default: =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -3 -r1.58 -r1.59 --- moveresize.c 19 Nov 2005 20:43:09 -0000 1.58 +++ moveresize.c 22 Dec 2005 18:43:15 -0000 1.59 @@ -42,14 +42,16 @@ void EwinShapeSet(EWin * ewin) { + int bl, br, bt, bb; + ewin->shape_x = EoGetX(ewin); ewin->shape_y = EoGetY(ewin); + if (ewin->state.shaded) { - ewin->shape_w = EoGetW(ewin) - - (ewin->border->border.left + ewin->border->border.right); - ewin->shape_h = EoGetH(ewin) - - (ewin->border->border.top + ewin->border->border.bottom); + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); + ewin->shape_w = EoGetW(ewin) - (bl + br); + ewin->shape_h = EoGetH(ewin) - (bt + bb); } else { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/size.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -3 -r1.47 -r1.48 --- size.c 2 Nov 2005 23:03:03 -0000 1.47 +++ size.c 22 Dec 2005 18:43:15 -0000 1.48 @@ -36,7 +36,7 @@ static void MaxSizeHV(EWin * ewin, const char *resize_type, int direction) { - int x, y, w, h, x1, x2, y1, y2, type; + int x, y, w, h, x1, x2, y1, y2, type, bl, br, bt, bb; EWin *const *lst, *pe; int i, num; @@ -77,6 +77,7 @@ x = EoGetX(ewin); h = ewin->client.h; w = ewin->client.w; + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); switch (type) { @@ -84,14 +85,12 @@ if (direction & MAX_HOR) { x = 0; - w = VRoot.w - ewin->border->border.left - - ewin->border->border.right; + w = VRoot.w - bl - br; } if (direction & MAX_VER) { y = 0; - h = VRoot.h - ewin->border->border.top - - ewin->border->border.bottom; + h = VRoot.h - bt - bb; } break; @@ -134,8 +133,7 @@ y2 = EoGetY(pe); } y = y1; - h = y2 - y1 - (ewin->border->border.top + - ewin->border->border.bottom); + h = y2 - y1 - (bt + bb); ewin->state.maximized_vert = 1; } @@ -161,8 +159,7 @@ x2 = EoGetX(pe); } x = x1; - w = x2 - x1 - (ewin->border->border.left + - ewin->border->border.right); + w = x2 - x1 - (bl + br); ewin->state.maximized_horz = 1; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/slideout.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -3 -r1.48 -r1.49 --- slideout.c 27 Nov 2005 13:11:06 -0000 1.48 +++ slideout.c 22 Dec 2005 18:43:15 -0000 1.49 @@ -23,6 +23,7 @@ */ #include "E.h" #include "aclass.h" +#include "borders.h" #include "buttons.h" #include "desktops.h" #include "emodule.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -3 -r1.112 -r1.113 --- snaps.c 19 Nov 2005 15:47:10 -0000 1.112 +++ snaps.c 22 Dec 2005 18:43:15 -0000 1.113 @@ -23,6 +23,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "E.h" +#include "borders.h" #include "desktops.h" #include "dialog.h" #include "ewins.h" @@ -301,9 +302,9 @@ Efree(sn->border_name); sn->border_name = NULL; if (ewin->previous_border) - sn->border_name = Estrdup(ewin->previous_border->name); + sn->border_name = Estrdup(BorderGetName(ewin->previous_border)); else if (ewin->normal_border) - sn->border_name = Estrdup(ewin->normal_border->name); + sn->border_name = Estrdup(BorderGetName(ewin->normal_border)); } static void =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/windowmatch.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -3 -r1.43 -r1.44 --- windowmatch.c 27 Nov 2005 13:11:06 -0000 1.43 +++ windowmatch.c 22 Dec 2005 18:43:15 -0000 1.44 @@ -22,6 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "E.h" +#include "borders.h" #include "conf.h" #include "desktops.h" #include "emodule.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/zoom.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- zoom.c 7 Aug 2005 22:59:27 -0000 1.32 +++ zoom.c 22 Dec 2005 18:43:15 -0000 1.33 @@ -229,7 +229,7 @@ mode = SwitchRes(1, 0, 0, ewin->client.w, ewin->client.h); if (mode) { - int x1, y1, x2, y2; + int x1, y1, x2, y2, bl, br, bt, bb; zoom_last_ewin = ewin; zoom_last_x = EoGetX(ewin); @@ -247,8 +247,8 @@ if (y2 < 0) y2 = 0; RaiseEwin(ewin); - EwinMove(ewin, -ewin->border->border.left + x1, - -ewin->border->border.top + y1); + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); + EwinMove(ewin, -bl + x1, -bt + y1); FocusToEWin(ewin, FOCUS_SET); EWarpPointer(_EwinGetClientWin(ewin), ewin->client.w / 2, ewin->client.h / 2); ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs