You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(12) |
Aug
(18) |
Sep
|
Oct
(6) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(13) |
Feb
|
Mar
|
Apr
(9) |
May
(4) |
Jun
(1) |
Jul
|
Aug
(16) |
Sep
(34) |
Oct
(63) |
Nov
(27) |
Dec
(10) |
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: copal <co...@us...> - 2005-07-28 00:09:22
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21116 Modified Files: IWMClient+Initialization.m Log Message: add IWMClient.h import Index: IWMClient+Initialization.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient+Initialization.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IWMClient+Initialization.m 17 Jun 2004 05:23:26 -0000 1.1 --- IWMClient+Initialization.m 28 Jul 2005 00:09:03 -0000 1.2 *************** *** 21,24 **** --- 21,26 ---- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + #import "IWMClient.h" @implementation IWMClient (InitializationMethods) |
|
From: copal <co...@us...> - 2005-07-28 00:07:32
|
Update of /cvsroot/interfacewm/interfacewm/IWMComponent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20555 Modified Files: IWMComponentManager.h Log Message: Index: IWMComponentManager.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMComponent/IWMComponentManager.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IWMComponentManager.h 19 Aug 2003 02:01:36 -0000 1.1 --- IWMComponentManager.h 28 Jul 2005 00:07:22 -0000 1.2 *************** *** 33,37 **** { @private ! NSString *_userhome; NSMutableArray *_searchPaths; NSMutableArray *_loadedComponents; --- 33,37 ---- { @private ! NSString *_userhome; NSMutableArray *_searchPaths; NSMutableArray *_loadedComponents; |
|
From: copal <co...@us...> - 2005-07-26 04:14:17
|
Update of /cvsroot/interfacewm/interfacewm/Documents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20798 Modified Files: README.old CONTRIBUTORS Log Message: Index: README.old =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/Documents/README.old,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README.old 28 Oct 2003 01:02:10 -0000 1.1 --- README.old 26 Jul 2005 04:14:08 -0000 1.2 *************** *** 12,16 **** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interface Window Manager ! Ian Mondragon - < copal @ dragonhelix.org > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- 12,16 ---- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interface Window Manager ! Ian Mondragon - < the.copal atgmaildotcom > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Index: CONTRIBUTORS =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/Documents/CONTRIBUTORS,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CONTRIBUTORS 8 Jun 2004 01:29:16 -0000 1.3 --- CONTRIBUTORS 26 Jul 2005 04:14:08 -0000 1.4 *************** *** 3,7 **** # $Id$ # ! # Ian Mondragon - < co...@dr... > # # List of contributors to InterfaceWM. --- 3,7 ---- # $Id$ # ! # Ian Mondragon - < the.copal atgmaildotcom > # # List of contributors to InterfaceWM. |
|
From: copal <co...@us...> - 2004-06-17 05:39:07
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31174 Modified Files: IWMClient.h IWMClient+Resize.m Log Message: move -setFrame: and -verifyFrame methods into ResizeMethods category Index: IWMClient+Resize.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient+Resize.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IWMClient+Resize.m 17 Jun 2004 05:35:10 -0000 1.1 --- IWMClient+Resize.m 17 Jun 2004 05:38:57 -0000 1.2 *************** *** 246,249 **** --- 246,313 ---- + - (void)setFrame:(NSRect)aRect + { + int adjustment, windowHeight; + NSSize windowSize; + + IWMTRACE; + + [self verifyFrame:aRect]; + + XGrabServer(GlobalDisplay); + + adjustment = [self borderWidth] * 2; + windowHeight = (int)aRect.size.height - [self titlebarHeight] - + [self resizebarHeight] - adjustment; + + windowSize.width = (int)aRect.size.width - adjustment; + windowSize.height = windowHeight; + + [parent setSize:aRect.size]; + [window setSize:windowSize]; + [parent setTopLeftPoint:aRect.origin]; + + [self redraw]; + + [self configureNotify]; + + XUngrabServer(GlobalDisplay); + } + + - (void)verifyFrame:(NSRect)aFrame + { + int xMax = DisplayWidth(GlobalDisplay, _screenNumber); + int yMax = DisplayHeight(GlobalDisplay, _screenNumber); + + if (minimumSize.width && (minimumSize.width > aFrame.size.width)) { + IWMDebug(@"Correcting frame width...", nil); + aFrame.size.width = minimumSize.width; + } + + if (minimumSize.height && (minimumSize.height > aFrame.size.height)) { + IWMDebug(@"Correcting frame height...", nil); + aFrame.size.height = minimumSize.height; + } + + if (aFrame.origin.y < 0) { + IWMDebug(@"Correcting Y coordinate...", nil); + aFrame.origin.y = 0; + } + + if (aFrame.origin.y >= yMax) { + IWMDebug(@"Correcting Y coordinate...", nil); + aFrame.origin.y = yMax-10; //XXX 10 pixel leeway on bottom...? + } + + if (aFrame.origin.x < 0) { + IWMDebug(@"Correcting X coordinate...", nil); + aFrame.origin.x = 0; + } + + if (aFrame.origin.x >= xMax) { + IWMDebug(@"Correcting X coordinate...", nil); + aFrame.origin.x = xMax-10; //XXX 10 pixel leeway (change to mod screen) + } + } @end Index: IWMClient.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** IWMClient.h 17 Jun 2004 05:35:10 -0000 1.25 --- IWMClient.h 17 Jun 2004 05:38:57 -0000 1.26 *************** *** 243,249 **** - (NSRect)frame; - - (void)setFrame:(NSRect)aRect; - - - (void)verifyFrame:(NSRect)aFrame; - (int)width; --- 243,246 ---- *************** *** 405,408 **** --- 402,409 ---- - (void)unmaximize; + - (void)setFrame:(NSRect)aRect; + + - (void)verifyFrame:(NSRect)aFrame; + @end |
|
From: copal <co...@us...> - 2004-06-17 05:35:22
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27137 Modified Files: IWMClient.h IWMClient.m Added Files: IWMClient+Movement.m IWMClient+Resize.m Log Message: separate resize methods into category Index: IWMClient.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.m,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** IWMClient.m 17 Jun 2004 05:23:26 -0000 1.36 --- IWMClient.m 17 Jun 2004 05:35:10 -0000 1.37 *************** *** 218,509 **** CORE MANIPULATION METHODS *==========================================================================*/ - - - (void)move - { - // i don't recall why this code is here, and Yen-Ju Chen submitted a - // patch to remove it (effectively making this simply a call to the - // -moveMouseUntilButtonRelease method. makes sense, after recalling - // the movement problems IWM was having, but the codebase is b0rken - // right now, so i'm just commenting it out until i can compile... - - // NSPoint origin; - // - // origin.x = _outline.origin.x; - // origin.y = _outline.origin.y; - // - [self moveWithMouseUntilButtonRelease]; - // [self setTopLeftPoint:origin]; - // [self configureNotify]; - } - - - (void)moveWithMouseUntilButtonRelease - { - XEvent event; - int old_x, old_y, tmp; - BOOL opaque = [GlobalIWM opaqueMovement]; - XPoint position = [GlobalIWM mousePosition]; - - if (![GlobalIWM grabPointerAndServer]) - return (void)0x0; - - // update outline frame - _outline.origin = [self origin]; - _outline.size.width = [self width]; - _outline.size.height = (state.shaded ? [self titlebarHeight]: - [self height]); - - // cache old x/y coordinates - old_x = _outline.origin.x; - old_y = _outline.origin.y; - - if (!opaque) - [self drawOutline]; - - for (;;) - { - XMaskEvent(GlobalDisplay, - IWM_EVENT_MASK_BUTTON|IWM_EVENT_MASK_KEY|IWM_EVENT_MASK_MOUSE, - &event); - - switch (event.type) { - case MotionNotify: - [GlobalIWM cacheEventTime:&event]; - - if (!opaque) - [self drawOutline]; - - // make sure window doesn't go beyond screen of boundaries - tmp = old_x + (event.xmotion.x - position.x); - _outline.origin.x = (0 > tmp) ? 0 : tmp; - - tmp = old_y + (event.xmotion.y - position.y); - _outline.origin.y = (0 > tmp) ? 0 : tmp; - - if (!opaque) - [self drawOutline]; - else - [self setTopLeftPoint:_outline.origin]; - - break; - - case ButtonRelease: - if (!opaque) - [self drawOutline]; - [self setFrame:_outline]; - [GlobalIWM ungrabPointerAndServer]; - return (void)0x0; - - case ButtonPress: - XAllowEvents(GlobalDisplay, ReplayPointer, CurrentTime); - break; - - default: - break; - } - } - } - - - (void)resize:(BOOL)resizeWidth - { - [self resizeWithMouseUntilButtonRelease:resizeWidth]; - [self setSize:_outline.size]; - [self setTopLeftPoint:_outline.origin]; - } - - - (void)resizeWithMouseUntilButtonRelease:(BOOL)resizeWidth - { - XEvent event; - int cached_right_x; - - if (![GlobalIWM grabPointerAndServer]) { - fprintf(stderr, "-> Error grabbing pointer & server...\n"); - return (void)0x0; - } - - _outline.size = [self size]; - _outline.origin = [self origin]; - - cached_right_x = _outline.origin.x + _outline.size.width; - - [self drawOutline]; - - for (;;) - { - int new_x; - - XMaskEvent(GlobalDisplay, IWM_EVENT_MASK_MOUSE, &event); - - switch (event.type) - { - case MotionNotify: - new_x = resizeWidth ? event.xmotion.x : cached_right_x; - [self drawOutline]; - [self resizeWithMouseMotionTo:new_x :event.xmotion.y]; - [self drawOutline]; - break; - - case ButtonRelease: - [self drawOutline]; - [GlobalIWM ungrabPointerAndServer]; - return (void)0x0; - - default: - return (void)0x0; - } - } - } - - // XXX THIS NEEDS SERIOUS FIXING - - (void)resizeWithMouseMotionTo:(int)xValue :(int)yValue - { - XSizeHints *hints = [window wmNormalHints]; - int old_x, old_y; - int base_x, base_y; - int borderWidth = [self borderWidth]; - - old_x = _outline.origin.x; - old_y = _outline.origin.y; - - _outline.size.width = abs(_outline.origin.x - xValue) - borderWidth; - _outline.size.height = abs(_outline.origin.y - yValue) - borderWidth; - - if (hints->flags & PResizeInc) - { - base_x = (hints->flags & PBaseSize) ? hints->base_width : - ((hints->flags & PMinSize) ? hints->min_width : 0); - - base_y = (hints->flags & PBaseSize) ? hints->base_height : - ((hints->flags & PMinSize) ? hints->min_height : 0); - - _outline.size.width -= ((int)_outline.size.width - base_x) % hints->width_inc; - _outline.size.height -= ((int)_outline.size.height - base_y) % hints->height_inc; - } - - if (hints->flags & PMinSize) - { - if (_outline.size.width < hints->min_width) - _outline.size.width = hints->min_width; - - if (_outline.size.height < hints->min_height) - _outline.size.height = hints->min_height; - } - - if (hints->flags & PMaxSize) - { - if (_outline.size.width > hints->max_width) - _outline.size.width = hints->max_width; - - if (_outline.size.height > hints->max_height) - _outline.size.height = hints->max_height; - } - - _outline.origin.x = (old_x <= xValue) ? old_x : old_x - _outline.size.width; - _outline.origin.y = (old_y <= yValue) ? old_y : old_y - _outline.size.height; - - return (void)0x0; - } - - // XXX - no true minimization right now... - - (void)minimize - { - IWMTRACE; - - if (!state.shaded) - [self shade]; - else - [self unshade]; - } - - // XXX - no true minimization right now... - - (void)unminimize - { - [self unshade]; - } - - - (void)maximize - { - IWMTRACE; - - [self maximizeHorizontally]; - [self maximizeVertically]; - - // XXX - set _NET_WM_STATE properties - [self update]; - } - - - (void)maximizeHorizontally - { - IWMTRACE; - - if (!state.maximized_horz)// && decor.maximize_button) - { - NSRect frame; - - _cached_size.size.width = [self width]; - - frame.size.width = iwm_display_width([self screen]) - [self borderWidth]; - frame.size.height = [self height]; - - frame.origin = [self origin]; - frame.origin.x = 0; - - [self setFrame:frame]; - - state.maximized_horz = YES; - - // XXX - set _NET_WM_STATE_MAXIMIZED_HORZ property - [self update]; - } - } - - - (void)maximizeVertically - { - IWMTRACE; - - if (!state.maximized_vert) // && decor.maximize_button) - { - NSRect frame; - - _cached_size.size.height = [self height]; - - frame.size.width = [self width]; - frame.size.height = iwm_display_height([self screen]) - [self borderWidth]; - frame.origin.x = ([parent origin]).x; - frame.origin.y = 0; - - [self setFrame:frame]; - - state.maximized_vert = YES; - - // XXX - set _NET_WM_STATE_MAXIMIZED_VERT property - [self update]; - } - } - - - (void)unmaximize - { - IWMTRACE; - - if (state.maximized_horz || state.maximized_vert) - { - NSRect frame; - - frame.size.width = (state.maximized_horz ? _cached_size.size.width : - [self width]); - frame.size.height = (state.maximized_vert ? _cached_size.size.height : - [self height]); - - frame.origin = _cached_size.origin; - - [self setFrame:frame]; - - state.maximized_horz = NO; - state.maximized_vert = NO; - - // XXX - unset _NET_WM_STATE_MAXIMIZED_{VERT,HORZ} properties - [self update]; - } - } - - (void)hide { --- 218,221 ---- *************** *** 1475,1513 **** } - - (void)setTopLeftPoint:(NSPoint)aPoint - { - IWMTRACE; - - XGrabServer(GlobalDisplay); - { - [parent setTopLeftPoint:aPoint]; - [self raise]; - [self configureNotify]; - [self redraw]; - } - XUngrabServer(GlobalDisplay); - } - - - (void)setSize:(NSSize)aSize - { - IWMTRACE; - XGrabServer(GlobalDisplay); - { - NSSize windowSize; - - windowSize.height = (int)aSize.height - [self titlebarHeight] - - [self resizebarHeight]; - windowSize.width = aSize.width; - - [parent setSize:aSize]; - [window setSize:windowSize]; - - [self configureNotify]; - } - XUngrabServer(GlobalDisplay); - } - - - @end --- 1187,1190 ---- --- NEW FILE: IWMClient+Resize.m --- /* * $Id: IWMClient+Resize.m,v 1.1 2004/06/17 05:35:10 copal Exp $ * * This file is part of Interface WM. * * Copyright (C) 2002, Ian Mondragon * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @implementation IWMClient (ResizeMethods) - (void)setSize:(NSSize)aSize { IWMTRACE; XGrabServer(GlobalDisplay); { NSSize windowSize; windowSize.height = (int)aSize.height - [self titlebarHeight] - [self resizebarHeight]; windowSize.width = aSize.width; [parent setSize:aSize]; [window setSize:windowSize]; [self configureNotify]; } XUngrabServer(GlobalDisplay); } - (void)resize:(BOOL)resizeWidth { [self resizeWithMouseUntilButtonRelease:resizeWidth]; [self setSize:_outline.size]; [self setTopLeftPoint:_outline.origin]; } - (void)resizeWithMouseUntilButtonRelease:(BOOL)resizeWidth { XEvent event; int cached_right_x; if (![GlobalIWM grabPointerAndServer]) { fprintf(stderr, "-> Error grabbing pointer & server...\n"); return (void)0x0; } _outline.size = [self size]; _outline.origin = [self origin]; cached_right_x = _outline.origin.x + _outline.size.width; [self drawOutline]; for (;;) { int new_x; XMaskEvent(GlobalDisplay, IWM_EVENT_MASK_MOUSE, &event); switch (event.type) { case MotionNotify: new_x = resizeWidth ? event.xmotion.x : cached_right_x; [self drawOutline]; [self resizeWithMouseMotionTo:new_x :event.xmotion.y]; [self drawOutline]; break; case ButtonRelease: [self drawOutline]; [GlobalIWM ungrabPointerAndServer]; return (void)0x0; default: return (void)0x0; } } } // XXX THIS NEEDS SERIOUS FIXING - (void)resizeWithMouseMotionTo:(int)xValue :(int)yValue { XSizeHints *hints = [window wmNormalHints]; int old_x, old_y; int base_x, base_y; int borderWidth = [self borderWidth]; old_x = _outline.origin.x; old_y = _outline.origin.y; _outline.size.width = abs(_outline.origin.x - xValue) - borderWidth; _outline.size.height = abs(_outline.origin.y - yValue) - borderWidth; if (hints->flags & PResizeInc) { base_x = (hints->flags & PBaseSize) ? hints->base_width : ((hints->flags & PMinSize) ? hints->min_width : 0); base_y = (hints->flags & PBaseSize) ? hints->base_height : ((hints->flags & PMinSize) ? hints->min_height : 0); _outline.size.width -= ((int)_outline.size.width - base_x) % hints->width_inc; _outline.size.height -= ((int)_outline.size.height - base_y) % hints->height_inc; } if (hints->flags & PMinSize) { if (_outline.size.width < hints->min_width) _outline.size.width = hints->min_width; if (_outline.size.height < hints->min_height) _outline.size.height = hints->min_height; } if (hints->flags & PMaxSize) { if (_outline.size.width > hints->max_width) _outline.size.width = hints->max_width; if (_outline.size.height > hints->max_height) _outline.size.height = hints->max_height; } _outline.origin.x = (old_x <= xValue) ? old_x : old_x - _outline.size.width; _outline.origin.y = (old_y <= yValue) ? old_y : old_y - _outline.size.height; return (void)0x0; } // XXX - no true minimization right now... - (void)minimize { IWMTRACE; if (!state.shaded) [self shade]; else [self unshade]; } // XXX - no true minimization right now... - (void)unminimize { [self unshade]; } - (void)maximize { IWMTRACE; [self maximizeHorizontally]; [self maximizeVertically]; // XXX - set _NET_WM_STATE properties [self update]; } - (void)maximizeHorizontally { IWMTRACE; if (!state.maximized_horz)// && decor.maximize_button) { NSRect frame; _cached_size.size.width = [self width]; frame.size.width = iwm_display_width([self screen]) - [self borderWidth]; frame.size.height = [self height]; frame.origin = [self origin]; frame.origin.x = 0; [self setFrame:frame]; state.maximized_horz = YES; // XXX - set _NET_WM_STATE_MAXIMIZED_HORZ property [self update]; } } - (void)maximizeVertically { IWMTRACE; if (!state.maximized_vert) // && decor.maximize_button) { NSRect frame; _cached_size.size.height = [self height]; frame.size.width = [self width]; frame.size.height = iwm_display_height([self screen]) - [self borderWidth]; frame.origin.x = ([parent origin]).x; frame.origin.y = 0; [self setFrame:frame]; state.maximized_vert = YES; // XXX - set _NET_WM_STATE_MAXIMIZED_VERT property [self update]; } } - (void)unmaximize { IWMTRACE; if (state.maximized_horz || state.maximized_vert) { NSRect frame; frame.size.width = (state.maximized_horz ? _cached_size.size.width : [self width]); frame.size.height = (state.maximized_vert ? _cached_size.size.height : [self height]); frame.origin = _cached_size.origin; [self setFrame:frame]; state.maximized_horz = NO; state.maximized_vert = NO; // XXX - unset _NET_WM_STATE_MAXIMIZED_{VERT,HORZ} properties [self update]; } } @end --- NEW FILE: IWMClient+Movement.m --- /* * $Id: IWMClient+Movement.m,v 1.1 2004/06/17 05:35:10 copal Exp $ * * This file is part of Interface WM. * * Copyright (C) 2002, Ian Mondragon * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @implementation IWMClient (MovementMethods) - (void)move { // i don't recall why this code is here, and Yen-Ju Chen submitted a // patch to remove it (effectively making this simply a call to the // -moveMouseUntilButtonRelease method. makes sense, after recalling // the movement problems IWM was having, but the codebase is b0rken // right now, so i'm just commenting it out until i can compile... // NSPoint origin; // // origin.x = _outline.origin.x; // origin.y = _outline.origin.y; // [self moveWithMouseUntilButtonRelease]; // [self setTopLeftPoint:origin]; // [self configureNotify]; } - (void)moveWithMouseUntilButtonRelease { XEvent event; int old_x, old_y, tmp; BOOL opaque = [GlobalIWM opaqueMovement]; XPoint position = [GlobalIWM mousePosition]; if (![GlobalIWM grabPointerAndServer]) return (void)0x0; // update outline frame _outline.origin = [self origin]; _outline.size.width = [self width]; _outline.size.height = (state.shaded ? [self titlebarHeight]: [self height]); // cache old x/y coordinates old_x = _outline.origin.x; old_y = _outline.origin.y; if (!opaque) [self drawOutline]; for (;;) { XMaskEvent(GlobalDisplay, IWM_EVENT_MASK_BUTTON|IWM_EVENT_MASK_KEY|IWM_EVENT_MASK_MOUSE, &event); switch (event.type) { case MotionNotify: [GlobalIWM cacheEventTime:&event]; if (!opaque) [self drawOutline]; // make sure window doesn't go beyond screen of boundaries tmp = old_x + (event.xmotion.x - position.x); _outline.origin.x = (0 > tmp) ? 0 : tmp; tmp = old_y + (event.xmotion.y - position.y); _outline.origin.y = (0 > tmp) ? 0 : tmp; if (!opaque) [self drawOutline]; else [self setTopLeftPoint:_outline.origin]; break; case ButtonRelease: if (!opaque) [self drawOutline]; [self setFrame:_outline]; [GlobalIWM ungrabPointerAndServer]; return (void)0x0; case ButtonPress: XAllowEvents(GlobalDisplay, ReplayPointer, CurrentTime); break; default: break; } } } - (void)setTopLeftPoint:(NSPoint)aPoint { IWMTRACE; XGrabServer(GlobalDisplay); { [parent setTopLeftPoint:aPoint]; [self raise]; [self configureNotify]; [self redraw]; } XUngrabServer(GlobalDisplay); } @end Index: IWMClient.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** IWMClient.h 17 Jun 2004 05:23:26 -0000 1.24 --- IWMClient.h 17 Jun 2004 05:35:10 -0000 1.25 *************** *** 136,217 **** /*! - * @method move - * @discussion Moves the client - */ - - (void)move; - - /*! - * @method moveWithMouseUntilButtonRelease - * @discussion Continues client movement until the mouse button is released - */ - - (void)moveWithMouseUntilButtonRelease; - - /*! - * @method setFrameTopLeftPoint: - * @discussion Sets the client's top left point to the provided X/Y coordinates - */ - - (void)setTopLeftPoint:(NSPoint)aPoint; - - /*! - * @method setSize: - * @param aSize An NSSize structure - * @discussion Resizes the client to the provided width/height - */ - - (void)setSize:(NSSize)aSize; - - /*! - * @method resize: - * @discussion Resizes a client. If <i>resizeWidth</i> is <b>YES</b>, then - * the resizing will affect both width and height, otherwise, only height. - * @param resizeWidth - */ - - (void)resize:(BOOL)resizeWidth; - - /*! - * @method resizeWithMouseUntilButtonRelease: - * @discussion Continues client resizing until the mouse button is released. - * @param resizeWidth - */ - - (void)resizeWithMouseUntilButtonRelease:(BOOL)resizeWidth; - - - (void)resizeWithMouseMotionTo:(int)xValue :(int)yValue; - - /*! - * @method minimize - * @discussion Minimizes the client - */ - - (void)minimize; - - /*! - * @method unminimize - * @discussion Un-minimizes the client - */ - - (void)unminimize; - - /*! - * @method maximize - * @discussion Maximizes the client - */ - - (void)maximize; - - /*! - * @method maximizeHorizontally - * @discussion Maximizes the client horizontally - */ - - (void)maximizeHorizontally; - - /*! - * @method maximizeVertically - * @discussion Maximizes the client vertically - */ - - (void)maximizeVertically; - - /*! - * @method unmaximize - * @discussion Un-maximizes the client - */ - - (void)unmaximize; - - /*! * @method hide * @discussion Hides the client --- 136,139 ---- *************** *** 400,403 **** --- 322,410 ---- @end + @interface IWMClient (MovementMethods) + /*! + * @method move + * @discussion Moves the client + */ + - (void)move; + + /*! + * @method moveWithMouseUntilButtonRelease + * @discussion Continues client movement until the mouse button is released + */ + - (void)moveWithMouseUntilButtonRelease; + + /*! + * @method setFrameTopLeftPoint: + * @discussion Sets the client's top left point to the provided X/Y coordinates + */ + - (void)setTopLeftPoint:(NSPoint)aPoint; + + @end + + @interface IWMClient (ResizeMethods) + + /*! + * @method setSize: + * @param aSize An NSSize structure + * @discussion Resizes the client to the provided width/height + */ + - (void)setSize:(NSSize)aSize; + + /*! + * @method resize: + * @discussion Resizes a client. If <i>resizeWidth</i> is <b>YES</b>, then + * the resizing will affect both width and height, otherwise, only height. + * @param resizeWidth + */ + - (void)resize:(BOOL)resizeWidth; + + /*! + * @method resizeWithMouseUntilButtonRelease: + * @discussion Continues client resizing until the mouse button is released. + * @param resizeWidth + */ + - (void)resizeWithMouseUntilButtonRelease:(BOOL)resizeWidth; + + - (void)resizeWithMouseMotionTo:(int)xValue :(int)yValue; + + /*! + * @method minimize + * @discussion Minimizes the client + */ + - (void)minimize; + + /*! + * @method unminimize + * @discussion Un-minimizes the client + */ + - (void)unminimize; + + /*! + * @method maximize + * @discussion Maximizes the client + */ + - (void)maximize; + + /*! + * @method maximizeHorizontally + * @discussion Maximizes the client horizontally + */ + - (void)maximizeHorizontally; + + /*! + * @method maximizeVertically + * @discussion Maximizes the client vertically + */ + - (void)maximizeVertically; + + /*! + * @method unmaximize + * @discussion Un-maximizes the client + */ + - (void)unmaximize; + + @end + #endif /* _IWMCLIENT_H_ */ |
|
From: copal <co...@us...> - 2004-06-17 05:23:36
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16408 Modified Files: IWMClient.h IWMClient.m Added Files: IWMClient+Initialization.m Log Message: separate underlying initialization routines into a category Index: IWMClient.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.m,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** IWMClient.m 15 Jun 2004 05:22:21 -0000 1.35 --- IWMClient.m 17 Jun 2004 05:23:26 -0000 1.36 *************** *** 126,453 **** } - - initializeFrame - { - XSizeHints *sizeHints = [window wmNormalHints]; - int xMax = DisplayWidth(GlobalDisplay, _screenNumber); - int yMax = DisplayHeight(GlobalDisplay, _screenNumber); - - // base/minimum size specified (base size is used over minimum size) - if (sizeHints->flags & PBaseSize) - { - minimumSize.width = sizeHints->base_width; - minimumSize.height = sizeHints->base_height; - } - else if (sizeHints->flags & PMinSize) - { - minimumSize.width = sizeHints->min_width; - minimumSize.height = sizeHints->min_height; - } - - // maximum size specified - if (sizeHints->flags & PMaxSize) - { - maximumSize.width = sizeHints->max_width; - maximumSize.height = sizeHints->max_height; - - IWMDebug(@"Maximum size: %i x %i", (int)maximumSize.width, - (int)maximumSize.height); - } - - // resize increments - if (sizeHints->flags & PResizeInc) - { - resizeIncrements.width = sizeHints->width_inc; - resizeIncrements.height = sizeHints->height_inc; - } - - /* XXX - * width/height and x/y are supposed to be obsolete according to - * ICCCM specification, but where do we get the preliminary info - * from then? - */ - - // user-specified size - if (sizeHints->flags & USSize) - { - _frame.size.width = sizeHints->width; - _frame.size.height = sizeHints->height; - } - - // user-specified position - if (sizeHints->flags & USPosition) - { - _frame.origin.x = sizeHints->x; - _frame.origin.y = sizeHints->y; - } - else - { - XPoint position; - - position = [GlobalIWM mousePosition]; - - _frame.origin.x = ((position.x / (float)xMax) * - (xMax - _frame.size.width)); - - _frame.origin.y = ((position.y / (float)yMax) * - (yMax - [self titlebarHeight] - _frame.size.height)); - } - - return self; - } - - - initializeDecorations - { - decor.border = YES; - decor.resizebar = YES; - decor.titlebar = YES; - decor.close_button = YES; - decor.minimize_button = YES; - decor.icon = YES; - - if (![self initializeEWMHDecorations]) - { - [self initializeMOTIFDecorations]; - } - - return self; - } - - - initializeEWMHDecorations - { - Atom *data; - Atom allowedActions[10]; - int count, i = 0; - - IWMTRACE; - - data = (Atom *)[window property:GlobalIWM->atoms.net_wm_window_type - type:XA_ATOM count:&count]; - - if (data && data[0]) - { - IWMDebug(@"Initializing decor via EWMH hints...", nil); - IWMDebug(@"EWMH hint: %s", XGetAtomName(GlobalDisplay, data[0])); - - if (data[0] == GlobalIWM->atoms.net_wm_window_type_desktop) - { - } - else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dock || - data[0] == GlobalIWM->atoms.kde_net_wm_window_type_override) - { - decor.resizebar = NO; - decor.titlebar = NO; - decor.icon = NO; - decor.close_button = NO; - decor.minimize_button = NO; - decor.border = NO; - - if ([[window xClassInstance] isEqualToString:@"GNUstep"]) - NSLog(@"\n#\n#GNUstep Dock Icon\n#"); - } - else if (data[0] == GlobalIWM->atoms.net_wm_window_type_toolbar) - { - } - else if (data[0] == GlobalIWM->atoms.net_wm_window_type_menu) - { - decor.resizebar = NO; - decor.icon = NO; - decor.minimize_button = NO; - } - else if (data[0] == GlobalIWM->atoms.net_wm_window_type_utility) - { - } - else if (data[0] == GlobalIWM->atoms.net_wm_window_type_splash) - { - decor.resizebar = NO; - decor.titlebar = NO; - decor.icon = NO; - decor.close_button = NO; - decor.minimize_button = NO; - decor.border = NO; - } - else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dialog) - { - decor.resizebar = NO; - decor.icon = NO; - decor.minimize_button = NO; - } - else if (data[0] == GlobalIWM->atoms.net_wm_window_type_normal) - { - } - - // _NET_WM_ALLOWED_ACTIONS property - - // allow resizing if resizebar is present - if (decor.resizebar) - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_resize; - // allow shading if titlebar is present - if (decor.titlebar) - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_shade; - // allow minimization if minimize button is present - if (decor.minimize_button) - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_minimize; - // allow closing if close button is present - if (decor.close_button) - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_close; - - // XXX - fix these - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_move; - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_stick; - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_maximize_horz; - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_maximize_vert; - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_fullscreen; - allowedActions[i++] = GlobalIWM->atoms.net_wm_action_change_desktop; - - // set _NET_WM_ALLOWED_ACTIONS with updated array - [window setProperty:GlobalIWM->atoms.net_wm_allowed_actions type:XA_ATOM - format:32 data:(unsigned char *)allowedActions elements:i]; - - return self; - } - - return nil; - } - - - initializeMOTIFDecorations - { - //int num; - //Atom atom_return; - //unsigned long /*num,*/ len; - MWMHints *mwm_hints; - - IWMTRACE; - - // obtain the hints - #if 0 - int num; - if ((mwm_hints = (MWMHints *)[window property:GlobalIWM->atoms.motif_wm_hints - type:GlobalIWM->atoms.motif_wm_hints count:&num])) - #endif - #if 1 - Atom atom_return; - unsigned long num, len; - int format; - - if ((XGetWindowProperty(GlobalDisplay, [window xWindow], - GlobalIWM->atoms.motif_wm_hints, 0, MWM_HINTS_ELEMENTS, - False, GlobalIWM->atoms.motif_wm_hints, &atom_return, - &format, &num, &len, (unsigned char **)&mwm_hints) == Success) - && mwm_hints) - #endif - { - IWMDebug(@"Initializing decor via MOTIF hints...", nil); - - // verify that we obtained three elements - if (num == MWM_HINTS_ELEMENTS) - { - if (mwm_hints->flags & MWM_HINTS_DECORATIONS) - { - // all decorations are present - if (mwm_hints->decorations & MWM_DECOR_ALL) - { - decor.border = YES; - decor.titlebar = YES; - decor.close_button = YES; - decor.minimize_button = YES; - decor.resizebar = YES; - } - - // customized subset of decorations - else - { - decor.border = NO; - decor.titlebar = NO; - decor.close_button = NO; - decor.minimize_button = NO; - decor.resizebar = NO; - - // has border - if (mwm_hints->decorations & MWM_DECOR_BORDER) - decor.border = YES; - - // has resize bar - if (mwm_hints->decorations & MWM_DECOR_HANDLE) - decor.resizebar = YES; - - // has titlebar - if (mwm_hints->decorations & MWM_DECOR_TITLE) - decor.titlebar = YES; - - // has miniaturize button - if (mwm_hints->decorations & MWM_DECOR_ICONIFY) - decor.minimize_button = YES; - - if (mwm_hints->decorations & MWM_DECOR_MENU) - { - /*XXX no menu for Interface yet, sorry */ - // menu flag - } - } - } - - /******** not dealing with these at the moment ************* - - if (mwm_hints->flags & MwmHintsFunctions) - { - if (mwm_hints->functions & MwmFuncAll) - { - functions.resize = functions.move = functions.iconify = - functions.maximize = functions.close = True; - } - else - { - functions.resize = functions.move = functions.iconify = - functions.maximize = functions.close = False; - - if (mwm_hints->functions & MwmFuncResize) - functions.resize = True; - if (mwm_hints->functions & MwmFuncMove) - functions.move = True; - if (mwm_hints->functions & MwmFuncIconify) - functions.iconify = True; - if (mwm_hints->functions & MwmFuncMaximize) - functions.maximize = True; - if (mwm_hints->functions & MwmFuncClose) - functions.close = True; - } - } - - *************************************************************/ - } - - } - - return nil; - } - - - initializeParentWindow - { - NSPoint point; - - // initialize parent window - [self setParent:[[IWMWindow alloc] initAsParentForClient:self]]; - - // set titlebar into parent if present - if (decor.titlebar) - [self setTitlebar:[[IWMTitlebar alloc] initForClient:self]]; - - // place main window into parent - point.x = 0; - point.y = [self titlebarHeight]; - [window setInto:parent point:point]; - - // place resizebar into parent if present - if (decor.resizebar) - [self setResizebar:[[IWMResizebar alloc] initForClient:self]]; - - // initialize the application icon - icon = [[IWMIcon alloc] initForClient:self]; - - [self configureNotify]; - [self redraw]; - - return self; - } - /*==========================================================================* INSTANCE METHODS --- 126,129 ---- --- NEW FILE: IWMClient+Initialization.m --- /* * $Id: IWMClient+Initialization.m,v 1.1 2004/06/17 05:23:26 copal Exp $ * * This file is part of Interface WM. * * Copyright (C) 2002, Ian Mondragon * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @implementation IWMClient (InitializationMethods) - initializeFrame { XSizeHints *sizeHints = [window wmNormalHints]; int xMax = DisplayWidth(GlobalDisplay, _screenNumber); int yMax = DisplayHeight(GlobalDisplay, _screenNumber); // base/minimum size specified (base size is used over minimum size) if (sizeHints->flags & PBaseSize) { minimumSize.width = sizeHints->base_width; minimumSize.height = sizeHints->base_height; } else if (sizeHints->flags & PMinSize) { minimumSize.width = sizeHints->min_width; minimumSize.height = sizeHints->min_height; } // maximum size specified if (sizeHints->flags & PMaxSize) { maximumSize.width = sizeHints->max_width; maximumSize.height = sizeHints->max_height; IWMDebug(@"Maximum size: %i x %i", (int)maximumSize.width, (int)maximumSize.height); } // resize increments if (sizeHints->flags & PResizeInc) { resizeIncrements.width = sizeHints->width_inc; resizeIncrements.height = sizeHints->height_inc; } /* XXX * width/height and x/y are supposed to be obsolete according to * ICCCM specification, but where do we get the preliminary info * from then? */ // user-specified size if (sizeHints->flags & USSize) { _frame.size.width = sizeHints->width; _frame.size.height = sizeHints->height; } // user-specified position if (sizeHints->flags & USPosition) { _frame.origin.x = sizeHints->x; _frame.origin.y = sizeHints->y; } else { XPoint position; position = [GlobalIWM mousePosition]; _frame.origin.x = ((position.x / (float)xMax) * (xMax - _frame.size.width)); _frame.origin.y = ((position.y / (float)yMax) * (yMax - [self titlebarHeight] - _frame.size.height)); } return self; } - initializeDecorations { decor.border = YES; decor.resizebar = YES; decor.titlebar = YES; decor.close_button = YES; decor.minimize_button = YES; decor.icon = YES; if (![self initializeEWMHDecorations]) { [self initializeMOTIFDecorations]; } return self; } - initializeEWMHDecorations { Atom *data; Atom allowedActions[10]; int count, i = 0; IWMTRACE; data = (Atom *)[window property:GlobalIWM->atoms.net_wm_window_type type:XA_ATOM count:&count]; if (data && data[0]) { IWMDebug(@"Initializing decor via EWMH hints...", nil); IWMDebug(@"EWMH hint: %s", XGetAtomName(GlobalDisplay, data[0])); if (data[0] == GlobalIWM->atoms.net_wm_window_type_desktop) { } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dock || data[0] == GlobalIWM->atoms.kde_net_wm_window_type_override) { decor.resizebar = NO; decor.titlebar = NO; decor.icon = NO; decor.close_button = NO; decor.minimize_button = NO; decor.border = NO; if ([[window xClassInstance] isEqualToString:@"GNUstep"]) NSLog(@"\n#\n#GNUstep Dock Icon\n#"); } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_toolbar) { } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_menu) { decor.resizebar = NO; decor.icon = NO; decor.minimize_button = NO; } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_utility) { } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_splash) { decor.resizebar = NO; decor.titlebar = NO; decor.icon = NO; decor.close_button = NO; decor.minimize_button = NO; decor.border = NO; } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dialog) { decor.resizebar = NO; decor.icon = NO; decor.minimize_button = NO; } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_normal) { } // _NET_WM_ALLOWED_ACTIONS property // allow resizing if resizebar is present if (decor.resizebar) allowedActions[i++] = GlobalIWM->atoms.net_wm_action_resize; // allow shading if titlebar is present if (decor.titlebar) allowedActions[i++] = GlobalIWM->atoms.net_wm_action_shade; // allow minimization if minimize button is present if (decor.minimize_button) allowedActions[i++] = GlobalIWM->atoms.net_wm_action_minimize; // allow closing if close button is present if (decor.close_button) allowedActions[i++] = GlobalIWM->atoms.net_wm_action_close; // XXX - fix these allowedActions[i++] = GlobalIWM->atoms.net_wm_action_move; allowedActions[i++] = GlobalIWM->atoms.net_wm_action_stick; allowedActions[i++] = GlobalIWM->atoms.net_wm_action_maximize_horz; allowedActions[i++] = GlobalIWM->atoms.net_wm_action_maximize_vert; allowedActions[i++] = GlobalIWM->atoms.net_wm_action_fullscreen; allowedActions[i++] = GlobalIWM->atoms.net_wm_action_change_desktop; // set _NET_WM_ALLOWED_ACTIONS with updated array [window setProperty:GlobalIWM->atoms.net_wm_allowed_actions type:XA_ATOM format:32 data:(unsigned char *)allowedActions elements:i]; return self; } return nil; } - initializeMOTIFDecorations { //int num; //Atom atom_return; //unsigned long /*num,*/ len; MWMHints *mwm_hints; IWMTRACE; // obtain the hints #if 0 int num; if ((mwm_hints = (MWMHints *)[window property:GlobalIWM->atoms.motif_wm_hints type:GlobalIWM->atoms.motif_wm_hints count:&num])) #endif #if 1 Atom atom_return; unsigned long num, len; int format; if ((XGetWindowProperty(GlobalDisplay, [window xWindow], GlobalIWM->atoms.motif_wm_hints, 0, MWM_HINTS_ELEMENTS, False, GlobalIWM->atoms.motif_wm_hints, &atom_return, &format, &num, &len, (unsigned char **)&mwm_hints) == Success) && mwm_hints) #endif { IWMDebug(@"Initializing decor via MOTIF hints...", nil); // verify that we obtained three elements if (num == MWM_HINTS_ELEMENTS) { if (mwm_hints->flags & MWM_HINTS_DECORATIONS) { // all decorations are present if (mwm_hints->decorations & MWM_DECOR_ALL) { decor.border = YES; decor.titlebar = YES; decor.close_button = YES; decor.minimize_button = YES; decor.resizebar = YES; } // customized subset of decorations else { decor.border = NO; decor.titlebar = NO; decor.close_button = NO; decor.minimize_button = NO; decor.resizebar = NO; // has border if (mwm_hints->decorations & MWM_DECOR_BORDER) decor.border = YES; // has resize bar if (mwm_hints->decorations & MWM_DECOR_HANDLE) decor.resizebar = YES; // has titlebar if (mwm_hints->decorations & MWM_DECOR_TITLE) decor.titlebar = YES; // has miniaturize button if (mwm_hints->decorations & MWM_DECOR_ICONIFY) decor.minimize_button = YES; if (mwm_hints->decorations & MWM_DECOR_MENU) { /*XXX no menu for Interface yet, sorry */ // menu flag } } } /******** not dealing with these at the moment ************* if (mwm_hints->flags & MwmHintsFunctions) { if (mwm_hints->functions & MwmFuncAll) { functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = True; } else { functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = False; if (mwm_hints->functions & MwmFuncResize) functions.resize = True; if (mwm_hints->functions & MwmFuncMove) functions.move = True; if (mwm_hints->functions & MwmFuncIconify) functions.iconify = True; if (mwm_hints->functions & MwmFuncMaximize) functions.maximize = True; if (mwm_hints->functions & MwmFuncClose) functions.close = True; } } *************************************************************/ } } return nil; } - initializeParentWindow { NSPoint point; // initialize parent window [self setParent:[[IWMWindow alloc] initAsParentForClient:self]]; // set titlebar into parent if present if (decor.titlebar) [self setTitlebar:[[IWMTitlebar alloc] initForClient:self]]; // place main window into parent point.x = 0; point.y = [self titlebarHeight]; [window setInto:parent point:point]; // place resizebar into parent if present if (decor.resizebar) [self setResizebar:[[IWMResizebar alloc] initForClient:self]]; // initialize the application icon icon = [[IWMIcon alloc] initForClient:self]; [self configureNotify]; [self redraw]; return self; } @end Index: IWMClient.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** IWMClient.h 30 Nov 2003 18:40:15 -0000 1.23 --- IWMClient.h 17 Jun 2004 05:23:26 -0000 1.24 *************** *** 111,136 **** - initWithWindow:(Window)aWindow onScreen:(int)aScreenNumber; - /*! - * @method initializeFrame - * @discussion Initializes the client's size and origin - */ - - initializeFrame; - - /*! - * @method initializeDecorations - * @discussion Initializes the client's decor (titlebar, resizebar) - */ - - initializeDecorations; - - - initializeEWMHDecorations; - - initializeMOTIFDecorations; - - /*! - * @method initializeParentWindow - * @discussion Initializes the client's parent window, which contains - * the application window, titlebar and resizebar - */ - - initializeParentWindow; - /*==========================================================================* INSTANCE METHODS --- 111,114 ---- *************** *** 387,390 **** --- 365,403 ---- @end + @interface IWMClient (InitializationMethods) + + /*! + * @method initializeFrame + * @discussion Initializes the client's size and origin + */ + - initializeFrame; + + /*! + * @method initializeDecorations + * @discussion Initializes the client's decor (titlebar, resizebar) + */ + - initializeDecorations; + + /*! + * @method initializeMOTIFDecorations + * @discussion Initializes the client's decor based on EWMH hints + */ + - initializeEWMHDecorations; + + /*! + * @method initializeMOTIFDecorations + * @discussion Initializes the client's decor based on MOTIF hints + */ + - initializeMOTIFDecorations; + + /*! + * @method initializeParentWindow + * @discussion Initializes the client's parent window, which contains + * the application window, titlebar and resizebar + */ + - initializeParentWindow; + + @end + #endif /* _IWMCLIENT_H_ */ |
|
From: copal <co...@us...> - 2004-06-15 05:22:31
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31267 Modified Files: IWMScreen.m IWMWindow.h IWMWindow.m IWMWindowManager+Client.m IWMClient.m Log Message: minor cleanup Index: IWMClient.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.m,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** IWMClient.m 12 Dec 2003 04:30:07 -0000 1.34 --- IWMClient.m 15 Jun 2004 05:22:21 -0000 1.35 *************** *** 346,354 **** if (mwm_hints->decorations & MWM_DECOR_ALL) { ! decor.border = YES; ! decor.titlebar = YES; ! decor.close_button = YES; decor.minimize_button = YES; ! decor.resizebar = YES; } --- 346,354 ---- if (mwm_hints->decorations & MWM_DECOR_ALL) { ! decor.border = YES; ! decor.titlebar = YES; ! decor.close_button = YES; decor.minimize_button = YES; ! decor.resizebar = YES; } *************** *** 356,364 **** else { ! decor.border = NO; ! decor.titlebar = NO; ! decor.close_button = NO; decor.minimize_button = NO; ! decor.resizebar = NO; // has border --- 356,364 ---- else { ! decor.border = NO; ! decor.titlebar = NO; ! decor.close_button = NO; decor.minimize_button = NO; ! decor.resizebar = NO; // has border *************** *** 463,472 **** height:_outline.size.height x:_outline.origin.x y:_outline.origin.y]; ! // draw coordinates in center of screen coords = [[NSString alloc] initWithFormat:@"Width:%d Height:%d X:%d Y:%d", (int)_outline.size.width, (int)_outline.size.height, (int)_outline.origin.x, (int)_outline.origin.y]; [screen drawCenteredText:coords]; [coords release]; } --- 463,474 ---- height:_outline.size.height x:_outline.origin.x y:_outline.origin.y]; ! // create string describing the client outline coords = [[NSString alloc] initWithFormat:@"Width:%d Height:%d X:%d Y:%d", (int)_outline.size.width, (int)_outline.size.height, (int)_outline.origin.x, (int)_outline.origin.y]; + // draw the coordinates in the center of screen [screen drawCenteredText:coords]; + [coords release]; } *************** *** 543,554 **** - (void)move { ! NSPoint origin; ! ! origin.x = _outline.origin.x; ! origin.y = _outline.origin.y; ! [self moveWithMouseUntilButtonRelease]; ! [self setTopLeftPoint:origin]; ! [self configureNotify]; } --- 545,562 ---- - (void)move { ! // i don't recall why this code is here, and Yen-Ju Chen submitted a ! // patch to remove it (effectively making this simply a call to the ! // -moveMouseUntilButtonRelease method. makes sense, after recalling ! // the movement problems IWM was having, but the codebase is b0rken ! // right now, so i'm just commenting it out until i can compile... ! ! // NSPoint origin; ! // ! // origin.x = _outline.origin.x; ! // origin.y = _outline.origin.y; ! // [self moveWithMouseUntilButtonRelease]; ! // [self setTopLeftPoint:origin]; ! // [self configureNotify]; } *************** *** 745,749 **** // XXX - set _NET_WM_STATE properties ! [window updateWindowState]; } --- 753,757 ---- // XXX - set _NET_WM_STATE properties ! [self update]; } *************** *** 769,773 **** // XXX - set _NET_WM_STATE_MAXIMIZED_HORZ property ! [window updateWindowState]; } } --- 777,781 ---- // XXX - set _NET_WM_STATE_MAXIMIZED_HORZ property ! [self update]; } } *************** *** 793,797 **** // XXX - set _NET_WM_STATE_MAXIMIZED_VERT property ! [window updateWindowState]; } } --- 801,805 ---- // XXX - set _NET_WM_STATE_MAXIMIZED_VERT property ! [self update]; } } *************** *** 818,822 **** // XXX - unset _NET_WM_STATE_MAXIMIZED_{VERT,HORZ} properties ! [window updateWindowState]; } } --- 826,830 ---- // XXX - unset _NET_WM_STATE_MAXIMIZED_{VERT,HORZ} properties ! [self update]; } } *************** *** 843,847 **** // XXX - set _NET_WM_STATE_HIDDEN property ! [window updateWindowState]; } } --- 851,855 ---- // XXX - set _NET_WM_STATE_HIDDEN property ! [self update]; } } *************** *** 863,867 **** // XXX - unset _NET_WM_STATE_HIDDEN property ! [window updateWindowState]; } --- 871,875 ---- // XXX - unset _NET_WM_STATE_HIDDEN property ! [self update]; } *************** *** 886,890 **** // XXX - set _NET_WM_STATE_SHADED property ! [window updateWindowState]; } } --- 894,898 ---- // XXX - set _NET_WM_STATE_SHADED property ! [self update]; } } *************** *** 906,910 **** // XXX - unset _NET_WM_STATE_SHADED property ! [window updateWindowState]; } } --- 914,918 ---- // XXX - unset _NET_WM_STATE_SHADED property ! [self update]; } } *************** *** 926,930 **** [self setWMState:NormalState]; // XXX - change this for EWMH state.focused = YES; ! [window updateWindowState]; [window raise]; --- 934,938 ---- [self setWMState:NormalState]; // XXX - change this for EWMH state.focused = YES; ! [self update]; [window raise]; *************** *** 950,954 **** state.focused = NO; ! [window updateWindowState]; [self redraw]; --- 958,962 ---- state.focused = NO; ! [self update]; [self redraw]; Index: IWMWindow.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMWindow.m,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** IWMWindow.m 13 Jun 2004 17:53:07 -0000 1.23 --- IWMWindow.m 15 Jun 2004 05:22:21 -0000 1.24 *************** *** 537,541 **** // set _NET_WM_STATE with updated array ! [self setAtomProperty:GlobalIWM->atoms.net_wm_state format:32 data:(unsigned char *)list elements:i]; } --- 537,541 ---- // set _NET_WM_STATE with updated array ! [self setAtomProperty:GlobalIWM->atoms.net_wm_state data:(unsigned char *)list elements:i]; } *************** *** 655,662 **** } ! - (void)setWindowProperty:(Atom)property format:(int)format data:(unsigned char *)data elements:(int)elements { ! [self setProperty:property type:XA_WINDOW format:format data:data elements:elements]; } --- 655,662 ---- } ! - (void)setWindowProperty:(Atom)property data:(unsigned char *)data elements:(int)elements { ! [self setProperty:property type:XA_WINDOW format:32 data:data elements:elements]; } *************** *** 676,683 **** } ! - (void)setAtomProperty:(Atom)property format:(int)format data:(unsigned char *)data elements:(int)elements { ! [self setProperty:property type:XA_ATOM format:format data:data elements:elements]; } --- 676,683 ---- } ! - (void)setAtomProperty:(Atom)property data:(unsigned char *)data elements:(int)elements { ! [self setProperty:property type:XA_ATOM format:32 data:data elements:elements]; } *************** *** 698,702 **** [self setAtomProperty:GlobalIWM->atoms.iwm_window_type ! format:32 data:(unsigned char *)data elements:1]; } --- 698,702 ---- [self setAtomProperty:GlobalIWM->atoms.iwm_window_type ! data:(unsigned char *)data elements:1]; } Index: IWMWindowManager+Client.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager+Client.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IWMWindowManager+Client.m 13 Jun 2004 17:53:07 -0000 1.2 --- IWMWindowManager+Client.m 15 Jun 2004 05:22:21 -0000 1.3 *************** *** 81,84 **** --- 81,86 ---- Window list[count]; + // loop over clients in the array, adding each client's + // application window number to the list (EWMH) for (i = 0; i < count; i++) { *************** *** 99,103 **** // XXX - update _NET_CLIENT_LIST [[self rootWindow] setWindowProperty:atoms.net_client_list ! format:32 data:(unsigned char *)list elements:count]; } } --- 101,105 ---- // XXX - update _NET_CLIENT_LIST [[self rootWindow] setWindowProperty:atoms.net_client_list ! data:(unsigned char *)list elements:count]; } } *************** *** 222,226 **** // set _NET_ACTIVE_WINDOW property [[self rootWindow] setWindowProperty:atoms.net_active_window ! format:32 data:(unsigned char *)window elements:1]; } } --- 224,228 ---- // set _NET_ACTIVE_WINDOW property [[self rootWindow] setWindowProperty:atoms.net_active_window ! data:(unsigned char *)window elements:1]; } } *************** *** 230,237 **** --- 232,243 ---- unsigned int count = [clientArray count]; + // only perform a cycle if there is more than one client if (1 < count) { + // unfocus all clients in place [clientArray makeObjectsPerform:@selector(unfocus)]; + // if the head client is the last client in the array, + // change the head client index to 0 if (++_headClientIndex >= count) _headClientIndex = 0; Index: IWMWindow.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMWindow.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** IWMWindow.h 13 Jun 2004 17:53:07 -0000 1.17 --- IWMWindow.h 15 Jun 2004 05:22:21 -0000 1.18 *************** *** 208,212 **** data:(unsigned char *)data elements:(int)elements; ! - (void)setWindowProperty:(Atom)property format:(int)format data:(unsigned char *)data elements:(int)elements; --- 208,212 ---- data:(unsigned char *)data elements:(int)elements; ! - (void)setWindowProperty:(Atom)property data:(unsigned char *)data elements:(int)elements; Index: IWMScreen.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMScreen.m,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** IWMScreen.m 13 Jun 2004 17:53:06 -0000 1.20 --- IWMScreen.m 15 Jun 2004 05:22:21 -0000 1.21 *************** *** 174,182 **** // set property on root window to id of child window [rootWindow setWindowProperty:GlobalIWM->atoms.net_supporting_wm_check ! format:32 data:(unsigned char *)&tmp elements:1]; // set property on child window to it's own id [_ewmh_window setWindowProperty:GlobalIWM->atoms.net_supporting_wm_check ! format:32 data:(unsigned char *)&tmp elements:1]; /* --- 174,182 ---- // set property on root window to id of child window [rootWindow setWindowProperty:GlobalIWM->atoms.net_supporting_wm_check ! data:(unsigned char *)&tmp elements:1]; // set property on child window to it's own id [_ewmh_window setWindowProperty:GlobalIWM->atoms.net_supporting_wm_check ! data:(unsigned char *)&tmp elements:1]; /* |
|
From: <co...@us...> - 2003-12-14 09:12:16
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1:/tmp/cvs-serv10780 Modified Files: InterfaceWM.h GNUmakefile.local Log Message: fix freetype problems Index: InterfaceWM.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/InterfaceWM.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** InterfaceWM.h 30 Nov 2003 18:39:11 -0000 1.13 --- InterfaceWM.h 14 Dec 2003 06:15:35 -0000 1.14 *************** *** 38,42 **** #include <X11/Xresource.h> ! #include <freetype/freetype.h> #include <X11/Xft/Xft.h> --- 38,43 ---- #include <X11/Xresource.h> ! #include <ft2build.h> ! #include FT_FREETYPE_H #include <X11/Xft/Xft.h> Index: GNUmakefile.local =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/GNUmakefile.local,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GNUmakefile.local 12 Dec 2003 04:34:03 -0000 1.4 --- GNUmakefile.local 14 Dec 2003 06:15:35 -0000 1.5 *************** *** 28,32 **** # ! X11_INCLUDE_DIRS += -I/usr/X11R6/include -I/usr/local/include/freetype2 # --- 28,32 ---- # ! X11_INCLUDE_DIRS += -I/usr/X11R6/include -I/usr/include/freetype2 # |
|
From: <co...@us...> - 2003-12-14 08:33:30
|
Update of /cvsroot/interfacewm/interfacewm/Documents In directory sc8-pr-cvs1:/tmp/cvs-serv10824/Documents Modified Files: CONTRIBUTORS Log Message: add alex perez Index: CONTRIBUTORS =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/Documents/CONTRIBUTORS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CONTRIBUTORS 28 Oct 2003 01:02:10 -0000 1.1 --- CONTRIBUTORS 14 Dec 2003 06:15:57 -0000 1.2 *************** *** 14,17 **** --- 14,18 ---- - Tim Harrison - Tim Bissel (logo!) + * Alex Perez Indirect (see the COPYING file): |
|
From: <co...@us...> - 2003-12-12 04:34:51
|
Update of /cvsroot/interfacewm/interfacewm/IWMGraphics
In directory sc8-pr-cvs1:/tmp/cvs-serv10609
Modified Files:
GNUmakefile
Log Message:
comment out unused classes
Index: GNUmakefile
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/GNUmakefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** GNUmakefile 30 Nov 2003 22:42:44 -0000 1.3
--- GNUmakefile 12 Dec 2003 04:34:48 -0000 1.4
***************
*** 24,28 ****
include $(GNUSTEP_MAKEFILES)/common.make
! # GNUSTEP_INSTALLATION_DIR= $(GNUSTEP_USER_ROOT)
# PACKAGE_NAME= interfacewm
# LIBRARY_VAR= INTERFACEWM
--- 24,28 ----
include $(GNUSTEP_MAKEFILES)/common.make
! GNUSTEP_INSTALLATION_DIR= $(GNUSTEP_USER_ROOT)
# PACKAGE_NAME= interfacewm
# LIBRARY_VAR= INTERFACEWM
***************
*** 33,40 ****
ADDITIONAL_INCLUDE_DIRS+= -I..
- ADDITIONAL_INCLUDE_DIRS+= -I../protocols
- ADDITIONAL_INCLUDE_DIRS+= -I../IWMExtensions
- ADDITIONAL_LIB_DIRS+= -L../IWMExtensions/$(GNUSTEP_OBJ_DIR)
ADDITIONAL_LD_FLAGS+= -lwraster
--- 33,37 ----
***************
*** 43,47 ****
IWMTexture.h \
IWMSolidTexture.h \
! IWMGradientTexture.h \
IWMMGradientTexture.h \
IWMTGradientTexture.h \
--- 40,45 ----
IWMTexture.h \
IWMSolidTexture.h \
! IWMPixmapTexture.h
! # IWMGradientTexture.h \
IWMMGradientTexture.h \
IWMTGradientTexture.h \
***************
*** 51,55 ****
IWMTexture.m \
IWMSolidTexture.m \
! IWMGradientTexture.m \
IWMMGradientTexture.m \
IWMTGradientTexture.m \
--- 49,54 ----
IWMTexture.m \
IWMSolidTexture.m \
! IWMPixmapTexture.m
! # IWMGradientTexture.m \
IWMMGradientTexture.m \
IWMTGradientTexture.m \
|
|
From: <co...@us...> - 2003-12-12 04:34:06
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1:/tmp/cvs-serv10518 Modified Files: GNUmakefile GNUmakefile.local GNUmakefile.preamble Log Message: some cleanup, some confusion Index: GNUmakefile =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/GNUmakefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** GNUmakefile 28 Oct 2003 04:34:49 -0000 1.12 --- GNUmakefile 12 Dec 2003 04:34:03 -0000 1.13 *************** *** 33,36 **** --- 33,39 ---- TOOL_NAME= $(PACKAGE_NAME) + ADDITIONAL_INCLUDE_DIRS+= -IIWMExtensions -IIWMGraphics -IIWMComponent + ADDITIONAL_LDFLAGS+= -lIWMExtensions -lIWMGraphics -lIWMComponent + # header files $(TOOL_NAME)_HEADER_FILES= IWMCoreUtilities.h \ Index: GNUmakefile.local =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/GNUmakefile.local,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GNUmakefile.local 8 Oct 2003 04:31:44 -0000 1.3 --- GNUmakefile.local 12 Dec 2003 04:34:03 -0000 1.4 *************** *** 46,50 **** # ! ADDITIONAL_CPPFLAGS += -UDEBUG # --- 46,50 ---- # ! #ADDITIONAL_CPPFLAGS += -UDEBUG # Index: GNUmakefile.preamble =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/GNUmakefile.preamble,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GNUmakefile.preamble 4 Sep 2003 16:30:43 -0000 1.8 --- GNUmakefile.preamble 12 Dec 2003 04:34:03 -0000 1.9 *************** *** 31,35 **** MINOR_VERSION = 2 SUBMINOR_VERSION = 4 - IWMVERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION) --- 31,34 ---- *************** *** 39,44 **** MAKEFLAGS += -s ! MAKEFLAGS += warn=yes diagnose=yes debug=no messages=yes ! MAKEFLAGS += shared=yes strip=yes # --- 38,42 ---- MAKEFLAGS += -s ! MAKEFLAGS += warn=yes diagnose=yes messages=yes shared=yes #debug=no strip=yes # *************** *** 55,75 **** # - # Additional include directories the compiler should search - # - - ADDITIONAL_INCLUDE_DIRS += -I./protocols - ADDITIONAL_INCLUDE_DIRS += -IIWMExtensions -IIWMGraphics -IIWMComponent - - # # Additional LDFLAGS to pass to the linker # ! ADDITIONAL_LDFLAGS += -s ! ! ifeq ($(findstring debug=yes, $(MAKEFLAGS)), debug=yes) ! ADDITIONAL_LDFLAGS += -lIWMExtensions_d -lIWMGraphics_d -lIWMComponent_d ! else ! ADDITIONAL_LDFLAGS += -lIWMExtensions -lIWMGraphics -lIWMComponent ! endif # --- 53,60 ---- # # Additional LDFLAGS to pass to the linker # ! #ADDITIONAL_LDFLAGS += -s # *************** *** 77,96 **** # ! ADDITIONAL_LIB_DIRS += -LIWMExtensions/$(GNUSTEP_OBJ_DIR) ! ADDITIONAL_LIB_DIRS += -LIWMGraphics/$(GNUSTEP_OBJ_DIR) ! ADDITIONAL_LIB_DIRS += -LIWMComponent/$(GNUSTEP_OBJ_DIR) ! ! # ! # Additional tool directories the linker should search ! # ! ! ADDITIONAL_TOOL_LIBS += ! ! # ! # Additional directories to be created during installation ! # ! ! ADDITIONAL_INSTALL_DIRS += - # - # End of File. --- 62,67 ---- # ! #ADDITIONAL_LIB_DIRS += -LIWMExtensions/$(GNUSTEP_OBJ_DIR) ! #ADDITIONAL_LIB_DIRS += -LIWMGraphics/$(GNUSTEP_OBJ_DIR) ! #ADDITIONAL_LIB_DIRS += -LIWMComponent/$(GNUSTEP_OBJ_DIR) |
|
From: <co...@us...> - 2003-12-12 04:33:31
|
Update of /cvsroot/interfacewm/interfacewm/IWMComponent In directory sc8-pr-cvs1:/tmp/cvs-serv10440 Modified Files: GNUmakefile Log Message: minor mods Index: GNUmakefile =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMComponent/GNUmakefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GNUmakefile 8 Sep 2003 16:25:31 -0000 1.2 --- GNUmakefile 12 Dec 2003 04:33:28 -0000 1.3 *************** *** 24,28 **** include $(GNUSTEP_MAKEFILES)/common.make ! # GNUSTEP_INSTALLATION_DIR= $(GNUSTEP_USER_ROOT) # PACKAGE_NAME= interfacewm # LIBRARY_VAR= INTERFACEWM --- 24,28 ---- include $(GNUSTEP_MAKEFILES)/common.make ! GNUSTEP_INSTALLATION_DIR= $(GNUSTEP_USER_ROOT) # PACKAGE_NAME= interfacewm # LIBRARY_VAR= INTERFACEWM *************** *** 34,40 **** ADDITIONAL_INCLUDE_DIRS+= -I.. - - ADDITIONAL_INCLUDE_DIRS+= -I../IWMExtensions - ADDITIONAL_LIB_DIRS+= -L../IWMExtensions/$(GNUSTEP_OBJ_DIR) srcdir= . --- 34,37 ---- |
|
From: <co...@us...> - 2003-12-12 04:33:08
|
Update of /cvsroot/interfacewm/interfacewm/IWMExtensions
In directory sc8-pr-cvs1:/tmp/cvs-serv10421
Modified Files:
GNUmakefile
Removed Files:
NSFileManagerExt.h NSFileManagerExt.m
Log Message:
mod makefile, remove NSFileManagerExt
Index: GNUmakefile
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMExtensions/GNUmakefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** GNUmakefile 10 Dec 2003 00:05:15 -0000 1.4
--- GNUmakefile 12 Dec 2003 04:33:04 -0000 1.5
***************
*** 8,12 ****
GNUSTEP_INSTALLATION_DIR= $(GNUSTEP_USER_ROOT)
PACKAGE_NAME= interfacewm
- # LIBRARY_VAR= INTERFACEWM
LIBRARY_NAME= libIWMExtensions
--- 8,11 ----
***************
*** 19,28 ****
${LIBRARY_NAME}_HEADER_FILES= NSArrayExt.h \
! NSDictionaryExt.h \
! NSFileManagerExt.h
${LIBRARY_NAME}_OBJC_FILES= NSArrayExt.m \
! NSDictionaryExt.m \
! NSFileManagerExt.m
-include ../GNUmakefile.preamble
--- 18,25 ----
${LIBRARY_NAME}_HEADER_FILES= NSArrayExt.h \
! NSDictionaryExt.h
${LIBRARY_NAME}_OBJC_FILES= NSArrayExt.m \
! NSDictionaryExt.m
-include ../GNUmakefile.preamble
--- NSFileManagerExt.h DELETED ---
--- NSFileManagerExt.m DELETED ---
|
Update of /cvsroot/interfacewm/interfacewm/IWMGraphics
In directory sc8-pr-cvs1:/tmp/cvs-serv10211
Modified Files:
IWMImage.h IWMImage.m IWMPixmapTexture.h IWMPixmapTexture.m
IWMTexture.h IWMTexture.m IWMGradientTexture.m
Log Message:
updates
Index: IWMImage.h
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/IWMImage.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IWMImage.h 19 Aug 2003 01:51:47 -0000 1.1
--- IWMImage.h 12 Dec 2003 04:31:59 -0000 1.2
***************
*** 33,36 ****
--- 33,37 ----
@class NSString;
@class IWMWindow;
+ @class IWMPixmapTexture;
typedef enum {
***************
*** 41,45 ****
{
IWMScreen *screen;
! IWMCoreImage image;
}
--- 42,48 ----
{
IWMScreen *screen;
! //IWMCoreImage image;
! IWMPixmapTexture *texture;
! RImage *image;
}
Index: IWMImage.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/IWMImage.m,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IWMImage.m 19 Aug 2003 01:51:47 -0000 1.1
--- IWMImage.m 12 Dec 2003 04:31:59 -0000 1.2
***************
*** 27,38 ****
#include "IWMScreen.h"
#include "IWMWindowManager.h"
- #include "NSFileManagerExt.h"
#define BOOL XWINDOWSBOOL
#include "IWMImage.h"
#undef BOOL
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSAutoreleasePool.h>
--- 27,40 ----
#include "IWMScreen.h"
#include "IWMWindowManager.h"
#define BOOL XWINDOWSBOOL
#include "IWMImage.h"
+ #include "IWMTexture.h"
+ #include "IWMPixmapTexture.h"
#undef BOOL
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
+ #include <Foundation/NSFileManager.h>
#include <Foundation/NSAutoreleasePool.h>
***************
*** 42,50 ****
{
NSFileManager *manager = [NSFileManager defaultManager];
/*
* full path given
*/
! if ([manager fileExistsAtPath:name])
{
return [[IWMImage alloc] initOnScreen:aScreen file:name];
--- 44,53 ----
{
NSFileManager *manager = [NSFileManager defaultManager];
+ BOOL isDir = NO;
/*
* full path given
*/
! if ([manager fileExistsAtPath:name isDirectory:&isDir] && !isDir)
{
return [[IWMImage alloc] initOnScreen:aScreen file:name];
***************
*** 87,90 ****
--- 90,94 ----
- initOnScreen:(IWMScreen *)aScreen image:(IWMCoreImage)anImage
{
+ #if 0
if ((self = [super init]))
{
***************
*** 94,98 ****
return self;
}
!
return nil;
}
--- 98,102 ----
return self;
}
! #endif
return nil;
}
***************
*** 102,107 ****
if ((self = [super init]))
{
screen = aScreen;
! image = iwm_image_new(screen, (char *)[aFilepath cString]);
return self;
--- 106,119 ----
if ((self = [super init]))
{
+ XColor color;
+
screen = aScreen;
!
! if (!XParseColor(GlobalDisplay, [aScreen colormap], "black", &color))
! return nil;
!
! texture = [[IWMPixmapTexture alloc] initWithScreen:aScreen
! style:WTP_SCALE pixmapFile:(char *)[aFilepath cString]
! color:&color];
return self;
***************
*** 124,135 ****
- (IWMImage *)scaleToWidth:(unsigned)aWidth height:(unsigned)aHeight
{
! IWMCoreImage core;
! IWMImage *new;
!
! core = iwm_image_scale(image, aWidth, aHeight);
! new = [[IWMImage alloc] initOnScreen:screen image:core];
! return [new autorelease];
}
--- 136,151 ----
- (IWMImage *)scaleToWidth:(unsigned)aWidth height:(unsigned)aHeight
{
! //IWMCoreImage core;
! //IWMImage *new;
! //core = iwm_image_scale(image, aWidth, aHeight);
! //new = [[IWMImage alloc] initOnScreen:screen image:core];
! //return [new autorelease];
! if (image)
! RReleaseImage(image);
! image = NULL;
! image = [texture centerImageToWidth:aWidth height:aHeight relief:WREL_FLAT];
! return self;
}
***************
*** 139,149 ****
- (IWMImage *)tileToWidth:(unsigned)aWidth height:(unsigned)aHeight
{
! IWMCoreImage core;
! IWMImage *new;
!
! core = iwm_image_tile(image, aWidth, aHeight);
! new = [[IWMImage alloc] initOnScreen:screen image:core];
! return [new autorelease];
}
--- 155,170 ----
- (IWMImage *)tileToWidth:(unsigned)aWidth height:(unsigned)aHeight
{
! //IWMCoreImage core;
! //IWMImage *new;
! //core = iwm_image_tile(image, aWidth, aHeight);
! //new = [[IWMImage alloc] initOnScreen:screen image:core];
! //return [new autorelease];
! if (image)
! RReleaseImage(image);
! image = NULL;
! image = [texture tileImageToWidth:aWidth height:aHeight relief:WREL_FLAT];
!
! return self;
}
***************
*** 155,162 ****
{
Pixmap pixmap;
! pixmap = iwm_image_pixmap(image, screen);
! return pixmap;
}
--- 176,189 ----
{
Pixmap pixmap;
+ int result;
! if ((result = RConvertImage(screen->rcontext, image, &pixmap))) {
! fprintf(stderr, "Converted image to pixmap\n");
! return pixmap;
! }
! fprintf(stderr, "Failed to convert image to pixmap\n");
!
! return NULL;
}
***************
*** 172,181 ****
Pixmap pixmap;
IWMScreen *_screen;
if (!(_screen = [[aWindow client] screen]))
_screen = [[GlobalIWM screenArray] objectAtIndex:0];
! pixmap = iwm_image_set_into_window(image, aWindow, _screen);
return pixmap;
}
--- 199,214 ----
Pixmap pixmap;
IWMScreen *_screen;
+ int width = [aWindow width];
+ int height = [aWindow height];
if (!(_screen = [[aWindow client] screen]))
_screen = [[GlobalIWM screenArray] objectAtIndex:0];
! [self scaleToWidth:width height:height];
! pixmap = [self convertToPixmap];
!
+ [aWindow setPixmap:pixmap];
+
return pixmap;
}
***************
*** 187,192 ****
- (void)setImage:(IWMCoreImage)anImage
{
! iwm_image_release(image);
! image = anImage;
}
--- 220,225 ----
- (void)setImage:(IWMCoreImage)anImage
{
! //iwm_image_release(image);
! //image = anImage;
}
***************
*** 198,227 ****
- (IWMCoreImage)image
{
! return image;
}
- (unsigned char *)data
{
! return image.image->data;
}
- (int)width
{
! return image.image->width;
}
- (int)height
{
! return image.image->height;
}
- (IWMImageFormat)format
{
! return (IWMImageFormat)image.image->format;
}
- (RColor)background
{
! return image.image->background;
}
--- 231,263 ----
- (IWMCoreImage)image
{
! IWMCoreImage foo;
!
! return foo;
! //return image;
}
- (unsigned char *)data
{
! return image->data;
}
- (int)width
{
! return image->width;
}
- (int)height
{
! return image->height;
}
- (IWMImageFormat)format
{
! return (IWMImageFormat)image->format;
}
- (RColor)background
{
! return image->background;
}
***************
*** 230,234 ****
NSString *string = nil;
! string = [NSString stringWithCString:iwm_image_format(image)];
return string;
--- 266,270 ----
NSString *string = nil;
! //string = [NSString stringWithCString:iwm_image_format(image)];
return string;
***************
*** 252,257 ****
{
screen = nil;
! iwm_image_release(image);
!
[super dealloc];
}
--- 288,295 ----
{
screen = nil;
! //iwm_image_release(image);
! RReleaseImage(image);
! [texture dealloc];
!
[super dealloc];
}
Index: IWMPixmapTexture.h
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/IWMPixmapTexture.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IWMPixmapTexture.h 30 Nov 2003 22:42:44 -0000 1.1
--- IWMPixmapTexture.h 12 Dec 2003 04:31:59 -0000 1.2
***************
*** 46,49 ****
--- 46,58 ----
relief:(int)aRelief;
+ - (RImage *)tileImageToWidth:(int)aWidth height:(int)aHeight
+ relief:(int)aRelief;
+
+ - (RImage *)scaleImageToWidth:(int)aWidth height:(int)aHeight
+ relief:(int)aRelief;
+
+ - (RImage *)centerImageToWidth:(int)aWidth height:(int)aHeight
+ relief:(int)aRelief;
+
@end
Index: IWMPixmapTexture.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/IWMPixmapTexture.m,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IWMPixmapTexture.m 30 Nov 2003 22:42:44 -0000 1.1
--- IWMPixmapTexture.m 12 Dec 2003 04:31:59 -0000 1.2
***************
*** 30,33 ****
--- 30,34 ----
#include <IWMWindow.h>
#include <IWMWindowManager.h>
+ #include <IWMDebug.h>
#undef BOOL
***************
*** 40,43 ****
--- 41,48 ----
RImage *image;
+ IWMTRACE;
+
+ fprintf(stderr, "Initializing IWMPixmapTexture: %s\n", aPixmapFile);
+
//XXX verify file path here
***************
*** 66,70 ****
}
! - (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
--- 71,101 ----
}
! - (RImage *)tileImageToWidth:(int)aWidth height:(int)aHeight
! relief:(int)aRelief
! {
! RImage *image = NULL;
!
! fprintf(stderr, "Tiling image...\n");
!
! image = RMakeTiledImage(pixmap, aWidth, aHeight);
!
! return [super finishProcessing:image width:aWidth height:aHeight
! relief:aRelief];
! }
!
! - (RImage *)scaleImageToWidth:(int)aWidth height:(int)aHeight
! relief:(int)aRelief
! {
! RImage *image = NULL;
!
! fprintf(stderr, "Scaling image...\n");
!
! image = RScaleImage(pixmap, aWidth, aHeight);
!
! return [super finishProcessing:image width:aWidth height:aHeight
! relief:aRelief];
! }
!
! - (RImage *)centerImageToWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
***************
*** 72,88 ****
RColor color1;
! if (subtype == WTP_TILE) {
! image = RMakeTiledImage(pixmap, aWidth, aHeight);
! }
! else if (subtype == WTP_CENTER) {
! color1.red = color.red>>8;
! color1.green = color.green>>8;
! color1.blue = color.blue>>8;
! color1.alpha = 255;
! image = RMakeCenteredImage(pixmap, aWidth, aHeight, &color1);
! }
! else {
! image = RScaleImage(pixmap, aWidth, aHeight);
! }
return [super finishProcessing:image width:aWidth height:aHeight
--- 103,115 ----
RColor color1;
! IWMTRACE;
!
! fprintf(stderr, "Centering image...\n");
!
! color1.red = color.red>>8;
! color1.green = color.green>>8;
! color1.blue = color.blue>>8;
! color1.alpha = 255;
! image = RMakeCenteredImage(pixmap, aWidth, aHeight, &color1);
return [super finishProcessing:image width:aWidth height:aHeight
Index: IWMTexture.h
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/IWMTexture.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IWMTexture.h 30 Nov 2003 22:42:44 -0000 1.1
--- IWMTexture.h 12 Dec 2003 04:31:59 -0000 1.2
***************
*** 79,82 ****
--- 79,84 ----
height:(int)aHeight relief:(int)aRelief;
+ // missing wDrawBevel() implementation
+
@end
Index: IWMTexture.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/IWMTexture.m,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IWMTexture.m 30 Nov 2003 22:42:44 -0000 1.1
--- IWMTexture.m 12 Dec 2003 04:31:59 -0000 1.2
***************
*** 29,32 ****
--- 29,33 ----
#include <IWMWindow.h>
#include <IWMWindowManager.h>
+ #include <IWMDebug.h>
#undef BOOL
***************
*** 53,56 ****
--- 54,59 ----
- (RImage *)checkImage:(RImage *)image width:(int)aWidth height:(int)aHeight
{
+ IWMTRACE;
+
if (!image) {
RColor gray;
***************
*** 110,113 ****
--- 113,118 ----
int height = image->height;
RColor rcolor;
+
+ IWMTRACE;
switch (relief) {
***************
*** 142,145 ****
--- 147,152 ----
height:(int)aHeight relief:(int)aRelief
{
+ IWMTRACE;
+
RImage *image = [self checkImage:anImage width:aWidth height:aHeight];
int d = [self bevelDepthForRelief:aRelief];
Index: IWMGradientTexture.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/IWMGradientTexture.m,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IWMGradientTexture.m 30 Nov 2003 22:42:44 -0000 1.1
--- IWMGradientTexture.m 12 Dec 2003 04:31:59 -0000 1.2
***************
*** 65,69 ****
RImage *image;
! switch (type)
case WTEX_HGRADIENT:
subtype = RGRD_HORIZONTAL;
--- 65,69 ----
RImage *image;
! switch (type) {
case WTEX_HGRADIENT:
subtype = RGRD_HORIZONTAL;
***************
*** 77,81 ****
subtype = RGRD_DIAGONAL;
break;
!
image = RRenderGradient(aWidth, aHeight, &color1, &color2, subtype);
--- 77,82 ----
subtype = RGRD_DIAGONAL;
break;
! }
!
image = RRenderGradient(aWidth, aHeight, &color1, &color2, subtype);
|
|
From: <co...@us...> - 2003-12-12 04:30:54
|
Update of /cvsroot/interfacewm/interfacewm/IWMComponent In directory sc8-pr-cvs1:/tmp/cvs-serv10096 Modified Files: IWMComponentManager.m Log Message: mods to IWMExtensions Index: IWMComponentManager.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMComponent/IWMComponentManager.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IWMComponentManager.m 19 Aug 2003 02:01:36 -0000 1.1 --- IWMComponentManager.m 12 Dec 2003 04:30:51 -0000 1.2 *************** *** 29,33 **** #include "IWMComponent.h" #include "IWMCoreUtilities.h" - #include "NSFileManagerExt.h" #include <Foundation/NSString.h> --- 29,32 ---- *************** *** 36,39 **** --- 35,39 ---- #include <Foundation/NSUtilities.h> #include <Foundation/NSPathUtilities.h> + #include <Foundation/NSFileManager.h> #include <Foundation/NSNotification.h> #include <Foundation/NSAutoreleasePool.h> |
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv9981
Modified Files:
IWMClient.m IWMController.m IWMScreen.m IWMTheme.m
IWMWindowManager+Event.m IWMWindow.m IWMWindowManager.m
Log Message:
mods to IWMExtensions
Index: IWMClient.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.m,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** IWMClient.m 30 Nov 2003 18:40:15 -0000 1.33
--- IWMClient.m 12 Dec 2003 04:30:07 -0000 1.34
***************
*** 32,37 ****
#include "IWMWindowManager.h"
#include "IWMCoreUtilities.h"
- #include "NSDictionaryExt.h"
#include <IWMGraphics/IWMImage.h>
--- 32,37 ----
#include "IWMWindowManager.h"
#include "IWMCoreUtilities.h"
+ #include <IWMExtensions/NSDictionaryExt.h>
#include <IWMGraphics/IWMImage.h>
Index: IWMController.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMController.m,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IWMController.m 28 Nov 2003 19:21:22 -0000 1.5
--- IWMController.m 12 Dec 2003 04:30:07 -0000 1.6
***************
*** 24,28 ****
#include "InterfaceWM.h"
#include "IWMWindowManager.h"
- #include "IWMOptionParser.h"
#include "IWMDebug.h"
--- 24,27 ----
Index: IWMScreen.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMScreen.m,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** IWMScreen.m 30 Nov 2003 18:35:07 -0000 1.18
--- IWMScreen.m 12 Dec 2003 04:30:07 -0000 1.19
***************
*** 444,448 ****
[self initializeGraphicsContexts];
! [self setScreenBackgroundImage:[theme backgroundImage]];
return YES;
--- 444,448 ----
[self initializeGraphicsContexts];
! //[self setScreenBackgroundImage:[theme backgroundImage]];
return YES;
***************
*** 466,470 ****
if (anImage)
{
! iwm_image_set_into_window([anImage image], rootWindow, self);
}
}
--- 466,471 ----
if (anImage)
{
! [rootWindow setImage:anImage];
! //iwm_image_set_into_window([anImage image], rootWindow, self);
}
}
Index: IWMTheme.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMTheme.m,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** IWMTheme.m 17 Nov 2003 06:16:29 -0000 1.10
--- IWMTheme.m 12 Dec 2003 04:30:07 -0000 1.11
***************
*** 28,32 ****
#include <IWMExtensions/NSDictionaryExt.h>
- #include <IWMExtensions/NSFileManagerExt.h>
#include <Foundation/NSString.h>
--- 28,31 ----
***************
*** 34,37 ****
--- 33,37 ----
#include <Foundation/NSUserDefaults.h>
#include <Foundation/NSPathUtilities.h>
+ #include <Foundation/NSFileManager.h>
#include <Foundation/NSBundle.h>
#include <Foundation/NSAutoreleasePool.h>
***************
*** 127,130 ****
--- 127,131 ----
{
NSString *aPath = nil;
+ BOOL isDir = NO;
// create the full path of the theme directory
***************
*** 135,139 ****
// found the theme
! if ([fileManager directoryExistsAtPath:aPath])
{
NSLog(@"-> Found directory at path: %@", aPath);
--- 136,141 ----
// found the theme
! if ([fileManager fileExistsAtPath:aPath isDirectory:&isDir] &&
! isDir)
{
NSLog(@"-> Found directory at path: %@", aPath);
Index: IWMWindowManager+Event.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager+Event.m,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** IWMWindowManager+Event.m 30 Nov 2003 18:42:18 -0000 1.17
--- IWMWindowManager+Event.m 12 Dec 2003 04:30:07 -0000 1.18
***************
*** 136,144 ****
- (void)cacheEventTime:(XEvent *)event
{
- IWMTRACE;
-
Time NewTimestamp = CurrentTime;
-
- IWMTRACE;
switch (event->type) {
--- 136,140 ----
Index: IWMWindow.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindow.m,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** IWMWindow.m 30 Nov 2003 18:42:17 -0000 1.21
--- IWMWindow.m 12 Dec 2003 04:30:07 -0000 1.22
***************
*** 310,313 ****
--- 310,315 ----
pixmap = [anImage setAsPixmapBackgroundInWindow:self];
+
+
}
}
***************
*** 454,460 ****
- (int)windowState
{
! Atom realType;
! int realFormat, state;
! unsigned long n, extra;
unsigned char *data;
int count;
--- 456,464 ----
- (int)windowState
{
! //Atom realType;
! //int realFormat;
! int state;
! //unsigned long n;
! //unsigned long extra;
unsigned char *data;
int count;
Index: IWMWindowManager.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager.m,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** IWMWindowManager.m 30 Nov 2003 18:39:11 -0000 1.28
--- IWMWindowManager.m 12 Dec 2003 04:30:08 -0000 1.29
***************
*** 32,37 ****
#include "IWMComponentManager.h"
! #include "NSArrayExt.h"
! #include "NSDictionaryExt.h"
#include <Foundation/NSString.h>
--- 32,37 ----
#include "IWMComponentManager.h"
! #include <IWMExtensions/NSArrayExt.h>
! #include <IWMExtensions/NSDictionaryExt.h>
#include <Foundation/NSString.h>
|
|
From: <co...@us...> - 2003-12-10 00:05:18
|
Update of /cvsroot/interfacewm/interfacewm/IWMExtensions
In directory sc8-pr-cvs1:/tmp/cvs-serv21775
Modified Files:
GNUmakefile
Log Message:
remove IWMOptionParser class
Index: GNUmakefile
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMExtensions/GNUmakefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** GNUmakefile 24 Sep 2003 19:12:18 -0000 1.3
--- GNUmakefile 10 Dec 2003 00:05:15 -0000 1.4
***************
*** 6,11 ****
include $(GNUSTEP_MAKEFILES)/common.make
! # GNUSTEP_INSTALLATION_DIR= $(GNUSTEP_USER_ROOT)
! # PACKAGE_NAME= interfacewm
# LIBRARY_VAR= INTERFACEWM
LIBRARY_NAME= libIWMExtensions
--- 6,11 ----
include $(GNUSTEP_MAKEFILES)/common.make
! GNUSTEP_INSTALLATION_DIR= $(GNUSTEP_USER_ROOT)
! PACKAGE_NAME= interfacewm
# LIBRARY_VAR= INTERFACEWM
LIBRARY_NAME= libIWMExtensions
***************
*** 20,30 ****
${LIBRARY_NAME}_HEADER_FILES= NSArrayExt.h \
NSDictionaryExt.h \
! NSFileManagerExt.h \
! IWMOptionParser.h
${LIBRARY_NAME}_OBJC_FILES= NSArrayExt.m \
NSDictionaryExt.m \
! NSFileManagerExt.m \
! IWMOptionParser.m
-include ../GNUmakefile.preamble
--- 20,28 ----
${LIBRARY_NAME}_HEADER_FILES= NSArrayExt.h \
NSDictionaryExt.h \
! NSFileManagerExt.h
${LIBRARY_NAME}_OBJC_FILES= NSArrayExt.m \
NSDictionaryExt.m \
! NSFileManagerExt.m
-include ../GNUmakefile.preamble
|
Update of /cvsroot/interfacewm/interfacewm/IWMGraphics
In directory sc8-pr-cvs1:/tmp/cvs-serv20393
Modified Files:
GNUmakefile
Added Files:
IWMGradientTexture.h IWMGradientTexture.m
IWMIGradientTexture.h IWMIGradientTexture.m
IWMMGradientTexture.h IWMMGradientTexture.m IWMPixmapTexture.h
IWMPixmapTexture.m IWMSolidTexture.h IWMSolidTexture.m
IWMTGradientTexture.h IWMTGradientTexture.m IWMTexture.h
IWMTexture.m IWMTextureStuff.m
Log Message:
initial texture classes
--- NEW FILE: IWMGradientTexture.h ---
/*
* $Id: IWMGradientTexture.h,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IWMGRADIENTTEXTURE_H_
#define _IWMGRADIENTTEXTURE_H_ 1
#include "IWMTexture.h"
#include "wraster.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#undef BOOL
@class IWMScreen;
@interface IWMGradientTexture : IWMTexture
{
@public
RColor color1;
RColor color2;
}
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
fromColor:(RColor *)fromColor toColor:(RColor *)toColor;
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief;
@end
#endif
--- NEW FILE: IWMGradientTexture.m ---
/*
* $Id: IWMGradientTexture.m,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "IWMGradientTexture.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#include <IWMScreen.h>
#include <IWMWindow.h>
#include <IWMWindowManager.h>
#undef BOOL
@implementation IWMGradientTexture
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
fromColor:(RColor *)fromColor toColor:(RColor *)toColor
{
XGCValues gcv;
Window rootWindow = ([aScreen rootWindow])->xWindow;
[super init];
type = aStyle;
subtype = 0;
color1 = *fromColor;
color2 = *toColor;
color.red = (fromColor->red + toColor->red)<<7;
color.green = (fromColor->green + toColor->green)<<7;
color.blue = (fromColor->blue + toColor->blue)<<7;
XAllocColor(GlobalDisplay, [aScreen colormap], &color);
gcv.background = gcv.foreground = color.pixel;
gcv.graphics_exposures = False;
gc = XCreateGC(GlobalDisplay, rootWindow, GCForeground|GCBackground
|GCGraphicsExposures, &gcv);
return self;
}
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
RImage *image;
switch (type)
case WTEX_HGRADIENT:
subtype = RGRD_HORIZONTAL;
break;
case WTEX_VGRADIENT:
subtype = RGRD_VERTICAL;
break;
case WTEX_DGRADIENT:
subtype = RGRD_DIAGONAL;
break;
image = RRenderGradient(aWidth, aHeight, &color1, &color2, subtype);
return [super finishProcessing:image width:aWidth height:aHeight
relief:aRelief];
}
@end
--- NEW FILE: IWMIGradientTexture.h ---
/*
* $Id: IWMIGradientTexture.h,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IWMIGRADIENTTEXTURE_H_
#define _IMWIGRADIENTTEXTURE_H_ 1
#include "IWMTexture.h"
#include "wraster.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#undef BOOL
@interface IWMIGradientTexture : IWMTexture
{
@public
char dummy;
RColor colors1[2];
RColor colors2[2];
int thickness1;
int thickness2;
}
@end
#endif
--- NEW FILE: IWMIGradientTexture.m ---
/*
* $Id: IWMIGradientTexture.m,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "IWMIGradientTexture.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
//#include <Foundation/NSString.h>
#include <IWMScreen.h>
#include <IWMWindow.h>
#include <IWMWindowManager.h>
#undef BOOL
@implementation IWMIGradientTexture
@end
--- NEW FILE: IWMMGradientTexture.h ---
/*
* $Id: IWMMGradientTexture.h,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IWMMGRADIENTTEXTURE_H_
#define _IMWMGRADIENTTEXTURE_H_ 1
#include "IWMTexture.h"
#include "wraster.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#undef BOOL
@class IWMScreen;
@interface IWMMGradientTexture : IWMTexture
{
@public
RColor **colors;
}
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
colors:(RColor **)theColors;
@end
#endif
--- NEW FILE: IWMMGradientTexture.m ---
/*
* $Id: IWMMGradientTexture.m,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "IWMMGradientTexture.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#include <IWMScreen.h>
#include <IWMWindow.h>
#include <IWMWindowManager.h>
#undef BOOL
@implementation IWMMGradientTexture
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
colors:(RColor **)theColors
{
XGCValues gcv;
int i;
[super init];
type = aStyle;
subtype = 0;
i=0;
while (theColors[i]!=NULL) i++;
i--;
color.red = (theColors[0]->red<<8);
color.green = (theColors[0]->green<<8);
color.blue = (theColors[0]->blue<<8);
colors = theColors;
XAllocColor(GlobalDisplay, [aScreen colormap], &color);
gcv.background = gcv.foreground = color.pixel;
gcv.graphics_exposures = False;
gc = XCreateGC(GlobalDisplay, ([aScreen rootWindow])->xWindow,
GCForeground|GCBackground|GCGraphicsExposures, &gcv);
return self;
}
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
switch (type)
case WTEX_MHGRADIENT:
subtype = RGRD_HORIZONTAL;
break;
case WTEX_MVGRADIENT:
subtype = RGRD_VERTICAL;
break;
case WTEX_MDGRADIENT:
subtype = RGRD_DIAGONAL;
break;
RImage *image = RRenderMultiGradient(aWidth, aHeight,
&colors[1], subtype);
return [super finishProcessing:image width:aWidth height:aHeight
relief:aRelief];
}
@end
--- NEW FILE: IWMPixmapTexture.h ---
/*
* $Id: IWMPixmapTexture.h,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IWMMPIXMAPTEXTURE_H_
#define _IMWMPIXMAPTEXTURE_H_ 1
#include "IWMTexture.h"
#include "wraster.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#undef BOOL
@class IWMScreen;
@interface IWMPixmapTexture : IWMTexture
{
@public
RImage *pixmap;
}
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
pixmapFile:(char *)aPixmapFile color:(XColor *)aColor;
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief;
@end
#endif
--- NEW FILE: IWMPixmapTexture.m ---
/*
* $Id: IWMPixmapTexture.m,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "IWMPixmapTexture.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
//#include <Foundation/NSString.h>
#include <IWMScreen.h>
#include <IWMWindow.h>
#include <IWMWindowManager.h>
#undef BOOL
@implementation IWMPixmapTexture
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
pixmapFile:(char *)aPixmapFile color:(XColor *)aColor
{
XGCValues gcv;
RImage *image;
//XXX verify file path here
image = RLoadImage(aScreen->rcontext, aPixmapFile, 0);
if (!image)
{
NSLog(@"Could not load texture pixmap: %s", aPixmapFile);
NSLog(@"%s", RMessageForError(RErrorCode));
return nil;
}
type = WTEX_PIXMAP;
subtype = aStyle;
color = *aColor;
XAllocColor(GlobalDisplay, [aScreen colormap], &color);
gcv.background = gcv.foreground = color.pixel;
gcv.graphics_exposures = False;
gc = XCreateGC(GlobalDisplay, ([aScreen rootWindow])->xWindow,
GCForeground|GCBackground|GCGraphicsExposures, &gcv);
pixmap = image;
return self;
}
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
RImage *image = NULL;
RColor color1;
if (subtype == WTP_TILE) {
image = RMakeTiledImage(pixmap, aWidth, aHeight);
}
else if (subtype == WTP_CENTER) {
color1.red = color.red>>8;
color1.green = color.green>>8;
color1.blue = color.blue>>8;
color1.alpha = 255;
image = RMakeCenteredImage(pixmap, aWidth, aHeight, &color1);
}
else {
image = RScaleImage(pixmap, aWidth, aHeight);
}
return [super finishProcessing:image width:aWidth height:aHeight
relief:aRelief];
}
- (void)dealloc
{
RReleaseImage(pixmap);
[super dealloc];
}
@end
--- NEW FILE: IWMSolidTexture.h ---
/*
* $Id: IWMSolidTexture.h,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IWMSOLIDTEXTURE_H_
#define _IMWSOLIDTEXTURE_H_ 1
#include "IWMTexture.h"
#include "wraster.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#undef BOOL
@class IWMScreen;
@interface IWMSolidTexture : IWMTexture
{
@public
GC light_gc;
GC dim_gc;
GC dark_gc;
XColor light;
XColor dim;
XColor dark;
}
- initWithScreen:(IWMScreen *)aScreen color:(XColor *)aColor;
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief;
@end
#endif
--- NEW FILE: IWMSolidTexture.m ---
/*
* $Id: IWMSolidTexture.m,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "IWMSolidTexture.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#include <IWMScreen.h>
#include <IWMWindow.h>
#include <IWMWindowManager.h>
#undef BOOL
@implementation IWMSolidTexture
- initWithScreen:(IWMScreen *)aScreen color:(XColor *)aColor
{
int gcm;
XGCValues gcv;
Window rootWindow = ([aScreen rootWindow])->xWindow;
[super init];
type = WTEX_SOLID;
subtype = 0;
XAllocColor(GlobalDisplay, [aScreen colormap], aColor);
color = *aColor;
if (aColor->red==0 && aColor->blue==0 && aColor->green == 0)
{
light.red = 0xb6da;
light.green = 0xb6da;
light.blue = 0xb6da;
dim.red = 0x6185;
dim.green = 0x6185;
dim.blue = 0x6185;
}
else
{
RColor rgb;
RHSVColor hsv, hsv2;
int v;
rgb.red = aColor->red >> 8;
rgb.green = aColor->green >> 8;
rgb.blue = aColor->blue >> 8;
RRGBtoHSV(&rgb, &hsv);
RHSVtoRGB(&hsv, &rgb);
hsv2 = hsv;
v = hsv.value*16/10;
hsv.value = (v > 255 ? 255 : v);
RHSVtoRGB(&hsv, &rgb);
light.red = rgb.red << 8;
light.green = rgb.green << 8;
light.blue = rgb.blue << 8;
hsv2.value = hsv2.value/2;
RHSVtoRGB(&hsv2, &rgb);
dim.red = rgb.red << 8;
dim.green = rgb.green << 8;
dim.blue = rgb.blue << 8;
}
dark.red = 0;
dark.green = 0;
dark.blue = 0;
XAllocColor(GlobalDisplay, [aScreen colormap], &light);
XAllocColor(GlobalDisplay, [aScreen colormap], &dim);
XAllocColor(GlobalDisplay, [aScreen colormap], &dark);
gcm = GCForeground|GCBackground|GCGraphicsExposures;
gcv.graphics_exposures = False;
gcv.background = gcv.foreground = light.pixel;
light_gc = XCreateGC(GlobalDisplay, rootWindow, gcm, &gcv);
gcv.background = gcv.foreground = dim.pixel;
dim_gc = XCreateGC(GlobalDisplay, rootWindow, gcm, &gcv);
gcv.background = gcv.foreground = dark.pixel;
dark_gc = XCreateGC(GlobalDisplay, rootWindow, gcm, &gcv);
gcv.background = gcv.foreground = aColor->pixel;
gc = XCreateGC(GlobalDisplay, rootWindow, gcm, &gcv);
return self;
}
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
RImage *image = NULL;
RColor color1;
image = RCreateImage(aWidth, aHeight, False);
color1.red = color.red >> 8;
color1.green = color.green >> 8;
color1.blue = color.blue >> 8;
color1.alpha = 255;
RClearImage(image, &color1);
return [super finishProcessing:image width:aWidth height:aHeight
relief:aRelief];
}
- (void)dealloc
{
XFreeGC(GlobalDisplay, light_gc);
XFreeGC(GlobalDisplay, dim_gc);
XFreeGC(GlobalDisplay, dark_gc);
[super dealloc];
}
@end
--- NEW FILE: IWMTGradientTexture.h ---
/*
* $Id: IWMTGradientTexture.h,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IWMTGRADIENTTEXTURE_H_
#define _IMWTGRADIENTTEXTURE_H_ 1
#include "IWMTexture.h"
#include "wraster.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#undef BOOL
@class IWMScreen, NSString;
@interface IWMTGradientTexture : IWMTexture
{
@public
RColor color1;
RColor color2;
struct RImage *pixmap;
int opacity;
}
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
fromColor:(RColor *)fromColor toColor:(RColor *)toColor
pixmapFile:(char *)aPixmapFile opacity:(int)anOpacity;
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief;
@end
#endif
--- NEW FILE: IWMTGradientTexture.m ---
/*
* $Id: IWMTGradientTexture.m,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "IWMTGradientTexture.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
//#include <Foundation/NSString.h>
#include <IWMScreen.h>
#include <IWMWindow.h>
#include <IWMWindowManager.h>
#undef BOOL
@implementation IWMTGradientTexture
- initWithScreen:(IWMScreen *)aScreen style:(int)aStyle
fromColor:(RColor *)fromColor toColor:(RColor *)toColor
pixmapFile:(char *)aPixmapFile opacity:(int)anOpacity
{
XGCValues gcv;
RImage *image;
//XXX verify file path here
image = RLoadImage(aScreen->rcontext, aPixmapFile, 0);
if (!image)
{
NSLog(@"Could not load texture pixmap: %s", aPixmapFile);
NSLog(@"%s", RMessageForError(RErrorCode));
return nil;
}
[super init];
type = aStyle;
opacity = anOpacity;
color1 = *fromColor;
color2 = *toColor;
color.red = (fromColor->red + toColor->red)<<7;
color.green = (fromColor->green + toColor->green)<<7;
color.blue = (fromColor->blue + toColor->blue)<<7;
XAllocColor(GlobalDisplay, [aScreen colormap], &color);
gcv.background = gcv.foreground = color.pixel;
gcv.graphics_exposures = False;
gc = XCreateGC(GlobalDisplay, ([aScreen rootWindow])->xWindow,
GCForeground|GCBackground|GCGraphicsExposures, &gcv);
pixmap = image;
return self;
}
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
switch (type) {
case WTEX_THGRADIENT:
subtype = RGRD_HORIZONTAL;
break;
case WTEX_TVGRADIENT:
subtype = RGRD_VERTICAL;
break;
case WTEX_TDGRADIENT:
subtype = RGRD_DIAGONAL;
break;
}
RImage *image;
RImage *gradient;
image = RMakeTiledImage(pixmap, aWidth, aHeight);
if (image)
{
gradient = RRenderGradient(aWidth, aHeight, &color1, &color2, subtype);
if (gradient) {
RCombineImagesWithOpaqueness(image, gradient, opacity);
RReleaseImage(gradient);
}
else {
RReleaseImage(image);
image = NULL;
}
}
return [super finishProcessing:image width:aWidth height:aHeight
relief:aRelief];
}
- (void)dealloc
{
RReleaseImage(pixmap);
[super dealloc];
}
@end
--- NEW FILE: IWMTexture.h ---
/*
* $Id: IWMTexture.h,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IWMTEXTURE_H_
#define _IMWTEXTURE_H_ 1
#include "wraster.h"
#include <Foundation/NSObject.h>
/* texture relief */
#define WREL_RAISED 0
#define WREL_SUNKEN 1
#define WREL_FLAT 2
#define WREL_ICON 4
#define WREL_MENUENTRY 6
/* texture types */
#define WREL_BORDER_MASK 1
#define WTEX_SOLID ((1<<1)|WREL_BORDER_MASK)
#define WTEX_HGRADIENT ((1<<2)|WREL_BORDER_MASK)
#define WTEX_VGRADIENT ((1<<3)|WREL_BORDER_MASK)
#define WTEX_DGRADIENT ((1<<4)|WREL_BORDER_MASK)
#define WTEX_MHGRADIENT ((1<<5)|WREL_BORDER_MASK)
#define WTEX_MVGRADIENT ((1<<6)|WREL_BORDER_MASK)
#define WTEX_MDGRADIENT ((1<<7)|WREL_BORDER_MASK)
#define WTEX_IGRADIENT ((1<<8)|WREL_BORDER_MASK)
#define WTEX_PIXMAP (1<<10)
#define WTEX_THGRADIENT ((1<<11)|WREL_BORDER_MASK)
#define WTEX_TVGRADIENT ((1<<12)|WREL_BORDER_MASK)
#define WTEX_TDGRADIENT ((1<<13)|WREL_BORDER_MASK)
#define WTEX_FUNCTION ((1<<14)|WREL_BORDER_MASK)
/* pixmap subtypes */
#define WTP_TILE 2
#define WTP_SCALE 4
#define WTP_CENTER 6
@interface IWMTexture : NSObject
{
@public
short type;
char subtype;
XColor color;
GC gc;
}
- init;
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief;
- (RImage *)checkImage:(RImage *)image width:(int)aWidth height:(int)aHeight;
- (void)bevelImage:(RImage *)image relief:(int)aRelief;
- (int)bevelDepthForRelief:(int)aRelief;
- (RImage *)finishProcessing:(RImage *)anImage width:(int)aWidth
height:(int)aHeight relief:(int)aRelief;
@end
#endif
--- NEW FILE: IWMTexture.m ---
/*
* $Id: IWMTexture.m,v 1.1 2003/11/30 22:42:44 copal Exp $
*
* This file is part of Interface WM.
*
* Copyright (C) 2002, Ian Mondragon
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "IWMTexture.h"
#define BOOL XWINDOWSBOOL
#include <Foundation/NSObject.h>
#include <IWMScreen.h>
#include <IWMWindow.h>
#include <IWMWindowManager.h>
#undef BOOL
@implementation IWMTexture
- init
{
[super init];
type = 0;
subtype = NULL;
gc = NULL;
return self;
}
- (RImage *)renderImageWithWidth:(int)aWidth height:(int)aHeight
relief:(int)aRelief
{
NSLog(@"Subclass responsibility");
return NULL;
}
- (RImage *)checkImage:(RImage *)image width:(int)aWidth height:(int)aHeight
{
if (!image) {
RColor gray;
NSLog(@"Could not render texture: %s", RMessageForError(RErrorCode));
image = RCreateImage(aWidth, aHeight, False);
if (image == NULL) {
NSLog(@"Could not allocate image buffer");
return NULL;
}
gray.red = 190;
gray.green = 190;
gray.blue = 190;
gray.alpha = 255;
RClearImage(image, &gray);
}
return image;
}
- (int)bevelDepthForRelief:(int)aRelief
{
int depth = 0;
switch (aRelief) {
case WREL_ICON:
depth = RBEV_RAISED3;
break;
case WREL_RAISED:
depth = RBEV_RAISED2;
break;
case WREL_SUNKEN:
depth = RBEV_SUNKEN;
break;
case WREL_FLAT:
depth = 0;
break;
case WREL_MENUENTRY:
depth = -WREL_MENUENTRY;
break;
default:
depth = 0;
}
return depth;
}
- (void)bevelImage:(RImage *)image relief:(int)relief
{
int width = image->width;
int height = image->height;
RColor rcolor;
switch (relief) {
case WREL_MENUENTRY:
rcolor.red = rcolor.green = rcolor.blue = 80;
rcolor.alpha = 0;
/**/
ROperateLine(image, RAddOperation, 1, 0, width-2, 0, &rcolor);
/**/
ROperateLine(image, RAddOperation, 0, 0, 0, height-1, &rcolor);
rcolor.red = rcolor.green = rcolor.blue = 40;
rcolor.alpha = 0;
ROperateLine(image, RSubtractOperation, width-1, 0, width-1,
height-1, &rcolor);
/**/
ROperateLine(image, RSubtractOperation, 1, height-2, width-2,
height-2, &rcolor);
rcolor.red = rcolor.green = rcolor.blue = 0;
rcolor.alpha = 255;
RDrawLine(image, 0, height-1, width-1, height-1, &rcolor);
/**/
break;
}
}
- (RImage *)finishProcessing:(RImage *)anImage width:(int)aWidth
height:(int)aHeight relief:(int)aRelief
{
RImage *image = [self checkImage:anImage width:aWidth height:aHeight];
int d = [self bevelDepthForRelief:aRelief];
if (0 < d)
RBevelImage(image, d);
else if (0 > d)
[self bevelImage:image relief:d];
return image;
}
- (void)dealloc
{
XFreeGC(GlobalDisplay, gc);
[super dealloc];
}
@end
--- NEW FILE: IWMTextureStuff.m ---
@interface IWMIGradientTexture : IWMTexture
{
@public
char dummy;
RColor colors1[2];
RColor colors2[2];
int thickness1;
int thickness2;
}
- initWithScreen:(IWMScreen *)aScreen thickness1:(int)aThickness1
{
WTexIGradient *texture;
XGCValues gcv;
int i;
texture = wmalloc(sizeof(WTexture));
memset(texture, 0, sizeof(WTexture));
texture->type = WTEX_IGRADIENT;
for (i = 0; i < 2; i++) {
texture->colors1[i] = colors1[i];
texture->colors2[i] = colors2[i];
}
texture->thickness1 = thickness1;
texture->thickness2 = thickness2;
if (thickness1 >= thickness2) {
texture->normal.red = (colors1[0].red + colors1[1].red)<<7;
texture->normal.green = (colors1[0].green + colors1[1].green)<<7;
texture->normal.blue = (colors1[0].blue + colors1[1].blue)<<7;
} else {
texture->normal.red = (colors2[0].red + colors2[1].red)<<7;
texture->normal.green = (colors2[0].green + colors2[1].green)<<7;
texture->normal.blue = (colors2[0].blue + colors2[1].blue)<<7;
}
XAllocColor(dpy, scr->w_colormap, &texture->normal);
gcv.background = gcv.foreground = texture->normal.pixel;
gcv.graphics_exposures = False;
texture->normal_gc = XCreateGC(dpy, scr->w_win, GCForeground|GCBackground
|GCGraphicsExposures, &gcv);
return texture;
}
@end
Index: GNUmakefile
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMGraphics/GNUmakefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** GNUmakefile 8 Sep 2003 16:24:57 -0000 1.2
--- GNUmakefile 30 Nov 2003 22:42:44 -0000 1.3
***************
*** 40,45 ****
srcdir= .
! ${LIBRARY_NAME}_HEADER_FILES= IWMCoreImage.h IWMImage.h
! ${LIBRARY_NAME}_OBJC_FILES= IWMCoreImage.m IWMImage.m
-include ../GNUmakefile.preamble
--- 40,58 ----
srcdir= .
! ${LIBRARY_NAME}_HEADER_FILES= IWMCoreImage.h IWMImage.h \
! IWMTexture.h \
! IWMSolidTexture.h \
! IWMGradientTexture.h \
! IWMMGradientTexture.h \
! IWMTGradientTexture.h \
! IWMPixmapTexture.h
!
! ${LIBRARY_NAME}_OBJC_FILES= IWMCoreImage.m IWMImage.m \
! IWMTexture.m \
! IWMSolidTexture.m \
! IWMGradientTexture.m \
! IWMMGradientTexture.m \
! IWMTGradientTexture.m \
! IWMPixmapTexture.m
-include ../GNUmakefile.preamble
|
|
From: <co...@us...> - 2003-11-30 18:42:21
|
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv4560
Modified Files:
IWMWindow.h IWMWindow.m IWMWindowManager+Event.m
Log Message:
cleanup
Index: IWMWindow.h
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindow.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** IWMWindow.h 26 Nov 2003 23:47:55 -0000 1.15
--- IWMWindow.h 30 Nov 2003 18:42:17 -0000 1.16
***************
*** 142,147 ****
- (void)takeInputFocus;
- - (void) destroy;
-
/*!
* @method name
--- 142,145 ----
Index: IWMWindow.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindow.m,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** IWMWindow.m 26 Nov 2003 23:47:55 -0000 1.20
--- IWMWindow.m 30 Nov 2003 18:42:17 -0000 1.21
***************
*** 231,249 ****
}
- - (void) destroy
- {
- IWMTRACE;
-
- {
- if( pixmap )
- XFreePixmap(GlobalDisplay, pixmap);
- XDestroyWindow(GlobalDisplay, xWindow);
- pixmap = NULL;
- client = nil;
- }
-
- return;
- }
-
- (NSString *)name
{
--- 231,234 ----
***************
*** 261,265 ****
{
nameString = [NSString stringWithCString:name];
-
IWMDebug(@"_NET_WM_VISIBLE_NAME: %s", name);
}
--- 246,249 ----
***************
*** 270,274 ****
{
nameString = [NSString stringWithCString:name];
-
IWMDebug(@"_NET_WM_NAME: %s", name);
}
--- 254,257 ----
***************
*** 278,284 ****
{
nameString = [NSString stringWithCString:name];
-
IWMDebug(@"WM_NAME: %s", name);
-
XFree(name);
}
--- 261,265 ----
***************
*** 293,299 ****
const char *data = [name cString];
! /*
! * XXX - needs to be changed to UTF-8
! */
[self setProperty:GlobalIWM->atoms.net_wm_visible_name type:XA_STRING
format:32 data:(unsigned char *)data elements:1];
--- 274,278 ----
const char *data = [name cString];
! // XXX - needs to be changed to UTF-8
[self setProperty:GlobalIWM->atoms.net_wm_visible_name type:XA_STRING
format:32 data:(unsigned char *)data elements:1];
***************
*** 366,372 ****
{
if (!client)
- {
return [GlobalIWM currentScreen];
- }
return [[self client] screen];
--- 345,349 ----
***************
*** 481,492 ****
unsigned long n, extra;
unsigned char *data;
! //data = iwm_window_property(xWindow, GlobalIWM->atoms.wm_state,
! // AnyPropertyType, 0L,
!
if ((XGetWindowProperty(GlobalDisplay, xWindow,
GlobalIWM->atoms.wm_state, 0L, 2L,
False, AnyPropertyType, &realType, &realFormat, &n, &extra,
&data) == Success) && n)
{
state = *(int *)data;
--- 458,471 ----
unsigned long n, extra;
unsigned char *data;
+ int count;
! if ((data = [self property:GlobalIWM->atoms.wm_state type:AnyPropertyType
! count:&count]))
! #if 0
if ((XGetWindowProperty(GlobalDisplay, xWindow,
GlobalIWM->atoms.wm_state, 0L, 2L,
False, AnyPropertyType, &realType, &realFormat, &n, &extra,
&data) == Success) && n)
+ #endif
{
state = *(int *)data;
Index: IWMWindowManager+Event.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager+Event.m,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** IWMWindowManager+Event.m 26 Nov 2003 23:47:11 -0000 1.16
--- IWMWindowManager+Event.m 30 Nov 2003 18:42:18 -0000 1.17
***************
*** 556,559 ****
--- 556,562 ----
if (client)
{
+ IWMDebug(@"ClientMessage: %s",
+ XGetAtomName(GlobalDisplay, event->message_type));
+
// WM_PROTOCOLS
if (event->message_type == atoms.wm_protocols)
***************
*** 603,607 ****
int gravity;
NSRect frame;
!
gravity = event->data.l[0]; // XXX not used right now
frame.origin.x = event->data.l[1];
--- 606,610 ----
int gravity;
NSRect frame;
!
gravity = event->data.l[0]; // XXX not used right now
frame.origin.x = event->data.l[1];
***************
*** 613,616 ****
--- 616,624 ----
}
+ // _NET_WM_MOVERESIZE: client initiated movement
+ else if (event->message_type == atoms.net_wm_moveresize)
+ {
+ }
+
// _NET_WM_DESKTOP: change desktop client is on
else if (event->message_type == atoms.net_wm_desktop)
***************
*** 1055,1059 ****
// check if window was destroyed
! if (XCheckTypedWindowEvent(GlobalDisplay, clientWindow->xWindow, DestroyNotify, anEvent))
{
//DispatchEvent(anEvent);
--- 1063,1068 ----
// check if window was destroyed
! if (XCheckTypedWindowEvent(GlobalDisplay, clientWindow->xWindow,
! DestroyNotify, anEvent))
{
//DispatchEvent(anEvent);
***************
*** 1064,1070 ****
BOOL reparented = NO;
! if (XCheckTypedWindowEvent(GlobalDisplay, clientWindow->xWindow, ReparentNotify, anEvent))
reparented = YES;
!
if (!reparented)
[client setWMState:WithdrawnState];
--- 1073,1082 ----
BOOL reparented = NO;
! if (XCheckTypedWindowEvent(GlobalDisplay, clientWindow->xWindow,
! ReparentNotify, anEvent))
! {
reparented = YES;
! }
!
if (!reparented)
[client setWMState:WithdrawnState];
|
|
From: <co...@us...> - 2003-11-30 18:40:18
|
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv4106
Modified Files:
IWMClient.h IWMClient.m
Log Message:
cleanup, fix borderWidth problem, fix -windowForXWindow: method
Index: IWMClient.h
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** IWMClient.h 28 Nov 2003 06:11:52 -0000 1.22
--- IWMClient.h 30 Nov 2003 18:40:15 -0000 1.23
***************
*** 123,137 ****
- initializeDecorations;
! /*!
! * @method initializeDecorations_NET
! * @discussion Initializes the client's decor by checking for EWMH properties
! */
! - initializeDecorations_NET;
!
! /*!
! * @method initializeDecorations_MOTIF
! * @discussion Initializes the client's decor by checking for MOTIF properties
! */
! - initializeDecorations_MOTIF;
/*!
--- 123,128 ----
- initializeDecorations;
! - initializeEWMHDecorations;
! - initializeMOTIFDecorations;
/*!
Index: IWMClient.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.m,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** IWMClient.m 28 Nov 2003 06:11:52 -0000 1.32
--- IWMClient.m 30 Nov 2003 18:40:15 -0000 1.33
***************
*** 149,152 ****
--- 149,155 ----
maximumSize.width = sizeHints->max_width;
maximumSize.height = sizeHints->max_height;
+
+ IWMDebug(@"Maximum size: %i x %i", (int)maximumSize.width,
+ (int)maximumSize.height);
}
***************
*** 202,208 ****
decor.icon = YES;
! if (![self initializeDecorations_NET])
{
! [self initializeDecorations_MOTIF];
}
--- 205,211 ----
decor.icon = YES;
! if (![self initializeEWMHDecorations])
{
! [self initializeMOTIFDecorations];
}
***************
*** 210,214 ****
}
! - initializeDecorations_NET
{
Atom *data;
--- 213,217 ----
}
! - initializeEWMHDecorations
{
Atom *data;
***************
*** 224,232 ****
{
IWMDebug(@"Initializing decor via EWMH hints...", nil);
if (data[0] == GlobalIWM->atoms.net_wm_window_type_desktop)
{
}
! else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dock)
{
decor.resizebar = NO;
--- 227,237 ----
{
IWMDebug(@"Initializing decor via EWMH hints...", nil);
+ IWMDebug(@"EWMH hint: %s", XGetAtomName(GlobalDisplay, data[0]));
if (data[0] == GlobalIWM->atoms.net_wm_window_type_desktop)
{
}
! else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dock ||
! data[0] == GlobalIWM->atoms.kde_net_wm_window_type_override)
{
decor.resizebar = NO;
***************
*** 235,238 ****
--- 240,244 ----
decor.close_button = NO;
decor.minimize_button = NO;
+ decor.border = NO;
if ([[window xClassInstance] isEqualToString:@"GNUstep"])
***************
*** 258,261 ****
--- 264,268 ----
decor.close_button = NO;
decor.minimize_button = NO;
+ decor.border = NO;
}
else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dialog)
***************
*** 302,306 ****
}
! - initializeDecorations_MOTIF
{
//int num;
--- 309,313 ----
}
! - initializeMOTIFDecorations
{
//int num;
***************
*** 554,560 ****
if (![GlobalIWM grabPointerAndServer])
- {
return (void)0x0;
- }
// update outline frame
--- 561,565 ----
***************
*** 569,575 ****
if (!opaque)
- {
[self drawOutline];
- }
for (;;)
--- 574,578 ----
***************
*** 603,606 ****
--- 606,610 ----
if (!opaque)
[self drawOutline];
+ [self setFrame:_outline];
[GlobalIWM ungrabPointerAndServer];
return (void)0x0;
***************
*** 754,758 ****
_cached_size.size.width = [self width];
! frame.size.width = iwm_display_width([self screen]) - BORDER_WIDTH;
frame.size.height = [self height];
--- 758,762 ----
_cached_size.size.width = [self width];
! frame.size.width = iwm_display_width([self screen]) - [self borderWidth];
frame.size.height = [self height];
***************
*** 780,784 ****
frame.size.width = [self width];
! frame.size.height = iwm_display_height([self screen]) - BORDER_WIDTH;
frame.origin.x = ([parent origin]).x;
frame.origin.y = 0;
--- 784,788 ----
frame.size.width = [self width];
! frame.size.height = iwm_display_height([self screen]) - [self borderWidth];
frame.origin.x = ([parent origin]).x;
frame.origin.y = 0;
***************
*** 925,929 ****
[window raise];
- //[self redraw];
[window takeInputFocus];
--- 929,932 ----
***************
*** 1290,1298 ****
if (decor.titlebar && titlebar)
{
! if ((aWindow == titlebar->xWindow) ||
! (aWindow == ([titlebar closeButton])->xWindow) ||
! (aWindow == ([titlebar minimizeButton])->xWindow))
! {
return YES;
}
}
--- 1293,1309 ----
if (decor.titlebar && titlebar)
{
! if (aWindow == titlebar->xWindow)
return YES;
+
+ if (decor.minimize_button)
+ {
+ if (aWindow == ([titlebar minimizeButton])->xWindow)
+ return YES;
+ }
+
+ if (decor.close_button)
+ {
+ if (aWindow == ([titlebar closeButton])->xWindow)
+ return YES;
}
}
***************
*** 1383,1387 ****
- (int)borderWidth
{
! return 0;//(decor.border ? BORDER_WIDTH : 0);
}
--- 1394,1398 ----
- (int)borderWidth
{
! return (decor.border ? BORDER_WIDTH : 0);
}
***************
*** 1407,1411 ****
XGrabServer(GlobalDisplay);
! adjustment = BORDER_WIDTH * 2;
windowHeight = (int)aRect.size.height - [self titlebarHeight] -
[self resizebarHeight] - adjustment;
--- 1418,1422 ----
XGrabServer(GlobalDisplay);
! adjustment = [self borderWidth] * 2;
windowHeight = (int)aRect.size.height - [self titlebarHeight] -
[self resizebarHeight] - adjustment;
***************
*** 1477,1481 ****
size.width = [parent width];
! size.height = [self titlebarHeight] + [window height] + [self resizebarHeight];
return size;
--- 1488,1493 ----
size.width = [parent width];
! size.height = [self titlebarHeight] + [window height] +
! [self resizebarHeight];
return size;
|
|
From: <co...@us...> - 2003-11-30 18:39:15
|
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv3935
Modified Files:
InterfaceWM.h IWMWindowManager.m
Log Message:
add _KDE_NET_WM_WINDOW_TYPE_OVERRIDE atom as TOTAL HACK to make GNUstep app menus play nice. problem with GNUstep backend, not Interface
Index: InterfaceWM.h
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/InterfaceWM.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** InterfaceWM.h 21 Nov 2003 04:16:12 -0000 1.12
--- InterfaceWM.h 30 Nov 2003 18:39:11 -0000 1.13
***************
*** 317,320 ****
--- 317,322 ----
Atom net_wm_window_type_normal;
+ Atom kde_net_wm_window_type_override;
+
Atom net_wm_state;
Atom net_wm_state_modal;
Index: IWMWindowManager.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager.m,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** IWMWindowManager.m 28 Nov 2003 19:22:15 -0000 1.27
--- IWMWindowManager.m 30 Nov 2003 18:39:11 -0000 1.28
***************
*** 250,253 ****
--- 250,256 ----
atoms.net_wm_window_type_normal = iwm_atom("_NET_WM_WINDOW_TYPE_NORMAL");
+ // XXX THIS IS A TEMPORARY HACK FOR GNUSTEP APPS THAT USE THIS ATOM
+ atoms.kde_net_wm_window_type_override = iwm_atom("_KDE_NET_WM_WINDOW_TYPE_OVERRIDE");
+
// state
atoms.net_wm_state = iwm_atom("_NET_WM_STATE");
|
|
From: <co...@us...> - 2003-11-30 18:35:10
|
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv3158
Modified Files:
IWMScreen.m
Log Message:
cleanup, add missing -release call
Index: IWMScreen.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMScreen.m,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** IWMScreen.m 30 Nov 2003 03:58:12 -0000 1.17
--- IWMScreen.m 30 Nov 2003 18:35:07 -0000 1.18
***************
*** 80,84 ****
// define events the root window is interrested in
- //[rootWindow selectInputMask:IWMSCREEN_EVENT_MASK];
XSelectInput(GlobalDisplay, [rootWindow xWindow], IWMSCREEN_EVENT_MASK);
--- 80,83 ----
***************
*** 105,111 ****
*/
! if( ! themeName )
{
! IWMTheme *tmp = nil;
themeName = iwm_default_value(THEME_NAME_DEFAULT);
--- 104,110 ----
*/
! if (!themeName)
{
! IWMTheme *tmp = nil;
themeName = iwm_default_value(THEME_NAME_DEFAULT);
***************
*** 121,126 ****
--- 120,128 ----
NSLog(@"Failed to initialize theme");
+ [tmp release];
+
return nil;
}
+
[tmp release];
}
|
|
From: <co...@us...> - 2003-11-30 03:58:15
|
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv32017
Modified Files:
IWMScreen.m
Log Message:
fixed typo in collor allocation method
Index: IWMScreen.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMScreen.m,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** IWMScreen.m 28 Nov 2003 19:22:15 -0000 1.16
--- IWMScreen.m 30 Nov 2003 03:58:12 -0000 1.17
***************
*** 291,300 ****
else
{
! NSLog(@"WARNING: unable to allocate color %s", tmp);
}
// unfocused color
tmp = [[theme unfocusedTitleColorName] cString];
! if (!(XAllocNamedColor(GlobalDisplay, colormap, tmp, &colors.unfocused,
&dummy)))
{
--- 291,300 ----
else
{
! NSLog(@"WARNING: unable to allocate focused color %s", tmp);
}
// unfocused color
tmp = [[theme unfocusedTitleColorName] cString];
! if ((XAllocNamedColor(GlobalDisplay, colormap, tmp, &colors.unfocused,
&dummy)))
{
***************
*** 305,315 ****
xftcolors.unfocused.pixel = colors.unfocused.pixel;
}
! else {
! NSLog(@"WARNING: unable to allocate color %s", tmp);
}
// background color
tmp = [[theme emptyBackgroundColorName] cString];
! if (!(XAllocNamedColor(GlobalDisplay, colormap, tmp, &colors.background,
&dummy)))
{
--- 305,316 ----
xftcolors.unfocused.pixel = colors.unfocused.pixel;
}
! else
! {
! NSLog(@"WARNING: unable to allocate unfocused color %s", tmp);
}
// background color
tmp = [[theme emptyBackgroundColorName] cString];
! if ((XAllocNamedColor(GlobalDisplay, colormap, tmp, &colors.background,
&dummy)))
{
***************
*** 322,331 ****
else
{
! NSLog(@"WARNING: unable to allocate color %s", tmp);
}
// border color
tmp = [[theme borderColorName] cString];
! if (!(XAllocNamedColor(GlobalDisplay, colormap, tmp, &colors.border,
&dummy)))
{
--- 323,332 ----
else
{
! NSLog(@"WARNING: unable to allocate background color %s", tmp);
}
// border color
tmp = [[theme borderColorName] cString];
! if ((XAllocNamedColor(GlobalDisplay, colormap, tmp, &colors.border,
&dummy)))
{
***************
*** 338,342 ****
else
{
! NSLog(@"WARNING: unable to allocate color %s", tmp);
}
--- 339,343 ----
else
{
! NSLog(@"WARNING: unable to allocate border color %s", tmp);
}
|
|
From: <co...@us...> - 2003-11-28 19:22:18
|
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv10651
Modified Files:
IWMWindowManager.m IWMScreen.m
Log Message:
cleanup
Index: IWMWindowManager.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager.m,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** IWMWindowManager.m 26 Nov 2003 23:47:55 -0000 1.26
--- IWMWindowManager.m 28 Nov 2003 19:22:15 -0000 1.27
***************
*** 997,1001 ****
{
int i, count = [clientArray count];
-
Window window[1];
--- 997,1000 ----
***************
*** 1003,1009 ****
_headClientIndex = [clientArray indexOfObject:aClient];
-
- IWMDebug(@"New head client index in clientArray: %i",
- _headClientIndex);
// unfocus all clients in clientArray
--- 1002,1005 ----
Index: IWMScreen.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMScreen.m,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** IWMScreen.m 8 Oct 2003 04:31:44 -0000 1.15
--- IWMScreen.m 28 Nov 2003 19:22:15 -0000 1.16
***************
*** 29,32 ****
--- 29,33 ----
#include <IWMGraphics/IWMCoreImage.h>
#include "IWMCoreUtilities.h"
+ #include "IWMDebug.h"
#include <Foundation/NSArray.h>
***************
*** 49,53 ****
if ((self = [super init]))
{
! fprintf(stderr, "-> Initializing screen number %i...\n", aScreenNumber);
screenNumber = aScreenNumber;
rootWindow = [[IWMWindow alloc]
--- 50,54 ----
if ((self = [super init]))
{
! NSLog(@"Initializing screen number %i", aScreenNumber);
screenNumber = aScreenNumber;
rootWindow = [[IWMWindow alloc]
***************
*** 110,119 ****
themeName = iwm_default_value(THEME_NAME_DEFAULT);
- //
// Fall-back to Default
! //
!
! if( ! themeName )
! themeName = @"Default";
tmp = [[IWMTheme alloc] initWithThemeNamed:themeName screen:self];
--- 111,117 ----
themeName = iwm_default_value(THEME_NAME_DEFAULT);
// Fall-back to Default
! if (!themeName)
! themeName = @"Default";
tmp = [[IWMTheme alloc] initWithThemeNamed:themeName screen:self];
***************
*** 160,166 ****
pid_t iwm_pid = getpid();
! #ifdef DEBUG
! NSLog(@"Initializing EWMH properties...");
! #endif
// _ewmh_window is never mapped
--- 158,162 ----
pid_t iwm_pid = getpid();
! IWMDebug(@"Initializing EWMH properties", nil);
// _ewmh_window is never mapped
|
|
From: <co...@us...> - 2003-11-28 19:21:25
|
Update of /cvsroot/interfacewm/interfacewm
In directory sc8-pr-cvs1:/tmp/cvs-serv10533
Modified Files:
IWMController.m
Log Message:
remove IWMOptionParser usage
Index: IWMController.m
===================================================================
RCS file: /cvsroot/interfacewm/interfacewm/IWMController.m,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** IWMController.m 18 Nov 2003 03:40:12 -0000 1.4
--- IWMController.m 28 Nov 2003 19:21:22 -0000 1.5
***************
*** 34,46 ****
#endif /* 0 */
! static
! void usage(const char *progname)
{
! fprintf(stderr, "usage: %s [-options]\n\n", progname);
! fprintf(stderr, " -d host:display\tdisplay to use\n");
! fprintf(stderr, " -h\t\t\tshow this message\n");
! fprintf(stderr, "\n");
!
! exit( EXIT_SUCCESS );
}
--- 34,43 ----
#endif /* 0 */
! static void print_usage()
{
! fprintf(stderr, "Usage: interfacewm [-options]\n\n");
! fprintf(stderr, " -d host:display\tdisplay to use\n");
! fprintf(stderr, " -h\t\t\tshow this message\n");
! fprintf(stderr, "\n");
}
***************
*** 48,103 ****
int main(int argc, char * const *argv, char * const *envp)
{
- #if 1
-
- NSAutoreleasePool *_pool = [[NSAutoreleasePool alloc] init];
- IWMOptionParser *parser = nil;
- char *prog = IWMFetchRight(1, argv[0], NULL);
- char *display = NULL;
- int c;
-
- parser = [[IWMOptionParser alloc] initWithArgumentCount: argc
- argumentVector: argv
- options: @"d:h"];
-
- while( -1 != (c = [parser parse]) )
- switch( c )
- {
- case 'd' :
- display = (char *) [parser argument];
- break;
-
- case 'h' :
- default :
- usage(prog);
- }
-
- argc -= [parser index];
- argv += [parser index];
-
- [parser release];
-
- if( *argv )
- usage(prog);
- else
- {
- NSString *dpyName = nil;
-
-
- dpyName = [NSString stringWithCString:
- ( display ? display : getenv("DISPLAY") )];
-
- GlobalIWM = [[IWMWindowManager alloc] initWithDisplayName: dpyName];
- {
- [GlobalIWM run];
- }
- [GlobalIWM release];
- }
-
- [_pool release];
-
- return EXIT_SUCCESS;
-
- #else /* 1 */
-
NSAutoreleasePool *_pool = [[NSAutoreleasePool alloc] init];
char *display = malloc(100);
--- 45,48 ----
***************
*** 121,134 ****
}
- //
// CBV: Ignore unknown options, to allow usage of --GNU-Debug=...
- //
}
if (showHelp)
{
! printf("Usage: interface [-display]\n");
!
! return EXIT_FAILURE;
}
--- 66,76 ----
}
// CBV: Ignore unknown options, to allow usage of --GNU-Debug=...
}
if (showHelp)
{
! print_usage();
! exit(EXIT_SUCCESS);
}
***************
*** 137,145 ****
[GlobalIWM run];
[_pool release];
return EXIT_SUCCESS;
- #endif /* 1 */
}
--- 79,87 ----
[GlobalIWM run];
+ [GlobalIWM release];
[_pool release];
return EXIT_SUCCESS;
}
|