* Headers/AppKit/NSGraphics.h: Add GSOrderedWindows function.

* Source/NSApplication.m (NSAppIconView -mouseDown:): Use
        GSOrderedWindows.
        (NSApplication -deactivate): Ditto.
        (-hide:): Ditto.
        (-unhideWithoutActivation:): Ditto.
        (-makeWindowsPerform:inOrder): Ditto.
        (-orderedWindows:): Ditto.
        (-windowWillClose:): Ditto.
        * Source/GSDisplayServer.m: Implement -windowlist.
        * Source/NSWindow.m (NSCountWindowList,NSWindowList): Use 
	-windowlist.
        (GSOrderedWindows): Initial implementation.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23936 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ratmice 2006-10-21 19:13:42 +00:00
parent 72d2de4f8a
commit 009bdc8dd3
5 changed files with 122 additions and 56 deletions

View file

@ -4613,23 +4613,37 @@ BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo)
void NSCountWindows(int *count)
{
*count = (int)NSCountMapTable(windowmaps);
*count = (int)[[GSCurrentServer() windowlist] count];
}
void NSWindowList(int size, int list[])
{
NSMapEnumerator me = NSEnumerateMapTable(windowmaps);
void *key;
id win;
int i = 0;
while (i < size && NSNextMapEnumeratorPair(&me, &key, (void*)&win))
NSArray *windowList = [GSCurrentServer() windowlist];
unsigned i, c;
for (i = 0, c = [windowList count]; i < size && i < c; i++)
{
list[i++] = (intptr_t)key;
list[i] = [[windowList objectAtIndex:i] intValue];
}
/* FIXME - the list produced should be in window stacking order */
}
NSArray *GSOrderedWindows(void)
{
NSArray *window_list = [GSCurrentServer() windowlist];
NSMutableArray *ret = [NSMutableArray array];
int i, c;
for (i = 0, c = [window_list count]; i < c; i++)
{
int windowNumber = [[window_list objectAtIndex:i] intValue];
NSWindow *win = GSWindowWithNumber(windowNumber);
[ret addObject:win];
}
return ret;
}
NSArray* GSAllWindows(void)
{
if (windowmaps)