diff --git a/ChangeLog b/ChangeLog index 2e3c0658e..5f80b7f27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Tue Jul 6 12:06:00 1999 Richard Frith-Macdonald + + * Headers/AppKit/NSEvent.h: Added event subtypes for appkit events + * Source/Functions.m: Rewrite for new event types. + +Tue Jul 6 6:45:00 1999 Richard Frith-Macdonald + + * Headers/AppKit/NSGraphicsContext.h: New method for window control - + ([_setFrame:forWindow:]) + * Headers/AppKit/NSWindow.m: New ivar 'autosave_name' and new method + ([_setFrame:]) for backend to call when window frame has changed. + * Source/NSGraphicsContext.m: Dummy implementation of new method. + * Source/NSWindow.m: Rewrite all moving/sizing methods and methods + for storing/retrieving window frame info in defaults database. + 1999-07-05 Adam Fedor * Source/GNUmakefile: Install NSPopUpButtonCell.h diff --git a/Headers/gnustep/gui/NSEvent.h b/Headers/gnustep/gui/NSEvent.h index dfaf60f17..52809504a 100644 --- a/Headers/gnustep/gui/NSEvent.h +++ b/Headers/gnustep/gui/NSEvent.h @@ -310,5 +310,11 @@ enum { */ unsigned int NSEventMaskFromType(NSEventType type); +#ifndef NO_GNUSTEP +typedef enum { + GSAppKitWindowMoved = 1, + GSAppKitWindowResized +} GSAppKitSubtype; +#endif #endif /* _GNUstep_H_NSEvent */ diff --git a/Source/Functions.m b/Source/Functions.m index 6a65e8dd1..085c0612b 100644 --- a/Source/Functions.m +++ b/Source/Functions.m @@ -3,12 +3,10 @@ Generic Functions for the GNUstep GUI Library. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996,1999 Free Software Foundation, Inc. Author: Scott Christley Date: 1996 - Author: Felipe A. Rodriguez - Date: December 1998 This file is part of the GNUstep GUI Library. @@ -36,20 +34,23 @@ char **NSArgv = NULL; -// -// Main initialization routine for the GNUstep GUI Library Apps -// -int NSApplicationMain(int argc, const char **argv) +/* + * Main initialization routine for the GNUstep GUI Library Apps + */ +int +NSApplicationMain(int argc, const char **argv) { -extern char** environ; + NSAutoreleasePool *pool; #if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:(char**)argv - count:argc - environment:environ]; + extern char **environ; + + [NSProcessInfo initializeWithArguments: (char**)argv + count: argc + environment: environ]; #endif - [NSAutoreleasePool new]; + pool = [NSAutoreleasePool new]; #ifndef NX_CURRENT_COMPILER_RELEASE initialize_gnustep_backend(); @@ -57,47 +58,36 @@ extern char** environ; [[NSApplication sharedApplication] run]; + [pool release]; + return 0; } -// -// Convert an NSEvent Type to it's respective Event Mask -// -unsigned int NSEventMaskFromType(NSEventType type) -{ - switch(type) - { - case NSLeftMouseDown: - return NSLeftMouseDownMask; - case NSLeftMouseUp: - return NSLeftMouseUpMask; - case NSRightMouseDown: - return NSRightMouseDownMask; - case NSRightMouseUp: - return NSRightMouseUpMask; - case NSMouseMoved: - return NSMouseMovedMask; - case NSMouseEntered: - return NSMouseEnteredMask; - case NSMouseExited: - return NSMouseExitedMask; - case NSLeftMouseDragged: - return NSLeftMouseDraggedMask; - case NSRightMouseDragged: - return NSRightMouseDraggedMask; - case NSKeyDown: - return NSKeyDownMask; - case NSKeyUp: - return NSKeyUpMask; - case NSFlagsChanged: - return NSFlagsChangedMask; - case NSPeriodic: - return NSPeriodicMask; - case NSCursorUpdate: - return NSCursorUpdateMask; - default: - break; - } - - return 0; +/* + * Convert an NSEvent Type to it's respective Event Mask + */ +unsigned +NSEventMaskFromType(NSEventType type) +{ + switch(type) + { + case NSLeftMouseDown: return NSLeftMouseDownMask; + case NSLeftMouseUp: return NSLeftMouseUpMask; + case NSRightMouseDown: return NSRightMouseDownMask; + case NSRightMouseUp: return NSRightMouseUpMask; + case NSMouseMoved: return NSMouseMovedMask; + case NSMouseEntered: return NSMouseEnteredMask; + case NSMouseExited: return NSMouseExitedMask; + case NSLeftMouseDragged: return NSLeftMouseDraggedMask; + case NSRightMouseDragged: return NSRightMouseDraggedMask; + case NSKeyDown: return NSKeyDownMask; + case NSKeyUp: return NSKeyUpMask; + case NSFlagsChanged: return NSFlagsChangedMask; + case NSPeriodic: return NSPeriodicMask; + case NSCursorUpdate: return NSCursorUpdateMask; + case NSAppKitDefined: return NSAppKitDefinedMask; + case NSSystemDefined: return NSSystemDefinedMask; + case NSApplicationDefined: return NSApplicationDefinedMask; + } + return 0; }