mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Events tidyup.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4520 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0a74050282
commit
212402cc4a
3 changed files with 63 additions and 52 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
Tue Jul 6 12:06:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* 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 <richard@brainstorm.co.uk>
|
||||
|
||||
* 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 <fedor@gnu.org>
|
||||
|
||||
* Source/GNUmakefile: Install NSPopUpButtonCell.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 */
|
||||
|
|
|
@ -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 <scottc@net-community.com>
|
||||
Date: 1996
|
||||
Author: Felipe A. Rodriguez <far@ix.netcom.com>
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue