Preliminary drawing engine

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3222 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1998-11-16 20:32:48 +00:00
parent f56ca9b4bd
commit 2ec2e70df2
42 changed files with 3139 additions and 236 deletions

View file

@ -1,3 +1,22 @@
Mon Nov 16 15:13:39 1998 Adam Fedor <fedor@ultra.doc.com>
* Preliminary implementation of a device independant drawing
engine.
* Headers/gnustep/gui/GPSDefinitions.h: New file.
* Headers/gnustep/gui/GPSDrawContext.h: Likewise.
* Headers/gnustep/gui/GPSDrawContextOps.h: Likewise.
* Headers/gnustep/gui/GPSOperators.h: Likewise.
* Headers/gnustep/gui/gpsdefs.h: Likewise.
* Headers/gnustep/gui/gpsops.h: Likewise.
* Source/GPSDrawContext.m: Likewise.
* Source/gpsops.m: Likewise.
* Headers/gnustep/gui/DPSOperators.h: Revert to old imp.
* Headers/gnustep/gui/NS*: Change NSDPSContext to GPSDrawContext.
* Source/NS*: Likewise.
* Source/externs.m: Add new externs.
* Source/NS*: Remove ASSIGN definitions.
Thu Nov 12 1998 Felipe A. Rodriguez <far@ix.netcom.com>
* GNUmakefile rearrange subprojects so that Source is built first.

View file

@ -32,7 +32,11 @@
//
// Display Postscript System
//
#ifndef NO_GNUSTEP
#include <AppKit/GPSOperators.h>
#else
#include <AppKit/DPSOperators.h>
#endif
//
// Foundation

View file

@ -29,58 +29,7 @@
#ifndef _GNUstep_H_DPSOperators
#define _GNUstep_H_DPSOperators
// Use alternate DPS definitions if we don't have a DPS library
#if defined(HAVE_DPS_DPSCLIENT) && HAVE_DPS_DPSCLIENT_H == 0
typedef void (*DPSTextProc)();
typedef void (*DPSErrorProc)();
typedef enum {
dps_ascii, dps_binObjSeq, dps_encodedTokens
} DPSProgramEncoding;
/* Defines the 3 possible encodings of PostScript language programs. */
typedef enum {
dps_indexed, dps_strings
} DPSNameEncoding;
/* Defines the 2 possible encodings for user names in the
dps_binObjSeq and dps_encodedTokens forms of PostScript language
programs. */
typedef enum {
dps_tBoolean,
dps_tChar, dps_tUChar,
dps_tFloat, dps_tDouble,
dps_tShort, dps_tUShort,
dps_tInt, dps_tUInt,
dps_tLong, dps_tULong } DPSDefinedType;
typedef struct {
unsigned char attributedType;
unsigned char tag;
unsigned short length;
union {
int integerVal;
float realVal;
int nameVal; /* offset or index */
int booleanVal;
int stringVal; /* offset */
int arrayVal; /* offset */
} val;
} DPSBinObjRec, *DPSBinObj;
typedef struct {
unsigned char tokenType;
unsigned char nTopElements;
unsigned short length;
DPSBinObjRec objects[1];
} DPSBinObjSeqRec, *DPSBinObjSeq;
#else
#include <DPS/dpsclient.h>
#include <DPS/psops.h>
#endif /* HAVE_DPS_DPSCLIENT_H */
#endif /* _GNUstep_H_DPSOperators */

View file

@ -0,0 +1,96 @@
/* GPSDefinitions - definitions for GNUstep drawing
Copyright (C) 1998 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _GPSDefinitions_h_INCLUDE
#define _GPSDefinitions_h_INCLUDE
//
// Backing Store Types
//
typedef enum _NSBackingStoreType {
NSBackingStoreRetained,
NSBackingStoreNonretained,
NSBackingStoreBuffered
} NSBackingStoreType;
//
// Compositing operators
//
typedef enum _NSCompositingOperation {
NSCompositeClear,
NSCompositeCopy,
NSCompositeSourceOver,
NSCompositeSourceIn,
NSCompositeSourceOut,
NSCompositeSourceAtop,
NSCompositeDataOver,
NSCompositeDataIn,
NSCompositeDataOut,
NSCompositeDataAtop,
NSCompositeXOR,
NSCompositePlusDarker,
NSCompositeHighlight,
NSCompositePlusLighter
} NSCompositingOperation;
//
// Window ordering
//
typedef enum _NSWindowOrderingMode {
NSWindowAbove,
NSWindowBelow,
NSWindowOut
} NSWindowOrderingMode;
//
// NSDPSContextNotification
// Circular dependency between protocol and class
//
@class NSDPSContext;
@protocol NSDPSContextNotification
//
// Synchronizing Application and Display Postscript Server Execution
//
- (void)contextFinishedExecuting:(NSDPSContext *)context;
@end
extern NSString *DPSPostscriptErrorException;
extern NSString *DPSNameTooLongException;
extern NSString *DPSResultTagCheckException;
extern NSString *DPSResultTypeCheckException;
extern NSString *DPSInvalidContextException;
extern NSString *DPSSelectException;
extern NSString *DPSConnectionClosedException;
extern NSString *DPSReadException;
extern NSString *DPSWriteException;
extern NSString *DPSInvalidFDException;
extern NSString *DPSInvalidTEException;
extern NSString *DPSInvalidPortException;
extern NSString *DPSOutOfMemoryException;
extern NSString *DPSCantConnectException;
#endif /* _GPSDefinitions_h_INCLUDE */

View file

@ -0,0 +1,101 @@
/* GPSDrawContext - Generic drawing DrawContext class.
Copyright (C) 1998 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
This file is part of the GNU Objective C User interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GPSDrawContext_h_INCLUDE
#define _GPSDrawContext_h_INCLUDE
#include <Foundation/NSObject.h>
#include <AppKit/GPSOperators.h>
#include <AppKit/GPSDefinitions.h>
@class NSMutableData;
@class NSDictionary;
@interface GPSDrawContext : NSObject
{
NSDictionary *context_info;
NSMutableData *context_data;
}
+ (void) setDefaultContextClass: (Class)defaultContextClass;
+ defaultContextWithInfo: (NSDictionary *)info;
+ streamContextWithPath: (NSString *)path;
- initWithContextInfo: (NSDictionary *)info;
- (BOOL) isDrawingToScreen;
- (NSMutableData *) mutableData;
+ (GPSDrawContext *) currentContext;
+ (void)setCurrentContext: (GPSDrawContext *)context;
- (void) destroyContext;
@end
#include "GPSDrawContextOps.h"
extern GPSDrawContext *_currentGPSContext;
/* If NO_GNUSTEP defined, leave out GPSDrawContext definition. This
requires the xdps backend to be used. */
#ifdef NO_GNUSTEP
#define GPSDrawContext NSDPSContext
#endif
/* Current keys used for the info dictionary:
Key: Value:
DisplayName -- (NSString)name of X server
ScreenNumber -- (NSNumber)screen number
ContextData -- (NSData)context data
DebugContext -- (NSNumber)YES or NO
*/
extern NSString *DPSconfigurationerror;
extern NSString *DPSinvalidaccess;
extern NSString *DPSinvalidcontext;
extern NSString *DPSinvalidexit;
extern NSString *DPSinvalidfileaccess;
extern NSString *DPSinvalidfont;
extern NSString *DPSinvalidid;
extern NSString *DPSinvalidrestore;
extern NSString *DPSinvalidparam;
extern NSString *DPSioerror;
extern NSString *DPSlimitcheck;
extern NSString *DPSnocurrentpoint;
extern NSString *DPSnulloutput;
extern NSString *DPSrangecheck;
extern NSString *DPSstackoverflow;
extern NSString *DPSstackunderflow;
extern NSString *DPStypecheck;
extern NSString *DPSundefined;
extern NSString *DPSundefinedfilename;
extern NSString *DPSundefinedresource;
extern NSString *DPSundefinedresult;
extern NSString *DPSunmatchedmark;
extern NSString *DPSunregistered;
extern NSString *DPSVMerror;
#endif /* _GPSDrawContext_h_INCLUDE */

View file

@ -0,0 +1,354 @@
/* GPSDrawContextOps - Generic drawing DrawContext class ops.
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@boulder.colorado.edu>
Date: Nov 1995
This file is part of the GNU Objective C User interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GPSDrawContextOps_h_INCLUDE
#define _GPSDrawContextOps_h_INCLUDE
@interface GPSDrawContext (ColorOps)
- (void) DPScolorimage;
- (void) DPScurrentblackgeneration;
- (void) DPScurrentcmykcolor: (float *)c : (float *)m : (float *)y : (float *)k;
- (void) DPScurrentcolorscreen;
- (void) DPScurrentcolortransfer;
- (void) DPScurrentundercolorremoval;
- (void) DPSsetblackgeneration;
- (void) DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k;
- (void) DPSsetcolorscreen;
- (void) DPSsetcolortransfer;
- (void) DPSsetundercolorremoval;
@end
@interface GPSDrawContext (FontOps)
- (void) DPSFontDirectory;
- (void) DPSISOLatin1Encoding;
- (void) DPSSharedFontDirectory;
- (void) DPSStandardEncoding;
- (void) DPScachestatus: (int *)bsize : (int *)bmax : (int *)msize;
- (void) DPScurrentcacheparams;
- (void) DPScurrentfont;
- (void) DPSdefinefont;
- (void) DPSfindfont: (const char *)name;
- (void) DPSmakefont;
- (void) DPSscalefont: (float)size;
- (void) DPSselectfont: (const char *)name : (float)scale;
- (void) DPSsetcachedevice: (float)wx : (float)wy : (float)llx : (float)lly : (float)urx : (float)ury;
- (void) DPSsetcachelimit: (float)n;
- (void) DPSsetcacheparams;
- (void) DPSsetcharwidth: (float)wx : (float)wy;
- (void) DPSsetfont: (int)f;
- (void) DPSundefinefont: (const char *)name;
@end
@interface GPSDrawContext (GStateOps)
- (void) DPSconcat: (const float *)m;
- (void) DPScurrentdash;
- (void) DPScurrentflat: (float *)flatness;
- (void) DPScurrentgray: (float *)gray;
- (void) DPScurrentgstate: (int)gst;
- (void) DPScurrenthalftone;
- (void) DPScurrenthalftonephase: (float *)x : (float *)y;
- (void) DPScurrenthsbcolor: (float *)h : (float *)s : (float *)b;
- (void) DPScurrentlinecap: (int *)linecap;
- (void) DPScurrentlinejoin: (int *)linejoin;
- (void) DPScurrentlinewidth: (float *)width;
- (void) DPScurrentmatrix;
- (void) DPScurrentmiterlimit: (float *)limit;
- (void) DPScurrentpoint: (float *)x : (float *)y;
- (void) DPScurrentrgbcolor: (float *)r : (float *)g : (float *)b;
- (void) DPScurrentscreen;
- (void) DPScurrentstrokeadjust: (int *)b;
- (void) DPScurrenttransfer;
- (void) DPSdefaultmatrix;
- (void) DPSgrestore;
- (void) DPSgrestoreall;
- (void) DPSgsave;
- (void) DPSgstate;
- (void) DPSinitgraphics;
- (void) DPSinitmatrix;
- (void) DPSrotate: (float)angle;
- (void) DPSscale: (float)x : (float)y;
- (void) DPSsetdash: (const float *)pat : (int)size : (float)offset;
- (void) DPSsetflat: (float)flatness;
- (void) DPSsetgray: (float)gray;
- (void) DPSsetgstate: (int)gst;
- (void) DPSsethalftone;
- (void) DPSsethalftonephase: (float)x : (float)y;
- (void) DPSsethsbcolor: (float)h : (float)s : (float)b;
- (void) DPSsetlinecap: (int)linecap;
- (void) DPSsetlinejoin: (int)linejoin;
- (void) DPSsetlinewidth: (float)width;
- (void) DPSsetmatrix;
- (void) DPSsetmiterlimit: (float)limit;
- (void) DPSsetrgbcolor: (float)r : (float)g : (float)b;
- (void) DPSsetscreen;
- (void) DPSsetstrokeadjust: (int)b;
- (void) DPSsettransfer;
- (void) DPStranslate: (float)x : (float)y;
@end
@interface GPSDrawContext (IOOps)
- (void) DPSflush;
@end
@interface GPSDrawContext (MatrixOps)
- (void) DPSconcatmatrix;
- (void) DPSdtransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2;
- (void) DPSidentmatrix;
- (void) DPSidtransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2;
- (void) DPSinvertmatrix;
- (void) DPSitransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2;
- (void) DPStransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2;
@end
@interface GPSDrawContext (PaintOps)
- (void) DPSashow: (float)x : (float)y : (const char *)s;
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay : (const char *)s;
- (void) DPScopypage;
- (void) DPSeofill;
- (void) DPSerasepage;
- (void) DPSfill;
- (void) DPSimage;
- (void) DPSimagemask;
- (void) DPSkshow: (const char *)s;
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h;
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h;
- (void) DPSshow: (const char *)s;
- (void) DPSshowpage;
- (void) DPSstroke;
- (void) DPSstrokepath;
- (void) DPSueofill: (const char *)nums : (int)n : (const char *)ops : (int)l;
- (void) DPSufill: (const char *)nums : (int)n : (const char *)ops : (int)l;
- (void) DPSustroke: (const char *)nums : (int)n : (const char *)ops : (int)l;
- (void) DPSustrokepath: (const char *)nums : (int)n : (const char *)ops : (int)l;
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char *)s;
- (void) DPSxshow: (const char *)s : (const float *)numarray : (int)size;
- (void) DPSxyshow: (const char *)s : (const float *)numarray : (int)size;
- (void) DPSyshow: (const char *)s : (const float *)numarray : (int)size;
@end
@interface GPSDrawContext (PathOps)
- (void) DPSarc: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2;
- (void) DPSarcn: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2;
- (void) DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r;
- (void) DPSarcto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r : (float *)xt1 : (float *)yt1 : (float *)xt2 : (float *)yt2;
- (void) DPScharpath: (const char *)s : (int)b;
- (void) DPSclip;
- (void) DPSclippath;
- (void) DPSclosepath;
- (void) DPScurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)x3 : (float)y3;
- (void) DPSeoclip;
- (void) DPSeoviewclip;
- (void) DPSflattenpath;
- (void) DPSinitclip;
- (void) DPSinitviewclip;
- (void) DPSlineto: (float)x : (float)y;
- (void) DPSmoveto: (float)x : (float)y;
- (void) DPSnewpath;
- (void) DPSpathbbox: (float *)llx : (float *)lly : (float *)urx : (float *)ury;
- (void) DPSpathforall;
- (void) DPSrcurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)x3 : (float)y3;
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h;
- (void) DPSrectviewclip: (float)x : (float)y : (float)w : (float)h;
- (void) DPSreversepath;
- (void) DPSrlineto: (float)x : (float)y;
- (void) DPSrmoveto: (float)x : (float)y;
- (void) DPSsetbbox: (float)llx : (float)lly : (float)urx : (float)ury;
- (void) DPSsetucacheparams;
- (void) DPSuappend: (const char *)nums : (int)n : (const char *)ops : (int)l;
- (void) DPSucache;
- (void) DPSucachestatus;
- (void) DPSupath: (int)b;
- (void) DPSviewclip;
- (void) DPSviewclippath;
@end
@interface GPSDrawContext (X11Ops)
- (void) DPScurrentXdrawingfunction: (int *)function;
- (void) DPScurrentXgcdrawable: (int *)gc : (int *)draw : (int *)x : (int *)y;
- (void) DPScurrentXgcdrawablecolor: (int *)gc : (int *)draw : (int *)x
: (int *)y : (int *)colorInfo;
- (void) DPScurrentXoffset: (int *)x : (int *)y;
- (void) DPSsetXdrawingfunction: (int) function;
- (void) DPSsetXgcdrawable: (int)gc : (int)draw : (int)x : (int)y;
- (void) DPSsetXgcdrawablecolor: (int)gc : (int)draw : (int)x : (int)y
: (const int *)colorInfo;
- (void) DPSsetXoffset: (short int)x : (short int)y;
- (void) DPSsetXrgbactual: (double)r : (double)g : (double)b : (int *)success;
@end
#endif /* _GPSDrawContext_h_INCLUDE */

View file

@ -0,0 +1,35 @@
/*
GPSOperators.h
GNUstep device-independant operators and functions
Copyright (C) 1998 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _GNUstep_H_GPSOperators
#define _GNUstep_H_GPSOperators
#include <AppKit/gpsdefs.h>
#include <AppKit/gpsops.h>
#endif /* _GNUstep_H_GPSOperators */

View file

@ -45,7 +45,10 @@
@class NSMenuItem;
@class NSImage;
@class NSWindow;
@class NSDPSContext;
#ifdef NO_GNUSTEP
#define GPSDrawContext NSDPSContext
#endif
@class GPSDrawContext;
typedef struct _NSModalSession *NSModalSession;
@ -214,7 +217,7 @@ extern NSString *NSEventTrackingRunLoopMode;
//
// Getting the display postscript context
//
- (NSDPSContext *)context;
- (GPSDrawContext *)context;
//
// Reporting an exception

View file

@ -29,72 +29,25 @@
#ifndef _GNUstep_H_NSDPSContext
#define _GNUstep_H_NSDPSContext
/* Define this to avoid including redefinitions of ps functions introduced
by GPSDrawContext (and gpsdefs.h) */
#define _gpsdefs_h_INCLUDE
#include <Foundation/NSObject.h>
#include <AppKit/DPSOperators.h>
#include <AppKit/GPSDrawContext.h>
#include <stdarg.h>
@class NSData;
@class NSMutableData;
//
// Backing Store Types
//
typedef enum _NSBackingStoreType {
NSBackingStoreRetained,
NSBackingStoreNonretained,
NSBackingStoreBuffered
} NSBackingStoreType;
//
// Compositing operators
//
typedef enum _NSCompositingOperation {
NSCompositeClear,
NSCompositeCopy,
NSCompositeSourceOver,
NSCompositeSourceIn,
NSCompositeSourceOut,
NSCompositeSourceAtop,
NSCompositeDataOver,
NSCompositeDataIn,
NSCompositeDataOut,
NSCompositeDataAtop,
NSCompositeXOR,
NSCompositePlusDarker,
NSCompositeHighlight,
NSCompositePlusLighter
} NSCompositingOperation;
//
// Window ordering
//
typedef enum _NSWindowOrderingMode {
NSWindowAbove,
NSWindowBelow,
NSWindowOut
} NSWindowOrderingMode;
//
// NSDPSContextNotification
// Circular dependency between protocol and class
//
@class NSDPSContext;
@protocol NSDPSContextNotification
//
// Synchronizing Application and Display Postscript Server Execution
//
- (void)contextFinishedExecuting:(NSDPSContext *)context;
@end
//
// NSDPSContext class interface
//
@interface NSDPSContext : NSObject
@interface NSDPSContext : GPSDrawContext
{
// Attributes
NSMutableData *context_data;
// NSMutableData *context_data; /* Defined in GPSDrawContext */
BOOL is_screen_context;
DPSErrorProc error_proc;
DPSTextProc text_proc;
@ -199,20 +152,4 @@ typedef enum _NSWindowOrderingMode {
@end
extern NSString *DPSPostscriptErrorException;
extern NSString *DPSNameTooLongException;
extern NSString *DPSResultTagCheckException;
extern NSString *DPSResultTypeCheckException;
extern NSString *DPSInvalidContextException;
extern NSString *DPSSelectException;
extern NSString *DPSConnectionClosedException;
extern NSString *DPSReadException;
extern NSString *DPSWriteException;
extern NSString *DPSInvalidFDException;
extern NSString *DPSInvalidTEException;
extern NSString *DPSInvalidPortException;
extern NSString *DPSOutOfMemoryException;
extern NSString *DPSCantConnectException;
#endif /* _GNUstep_H_NSDPSContext */

View file

@ -36,7 +36,10 @@
@class NSString;
@class NSWindow;
@class NSDPSContext;
#ifdef NO_GNUSTEP
#define GPSDrawContext NSDPSContext
#endif
@class GPSDrawContext;
typedef enum _NSEventType {
NSLeftMouseDown,
@ -93,7 +96,7 @@ enum {
unsigned int modifier_flags;
NSTimeInterval event_time;
int window_num;
NSDPSContext *event_context;
GPSDrawContext *event_context;
union _MB_event_data
{
struct
@ -133,7 +136,7 @@ enum {
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
eventNumber:(int)eventNum
trackingNumber:(int)trackingNum
userData:(void *)userData;
@ -143,7 +146,7 @@ enum {
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
characters:(NSString *)keys
charactersIgnoringModifiers:(NSString *)ukeys
isARepeat:(BOOL)repeatKey
@ -154,7 +157,7 @@ enum {
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
eventNumber:(int)eventNum
clickCount:(int)clickNum
pressure:(float)pressureValue;
@ -164,7 +167,7 @@ enum {
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
subtype:(short)subType
data1:(int)data1
data2:(int)data2;
@ -172,7 +175,7 @@ enum {
//
// Getting General Event Information
//
- (NSDPSContext *)context;
- (GPSDrawContext *)context;
- (NSPoint)locationInWindow;
- (unsigned int)modifierFlags;
- (NSTimeInterval)timestamp;

View file

@ -29,7 +29,7 @@
#ifndef _GNUstep_H_NSFontPanel
#define _GNUstep_H_NSFontPanel
#include <AppKit/NSDPSContext.h>
#include <AppKit/GPSDrawContext.h>
#include <AppKit/NSPanel.h>
@class NSFont;

View file

@ -29,7 +29,7 @@
#ifndef _GNUstep_H_NSImage
#define _GNUstep_H_NSImage
#include <AppKit/NSDPSContext.h>
#include <AppKit/GPSDrawContext.h>
#include <Foundation/NSBundle.h>
#include <Foundation/NSCoder.h>
#include <AppKit/NSBitmapImageRep.h>

View file

@ -39,7 +39,10 @@
@class NSView;
@class NSPrintInfo;
@class NSPrintPanel;
@class NSDPSContext;
#ifdef NO_GNUSTEP
#define GPSDrawContext NSDPSContext
#endif
@class GPSDrawContext;
typedef enum _NSPrintingPageOrder {
NSDescendingPageOrder,
@ -99,8 +102,8 @@ typedef enum _NSPrintingPageOrder {
//
// Managing the DPS Context
//
- (NSDPSContext *)createContext;
- (NSDPSContext *)context;
- (GPSDrawContext *)createContext;
- (GPSDrawContext *)context;
- (void)destroyContext;
//

View file

@ -33,7 +33,7 @@
#ifndef _GNUstep_H_NSView
#define _GNUstep_H_NSView
#include <AppKit/NSDPSContext.h>
#include <AppKit/GPSDrawContext.h>
#include <AppKit/NSResponder.h>
@class NSString;

View file

@ -31,7 +31,7 @@
#ifndef _GNUstep_H_NSWindow
#define _GNUstep_H_NSWindow
#include <AppKit/NSDPSContext.h>
#include <AppKit/GPSDrawContext.h>
#include <AppKit/NSGraphics.h>
#include <AppKit/NSResponder.h>
#include <AppKit/NSEvent.h>

View file

@ -35,7 +35,7 @@
float rotationAngle;
}
+ matrixFrom:(float[6])matrix;
+ matrixFrom:(const float[6])matrix;
- (void)translateToPoint:(NSPoint)point;
- (void)rotateByAngle:(float)angle;
- (void)scaleBy:(float)sx :(float)sy;
@ -57,10 +57,13 @@
- (NSSize)sizeInMatrixSpace:(NSSize)size;
- (NSRect)rectInMatrixSpace:(NSRect)rect;
- (void) setMatrix: (const float[6])replace;
- (void) getMatrix: (float[6])replace;
@end
@interface PSMatrix (BackendMethods)
- (void)set;
- (void) set;
@end
/* Private definitions */

View file

@ -0,0 +1,213 @@
/* gpsdefs - Rename PS functions to GS functions avoiding name clashing
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
Generated autmatically by gpsformat
*/
#ifndef _gpsdefs_h_INCLUDE
#define _gpsdefs_h_INCLUDE
/* ----------------------------------------------------------------------- */
/* Color operations */
/* ----------------------------------------------------------------------- */
#define PScolorimage GScolorimage
#define PScurrentblackgeneration GScurrentblackgeneration
#define PScurrentcmykcolor GScurrentcmykcolor
#define PScurrentcolorscreen GScurrentcolorscreen
#define PScurrentcolortransfer GScurrentcolortransfer
#define PScurrentundercolorremoval GScurrentundercolorremoval
#define PSsetblackgeneration GSsetblackgeneration
#define PSsetcmykcolor GSsetcmykcolor
#define PSsetcolorscreen GSsetcolorscreen
#define PSsetcolortransfer GSsetcolortransfer
#define PSsetundercolorremoval GSsetundercolorremoval
/* ----------------------------------------------------------------------- */
/* Font operations */
/* ----------------------------------------------------------------------- */
#define PSFontDirectory GSFontDirectory
#define PSISOLatin1Encoding GSISOLatin1Encoding
#define PSSharedFontDirectory GSSharedFontDirectory
#define PSStandardEncoding GSStandardEncoding
#define PScachestatus GScachestatus
#define PScurrentcacheparams GScurrentcacheparams
#define PScurrentfont GScurrentfont
#define PSdefinefont GSdefinefont
#define PSfindfont GSfindfont
#define PSmakefont GSmakefont
#define PSscalefont GSscalefont
#define PSselectfont GSselectfont
#define PSsetcachedevice GSsetcachedevice
#define PSsetcachelimit GSsetcachelimit
#define PSsetcacheparams GSsetcacheparams
#define PSsetcharwidth GSsetcharwidth
#define PSsetfont GSsetfont
#define PSundefinefont GSundefinefont
/* ----------------------------------------------------------------------- */
/* Gstate operations */
/* ----------------------------------------------------------------------- */
#define PSconcat GSconcat
#define PScurrentdash GScurrentdash
#define PScurrentflat GScurrentflat
#define PScurrentgray GScurrentgray
#define PScurrentgstate GScurrentgstate
#define PScurrenthalftone GScurrenthalftone
#define PScurrenthalftonephase GScurrenthalftonephase
#define PScurrenthsbcolor GScurrenthsbcolor
#define PScurrentlinecap GScurrentlinecap
#define PScurrentlinejoin GScurrentlinejoin
#define PScurrentlinewidth GScurrentlinewidth
#define PScurrentmatrix GScurrentmatrix
#define PScurrentmiterlimit GScurrentmiterlimit
#define PScurrentpoint GScurrentpoint
#define PScurrentrgbcolor GScurrentrgbcolor
#define PScurrentscreen GScurrentscreen
#define PScurrentstrokeadjust GScurrentstrokeadjust
#define PScurrenttransfer GScurrenttransfer
#define PSdefaultmatrix GSdefaultmatrix
#define PSgrestore GSgrestore
#define PSgrestoreall GSgrestoreall
#define PSgsave GSgsave
#define PSgstate GSgstate
#define PSinitgraphics GSinitgraphics
#define PSinitmatrix GSinitmatrix
#define PSrotate GSrotate
#define PSscale GSscale
#define PSsetdash GSsetdash
#define PSsetflat GSsetflat
#define PSsetgray GSsetgray
#define PSsetgstate GSsetgstate
#define PSsethalftone GSsethalftone
#define PSsethalftonephase GSsethalftonephase
#define PSsethsbcolor GSsethsbcolor
#define PSsetlinecap GSsetlinecap
#define PSsetlinejoin GSsetlinejoin
#define PSsetlinewidth GSsetlinewidth
#define PSsetmatrix GSsetmatrix
#define PSsetmiterlimit GSsetmiterlimit
#define PSsetrgbcolor GSsetrgbcolor
#define PSsetscreen GSsetscreen
#define PSsetstrokeadjust GSsetstrokeadjust
#define PSsettransfer GSsettransfer
#define PStranslate GStranslate
/* ----------------------------------------------------------------------- */
/* I/O operations */
/* ----------------------------------------------------------------------- */
#define PSequals GSequals
#define PSequalsequals GSequalsequals
#define PSbytesavailable GSbytesavailable
#define PSclosefile GSclosefile
#define PScurrentfile GScurrentfile
#define PSdeletefile GSdeletefile
#define PSecho GSecho
#define PSfile GSfile
#define PSfilenameforall GSfilenameforall
#define PSfileposition GSfileposition
#define PSflush GSflush
#define PSflushfile GSflushfile
#define PSprint GSprint
#define PSprintobject GSprintobject
#define PSpstack GSpstack
#define PSread GSread
#define PSreadhexstring GSreadhexstring
#define PSreadline GSreadline
#define PSreadstring GSreadstring
#define PSrenamefile GSrenamefile
#define PSresetfile GSresetfile
#define PSsetfileposition GSsetfileposition
#define PSstack GSstack
#define PSstatus GSstatus
#define PStoken GStoken
#define PSwrite GSwrite
#define PSwritehexstring GSwritehexstring
#define PSwriteobject GSwriteobject
#define PSwritestring GSwritestring
/* ----------------------------------------------------------------------- */
/* Matrix operations */
/* ----------------------------------------------------------------------- */
#define PSconcatmatrix GSconcatmatrix
#define PSdtransform GSdtransform
#define PSidentmatrix GSidentmatrix
#define PSidtransform GSidtransform
#define PSinvertmatrix GSinvertmatrix
#define PSitransform GSitransform
#define PStransform GStransform
/* ----------------------------------------------------------------------- */
/* Paint operations */
/* ----------------------------------------------------------------------- */
#define PSashow GSashow
#define PSawidthshow GSawidthshow
#define PScopypage GScopypage
#define PSeofill GSeofill
#define PSerasepage GSerasepage
#define PSfill GSfill
#define PSimage GSimage
#define PSimagemask GSimagemask
#define PSkshow GSkshow
#define PSrectfill GSrectfill
#define PSrectstroke GSrectstroke
#define PSshow GSshow
#define PSshowpage GSshowpage
#define PSstroke GSstroke
#define PSstrokepath GSstrokepath
#define PSueofill GSueofill
#define PSufill GSufill
#define PSustroke GSustroke
#define PSustrokepath GSustrokepath
#define PSwidthshow GSwidthshow
#define PSxshow GSxshow
#define PSxyshow GSxyshow
#define PSyshow GSyshow
/* ----------------------------------------------------------------------- */
/* Path operations */
/* ----------------------------------------------------------------------- */
#define PSarc GSarc
#define PSarcn GSarcn
#define PSarct GSarct
#define PSarcto GSarcto
#define PScharpath GScharpath
#define PSclip GSclip
#define PSclippath GSclippath
#define PSclosepath GSclosepath
#define PScurveto GScurveto
#define PSeoclip GSeoclip
#define PSeoviewclip GSeoviewclip
#define PSflattenpath GSflattenpath
#define PSinitclip GSinitclip
#define PSinitviewclip GSinitviewclip
#define PSlineto GSlineto
#define PSmoveto GSmoveto
#define PSnewpath GSnewpath
#define PSpathbbox GSpathbbox
#define PSpathforall GSpathforall
#define PSrcurveto GSrcurveto
#define PSrectclip GSrectclip
#define PSrectviewclip GSrectviewclip
#define PSreversepath GSreversepath
#define PSrlineto GSrlineto
#define PSrmoveto GSrmoveto
#define PSsetbbox GSsetbbox
#define PSsetucacheparams GSsetucacheparams
#define PSuappend GSuappend
#define PSucache GSucache
#define PSucachestatus GSucachestatus
#define PSupath GSupath
#define PSviewclip GSviewclip
#define PSviewclippath GSviewclippath
/* ----------------------------------------------------------------------- */
/* X operations */
/* ----------------------------------------------------------------------- */
#define PScurrentXdrawingfunction GScurrentXdrawingfunction
#define PScurrentXgcdrawable GScurrentXgcdrawable
#define PScurrentXgcdrawablecolor GScurrentXgcdrawablecolor
#define PScurrentXoffset GScurrentXoffset
#define PSsetXdrawingfunction GSsetXdrawingfunction
#define PSsetXgcdrawable GSsetXgcdrawable
#define PSsetXgcdrawablecolor GSsetXgcdrawablecolor
#define PSsetXoffset GSsetXoffset
#define PSsetXrgbactual GSsetXrgbactual
#endif

View file

@ -0,0 +1,448 @@
/* PostScript operators.
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@boulder.colorado.edu>
Date: Nov 1995
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* (c) Copyright 1988-1994 Adobe Systems Incorporated.
* All rights reserved.
*
* Permission to use, copy, modify, distribute, and sublicense this software
* and its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notices appear in all copies and that
* both those copyright notices and this permission notice appear in
* supporting documentation and that the name of Adobe Systems Incorporated
* not be used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission. No trademark license
* to use the Adobe trademarks is hereby granted. If the Adobe trademark
* "Display PostScript"(tm) is used to describe this software, its
* functionality or for any other purpose, such use shall be limited to a
* statement that this software works in conjunction with the Display
* PostScript system. Proper trademark attribution to reflect Adobe's
* ownership of the trademark shall be given whenever any such reference to
* the Display PostScript system is made.
*
* ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
* ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
* ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
* TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
* PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
*
* Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
* Incorporated which may be registered in certain jurisdictions
*
* Author: Adobe Systems Incorporated
*/
#ifndef _GSOPS_H_
#define _GSOPS_H_
/* ----------------------------------------------------------------------- */
/* Color operations */
/* ----------------------------------------------------------------------- */
extern void GScolorimage( void );
//extern void GScurrentblackgeneration( void );
extern void GScurrentcmykcolor(float *c, float *m, float *y, float *k);
//extern void GScurrentcolorscreen( void );
//extern void GScurrentcolortransfer( void );
//extern void GScurrentundercolorremoval( void );
//extern void GSsetblackgeneration( void );
extern void GSsetcmykcolor(float c, float m, float y, float k);
//extern void GSsetcolorscreen( void );
//extern void GSsetcolortransfer( void );
//extern void GSsetundercolorremoval( void );
/* ----------------------------------------------------------------------- */
/* Font operations */
/* ----------------------------------------------------------------------- */
//extern void GSFontDirectory( void );
//extern void GSISOLatin1Encoding( void );
//extern void GSSharedFontDirectory( void );
//extern void GSStandardEncoding( void );
//extern void GScachestatus(int *bsize, int *bmax, int *msize);
//extern void GScurrentcacheparams( void );
//extern void GScurrentfont( void );
//extern void GSdefinefont( void );
extern void GSfindfont(const char *name);
extern void GSmakefont( void );
extern void GSscalefont(float size);
extern void GSselectfont(const char *name, float scale);
//extern void GSsetcachedevice(float wx, float wy, float llx, float lly, float urx, float ury);
//extern void GSsetcachelimit(float n);
//extern void GSsetcacheparams( void );
//extern void GSsetcharwidth(float wx, float wy);
extern void GSsetfont(int f);
extern void GSundefinefont(const char *name);
/* ----------------------------------------------------------------------- */
/* Gstate operations */
/* ----------------------------------------------------------------------- */
extern void GSconcat(const float m[]);
//extern void GScurrentdash( void );
extern void GScurrentflat(float *flatness);
extern void GScurrentgray(float *gray);
extern void GScurrentgstate(int gst);
//extern void GScurrenthalftone( void );
extern void GScurrenthalftonephase(float *x, float *y);
extern void GScurrenthsbcolor(float *h, float *s, float *b);
extern void GScurrentlinecap(int *linecap);
extern void GScurrentlinejoin(int *linejoin);
extern void GScurrentlinewidth(float *width);
//extern void GScurrentmatrix( void );
extern void GScurrentmiterlimit(float *limit);
extern void GScurrentpoint(float *x, float *y);
extern void GScurrentrgbcolor(float *r, float *g, float *b);
//extern void GScurrentscreen( void );
extern void GScurrentstrokeadjust(int *b);
//extern void GScurrenttransfer( void );
extern void GSdefaultmatrix( void );
extern void GSgrestore( void );
extern void GSgrestoreall( void );
extern void GSgsave( void );
//extern void GSgstate( void );
extern void GSinitgraphics( void );
extern void GSinitmatrix( void );
extern void GSrotate(float angle);
extern void GSscale(float x, float y);
extern void GSsetdash(const float pat[], int size, float offset);
extern void GSsetflat(float flatness);
extern void GSsetgray(float gray);
extern void GSsetgstate(int gst);
extern void GSsethalftone( void );
extern void GSsethalftonephase(float x, float y);
extern void GSsethsbcolor(float h, float s, float b);
extern void GSsetlinecap(int linecap);
extern void GSsetlinejoin(int linejoin);
extern void GSsetlinewidth(float width);
extern void GSsetmatrix( void );
extern void GSsetmiterlimit(float limit);
extern void GSsetrgbcolor(float r, float g, float b);
extern void GSsetscreen( void );
extern void GSsetstrokeadjust(int b);
extern void GSsettransfer( void );
extern void GStranslate(float x, float y);
/* ----------------------------------------------------------------------- */
/* I/O operations */
/* ----------------------------------------------------------------------- */
//extern void GSequals( void );
//extern void GSequalsequals( void );
//extern void GSbytesavailable(int *n);
//extern void GSclosefile( void );
//extern void GScurrentfile( void );
//extern void GSdeletefile(const char *filename);
//extern void GSecho(int b);
//extern void GSfile(const char *name, const char *access);
//extern void GSfilenameforall( void );
//extern void GSfileposition(int *pos);
extern void GSflush( void );
//extern void GSflushfile( void );
//extern void GSprint( void );
//extern void GSprintobject(int tag);
//extern void GSpstack( void );
//extern void GSread(int *b);
//extern void GSreadhexstring(int *b);
//extern void GSreadline(int *b);
//extern void GSreadstring(int *b);
//extern void GSrenamefile(const char *old, const char *new);
//extern void GSresetfile( void );
//extern void GSsetfileposition(int pos);
//extern void GSstack( void );
//extern void GSstatus(int *b);
//extern void GStoken(int *b);
//extern void GSwrite( void );
//extern void GSwritehexstring( void );
//extern void GSwriteobject(int tag);
//extern void GSwritestring( void );
/* ----------------------------------------------------------------------- */
/* Matrix operations */
/* ----------------------------------------------------------------------- */
extern void GSconcatmatrix( void );
extern void GSdtransform(float x1, float y1, float *x2, float *y2);
extern void GSidentmatrix( void );
extern void GSidtransform(float x1, float y1, float *x2, float *y2);
extern void GSinvertmatrix( void );
extern void GSitransform(float x1, float y1, float *x2, float *y2);
extern void GStransform(float x1, float y1, float *x2, float *y2);
/* ----------------------------------------------------------------------- */
/* Paint operations */
/* ----------------------------------------------------------------------- */
extern void GSashow(float x, float y, const char *s);
extern void GSawidthshow(float cx, float cy, int c, float ax, float ay, const char *s);
//extern void GScopypage( void );
extern void GSeofill( void );
extern void GSerasepage( void );
extern void GSfill( void );
//extern void GSimage( void );
//extern void GSimagemask( void );
extern void GSkshow(const char *s);
extern void GSrectfill(float x, float y, float w, float h);
extern void GSrectstroke(float x, float y, float w, float h);
extern void GSshow(const char *s);
extern void GSshowpage( void );
extern void GSstroke( void );
extern void GSstrokepath( void );
extern void GSueofill(const char nums[], int n, const char ops[], int l);
extern void GSufill(const char nums[], int n, const char ops[], int l);
extern void GSustroke(const char nums[], int n, const char ops[], int l);
extern void GSustrokepath(const char nums[], int n, const char ops[], int l);
extern void GSwidthshow(float x, float y, int c, const char *s);
extern void GSxshow(const char *s, const float numarray[], int size);
extern void GSxyshow(const char *s, const float numarray[], int size);
extern void GSyshow(const char *s, const float numarray[], int size);
/* ----------------------------------------------------------------------- */
/* Path operations */
/* ----------------------------------------------------------------------- */
extern void GSarc(float x, float y, float r, float angle1, float angle2);
extern void GSarcn(float x, float y, float r, float angle1, float angle2);
extern void GSarct(float x1, float y1, float x2, float y2, float r);
extern void GSarcto(float x1, float y1, float x2, float y2, float r, float *xt1, float *yt1, float *xt2, float *yt2);
extern void GScharpath(const char *s, int b);
extern void GSclip( void );
extern void GSclippath( void );
extern void GSclosepath( void );
extern void GScurveto(float x1, float y1, float x2, float y2, float x3, float y3);
extern void GSeoclip( void );
extern void GSeoviewclip( void );
extern void GSflattenpath( void );
extern void GSinitclip( void );
extern void GSinitviewclip( void );
extern void GSlineto(float x, float y);
extern void GSmoveto(float x, float y);
extern void GSnewpath( void );
extern void GSpathbbox(float *llx, float *lly, float *urx, float *ury);
extern void GSpathforall( void );
extern void GSrcurveto(float x1, float y1, float x2, float y2, float x3, float y3);
extern void GSrectclip(float x, float y, float w, float h);
extern void GSrectviewclip(float x, float y, float w, float h);
extern void GSreversepath( void );
extern void GSrlineto(float x, float y);
extern void GSrmoveto(float x, float y);
extern void GSsetbbox(float llx, float lly, float urx, float ury);
extern void GSsetucacheparams( void );
extern void GSuappend(const char nums[], int n, const char ops[], int l);
extern void GSucache( void );
extern void GSucachestatus( void );
extern void GSupath(int b);
extern void GSviewclip( void );
extern void GSviewclippath( void );
/* ----------------------------------------------------------------------- */
/* X operations */
/* ----------------------------------------------------------------------- */
extern void GScurrentXdrawingfunction(int *function);
extern void GScurrentXgcdrawable(int *gc, int *draw, int *x, int *y);
extern void GScurrentXgcdrawablecolor(int *gc, int *draw, int *x, int *y,
int colorInfo[]);
extern void GScurrentXoffset(int *x, int *y);
extern void GSsetXdrawingfunction(int function);
extern void GSsetXgcdrawable(int gc, int draw, int x, int y);
extern void GSsetXgcdrawablecolor(int gc, int draw, int x, int y,
const int colorInfo[]);
extern void GSsetXoffset(short int x, short int y);
extern void GSsetXrgbactual(double r, double g, double b, int *success);
#endif /* _GSOPS_H_ */

View file

@ -37,6 +37,7 @@ LIBRARY_NAME=libgnustep-gui
# The Objective-C source files to be compiled
libgnustep-gui_OBJC_FILES = libgnustep-gui.m \
GPSDrawContext.m \
NSActionCell.m \
NSApplication.m \
NSAttributedString.m \
@ -62,7 +63,6 @@ NSCustomImageRep.m \
NSDataLink.m \
NSDataLinkManager.m \
NSDataLinkPanel.m \
NSDPSContext.m \
NSEPSImageRep.m \
NSEvent.m \
NSFileWrapper.m \
@ -109,6 +109,7 @@ NSWindowView.m \
NSWorkspace.m \
TrackingRectangle.m \
PSMatrix.m \
gpsops.m \
tiff.m \
externs.m
@ -121,6 +122,10 @@ libgnustep-gui_HEADER_FILES_INSTALL_DIR = /gnustep/gui
libgnustep-gui_HEADER_FILES = \
AppKit/AppKit.h \
AppKit/GPSDrawContext.h \
AppKit/GPSDrawContextOps.h \
AppKit/GPSDefinitions.h \
AppKit/GPSOperations.h \
AppKit/NSActionCell.h \
AppKit/NSApplication.h \
AppKit/NSAttributedString.h \
@ -201,10 +206,12 @@ AppKit/NSWindow.h \
AppKit/NSWindowView.h \
AppKit/NSWorkspace.h \
AppKit/TrackingRectangle.h \
AppKit/nsimage-tiff.h \
AppKit/PSMatrix.h \
AppKit/NSDPSContext.h \
AppKit/DPSOperators.h
AppKit/DPSOperators.h \
AppKit/nsimage-tiff.h \
AppKit/gpsdefs.h \
AppKit/gpsops.h
-include GNUmakefile.preamble

965
Source/GPSDrawContext.m Normal file
View file

@ -0,0 +1,965 @@
/* GPSDrawContext - GNUstep drawing context class.
Copyright (C) 1998 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
This file is part of the GNU Objective C User : (int *)erface library.
This library is free software { } you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation { } either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library { } if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSException.h>
#include <Foundation/NSData.h>
#include "AppKit/GPSDrawContext.h"
/* The memory zone where all global objects are allocated from (Contexts
are also allocated from this zone) */
NSZone *_globalGPSZone = NULL;
/* It's odd that we should have to control the list of contexts. Maybe
we should have a class ContextServer for this role */
static NSMutableArray *ctxtList;
/* The current context */
GPSDrawContext *_currentGPSContext = nil;
static Class defaultGPSContextClass = NULL;
@implementation GPSDrawContext
+ (void) initialize
{
if (self == [GPSDrawContext class])
{
ctxtList = [[NSMutableArray arrayWithCapacity:2] retain];
//_globalGPSZone = NSCreateZone(4096, 4096, YES);
}
}
+ (void) setDefaultContextClass: (Class)defaultContextClass
{
defaultGPSContextClass = defaultContextClass;
}
+ defaultContextWithInfo: (NSDictionary *)info;
{
GPSDrawContext *ctxt;
NSAssert(defaultGPSContextClass,
@"Internal Error: No default GPSContext set\n");
ctxt = [[defaultGPSContextClass allocWithZone: _globalGPSZone]
initWithContextInfo: info];
[ctxt autorelease];
return ctxt;
}
+ streamContextWithPath: (NSString *)path;
{
return [self notImplemented: _cmd];
}
+ (void) setCurrentContext: (GPSDrawContext *)context
{
_currentGPSContext = context;
}
+ (GPSDrawContext *) currentContext
{
return _currentGPSContext;
}
- init
{
return [self initWithContextInfo: NULL];
}
/* designated initializer for the GPSDrawContext class */
- initWithContextInfo: (NSDictionary *)info
{
[super init];
[ctxtList addObject: self];
[GPSDrawContext setCurrentContext: self];
context_info = [info retain];
return self;
}
- (BOOL)isDrawingToScreen
{
return NO;
}
- (NSMutableData *)mutableData
{
return context_data;
}
/* Just remove ourselves from the context list so we will be dealloced on
the next autorelease pool end */
- (void) destroyContext;
{
[ctxtList removeObject: self];
}
- (void) dealloc
{
DESTROY(context_data);
[super dealloc];
}
@end
@implementation GPSDrawContext (ColorOps)
- (void)DPScolorimage { }
- (void)DPScurrentblackgeneration { }
- (void)DPScurrentcmykcolor: (float *)c : (float *)m : (float *)y : (float *)k { }
- (void)DPScurrentcolorscreen { }
- (void)DPScurrentcolortransfer { }
- (void)DPScurrentundercolorremoval { }
- (void)DPSsetblackgeneration { }
- (void)DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k { }
- (void)DPSsetcolorscreen { }
- (void)DPSsetcolortransfer { }
- (void)DPSsetundercolorremoval { }
@end
@implementation GPSDrawContext (ControlOps)
- (void)DPSeq { }
- (void)DPSexit { }
- (void)DPSfalse { }
- (void)DPSfor { }
- (void)DPSforall { }
- (void)DPSge { }
- (void)DPSgt { }
- (void)DPSif { }
- (void)DPSifelse { }
- (void)DPSle { }
- (void)DPSloop { }
- (void)DPSlt { }
- (void)DPSne { }
- (void)DPSnot { }
- (void)DPSor { }
- (void)DPSrepeat { }
- (void)DPSstop { }
- (void)DPSstopped { }
- (void)DPStrue { }
@end
@implementation GPSDrawContext (CtxOps)
- (void)DPScondition { }
- (void)DPScurrentcontext: (int *)cid { }
- (void)DPScurrentobjectformat: (int *)code { }
- (void)DPSdefineusername: (int)i : (const char *)username { }
- (void)DPSdefineuserobject { }
- (void)DPSdetach { }
- (void)DPSexecuserobject: (int)index { }
- (void)DPSfork { }
- (void)DPSjoin { }
- (void)DPSlock { }
- (void)DPSmonitor { }
- (void)DPSnotify { }
- (void)DPSsetobjectformat: (int)code { }
- (void)DPSsetvmthreshold: (int)i { }
- (void)DPSundefineuserobject: (int)index { }
- (void)DPSuserobject { }
- (void)DPSwait { }
- (void)DPSyield { }
@end
@implementation GPSDrawContext (DataOps)
- (void)DPSaload { }
- (void)DPSanchorsearch: (int *)truth { }
- (void)DPSarray: (int)len { }
- (void)DPSastore { }
- (void)DPSbegin { }
- (void)DPSclear { }
- (void)DPScleartomark { }
- (void)DPScopy: (int)n { }
- (void)DPScount: (int *)n { }
- (void)DPScounttomark: (int *)n { }
- (void)DPScvi { }
- (void)DPScvlit { }
- (void)DPScvn { }
- (void)DPScvr { }
- (void)DPScvrs { }
- (void)DPScvs { }
- (void)DPScvx { }
- (void)DPSdef { }
- (void)DPSdict: (int)len { }
- (void)DPSdictstack { }
- (void)DPSdup { }
- (void)DPSend { }
- (void)DPSexch { }
- (void)DPSexecstack { }
- (void)DPSexecuteonly { }
- (void)DPSget { }
- (void)DPSgetinterval { }
- (void)DPSindex: (int)i { }
- (void)DPSknown: (int *)b { }
- (void)DPSlength: (int *)len { }
- (void)DPSload { }
- (void)DPSmark { }
- (void)DPSmatrix { }
- (void)DPSmaxlength: (int *)len { }
- (void)DPSnoaccess { }
- (void)DPSnull { }
- (void)DPSpackedarray { }
- (void)DPSpop { }
- (void)DPSput { }
- (void)DPSputinterval { }
- (void)DPSrcheck: (int *)b { }
- (void)DPSreadonly { }
- (void)DPSroll: (int)n : (int)j { }
- (void)DPSscheck: (int *)b { }
- (void)DPSsearch: (int *)b { }
- (void)DPSshareddict { }
- (void)DPSstatusdict { }
- (void)DPSstore { }
- (void)DPSstring: (int)len { }
- (void)DPSstringwidth: (const char *)s : (float *)xp : (float *)yp { }
- (void)DPSsystemdict { }
- (void)DPSuserdict { }
- (void)DPSwcheck: (int *)b { }
- (void)DPSwhere: (int *)b { }
- (void)DPSxcheck: (int *)b { }
@end
@implementation GPSDrawContext (FontOps)
- (void)DPSFontDirectory { }
- (void)DPSISOLatin1Encoding { }
- (void)DPSSharedFontDirectory { }
- (void)DPSStandardEncoding { }
- (void)DPScachestatus: (int *)bsize : (int *)bmax : (int *)msize { }
- (void)DPScurrentcacheparams { }
- (void)DPScurrentfont { }
- (void)DPSdefinefont { }
- (void)DPSfindfont: (const char *)name { }
- (void)DPSmakefont { }
- (void)DPSscalefont: (float)size { }
- (void)DPSselectfont: (const char *)name : (float)scale { }
- (void)DPSsetcachedevice: (float)wx : (float)wy : (float)llx : (float)lly : (float)urx : (float)ury { }
- (void)DPSsetcachelimit: (float)n { }
- (void)DPSsetcacheparams { }
- (void)DPSsetcharwidth: (float)wx : (float)wy { }
- (void)DPSsetfont: (int)f { }
- (void)DPSundefinefont: (const char *)name { }
@end
@implementation GPSDrawContext (GStateOps)
- (void)DPSconcat: (const float *)m { }
- (void)DPScurrentdash { }
- (void)DPScurrentflat: (float *)flatness { }
- (void)DPScurrentgray: (float *)gray { }
- (void)DPScurrentgstate: (int)gst { }
- (void)DPScurrenthalftone { }
- (void)DPScurrenthalftonephase: (float *)x : (float *)y { }
- (void)DPScurrenthsbcolor: (float *)h : (float *)s : (float *)b { }
- (void)DPScurrentlinecap: (int *)linecap { }
- (void)DPScurrentlinejoin: (int *)linejoin { }
- (void)DPScurrentlinewidth: (float *)width { }
- (void)DPScurrentmatrix { }
- (void)DPScurrentmiterlimit: (float *)limit { }
- (void)DPScurrentpoint: (float *)x : (float *)y { }
- (void)DPScurrentrgbcolor: (float *)r : (float *)g : (float *)b { }
- (void)DPScurrentscreen { }
- (void)DPScurrentstrokeadjust: (int *)b { }
- (void)DPScurrenttransfer { }
- (void)DPSdefaultmatrix { }
- (void)DPSgrestore { }
- (void)DPSgrestoreall { }
- (void)DPSgsave { }
- (void)DPSgstate { }
- (void)DPSinitgraphics { }
- (void)DPSinitmatrix { }
- (void)DPSrotate: (float)angle { }
- (void)DPSscale: (float)x : (float)y { }
- (void)DPSsetdash: (const float *)pat : (int)size : (float)offset { }
- (void)DPSsetflat: (float)flatness { }
- (void)DPSsetgray: (float)gray { }
- (void)DPSsetgstate: (int)gst { }
- (void)DPSsethalftone { }
- (void)DPSsethalftonephase: (float)x : (float)y { }
- (void)DPSsethsbcolor: (float)h : (float)s : (float)b { }
- (void)DPSsetlinecap: (int)linecap { }
- (void)DPSsetlinejoin: (int)linejoin { }
- (void)DPSsetlinewidth: (float)width { }
- (void)DPSsetmatrix { }
- (void)DPSsetmiterlimit: (float)limit { }
- (void)DPSsetrgbcolor: (float)r : (float)g : (float)b { }
- (void)DPSsetscreen { }
- (void)DPSsetstrokeadjust: (int)b { }
- (void)DPSsettransfer { }
- (void)DPStranslate: (float)x : (float)y { }
@end
@implementation GPSDrawContext (IOOps)
- (void)DPSequals { }
- (void)DPSequalsequals { }
- (void)DPSbytesavailable: (int *)n { }
- (void)DPSclosefile { }
- (void)DPScurrentfile { }
- (void)DPSdeletefile: (const char *)filename { }
- (void)DPSecho: (int)b { }
- (void)DPSfile: (const char *)name : (const char *)access { }
- (void)DPSfilenameforall { }
- (void)DPSfileposition: (int *)pos { }
- (void)DPSflush { }
- (void)DPSflushfile { }
- (void)DPSprint { }
- (void)DPSprintobject: (int)tag { }
- (void)DPSpstack { }
- (void)DPSread: (int *)b { }
- (void)DPSreadhexstring: (int *)b { }
- (void)DPSreadline: (int *)b { }
- (void)DPSreadstring: (int *)b { }
- (void)DPSrenamefile: (const char *)old : (const char *)new { }
- (void)DPSresetfile { }
- (void)DPSsetfileposition: (int)pos { }
- (void)DPSstack { }
- (void)DPSstatus: (int *)b { }
- (void)DPStoken: (int *)b { }
- (void)DPSwrite { }
- (void)DPSwritehexstring { }
- (void)DPSwriteobject: (int)tag { }
- (void)DPSwritestring { }
@end
@implementation GPSDrawContext (MathOps)
- (void)DPSabs { }
- (void)DPSadd { }
- (void)DPSand { }
- (void)DPSatan { }
- (void)DPSbitshift: (int)shift { }
- (void)DPSceiling { }
- (void)DPScos { }
- (void)DPSdiv { }
- (void)DPSexp { }
- (void)DPSfloor { }
- (void)DPSidiv { }
- (void)DPSln { }
- (void)DPSlog { }
- (void)DPSmod { }
- (void)DPSmul { }
- (void)DPSneg { }
- (void)DPSround { }
- (void)DPSsin { }
- (void)DPSsqrt { }
- (void)DPSsub { }
- (void)DPStruncate { }
- (void)DPSxor { }
@end
@implementation GPSDrawContext (MatrixOps)
- (void)DPSconcatmatrix { }
- (void)DPSdtransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2 { }
- (void)DPSidentmatrix { }
- (void)DPSidtransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2 { }
- (void)DPSinvertmatrix { }
- (void)DPSitransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2 { }
- (void)DPStransform: (float)x1 : (float)y1 : (float *)x2 : (float *)y2 { }
@end
@implementation GPSDrawContext (MiscOps)
- (void)DPSbanddevice { }
- (void)DPSframedevice { }
- (void)DPSnulldevice { }
- (void)DPSrenderbands { }
@end
@implementation GPSDrawContext (Opstack)
- (void)DPSgetboolean: (int *)it { }
- (void)DPSgetchararray: (int)size : (char *)s { }
- (void)DPSgetfloat: (float *)it { }
- (void)DPSgetfloatarray: (int)size : (float *)a { }
- (void)DPSgetint: (int *)it { }
- (void)DPSgetintarray: (int)size : (int *)a { }
- (void)DPSgetstring: (char *)s { }
- (void)DPSsendboolean: (int)it { }
- (void)DPSsendchararray: (const char *)s : (int)size { }
- (void)DPSsendfloat: (float)it { }
- (void)DPSsendfloatarray: (const float *)a : (int)size { }
- (void)DPSsendint: (int)it { }
- (void)DPSsendintarray: (const int *)a : (int)size { }
- (void)DPSsendstring: (const char *)s { }
@end
@implementation GPSDrawContext (PaintOps)
- (void)DPSashow: (float)x : (float)y : (const char *)s { }
- (void)DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay : (const char *)s { }
- (void)DPScopypage { }
- (void)DPSeofill { }
- (void)DPSerasepage { }
- (void)DPSfill { }
- (void)DPSimage { }
- (void)DPSimagemask { }
- (void)DPSkshow: (const char *)s { }
- (void)DPSrectfill: (float)x : (float)y : (float)w : (float)h { }
- (void)DPSrectstroke: (float)x : (float)y : (float)w : (float)h { }
- (void)DPSshow: (const char *)s { }
- (void)DPSshowpage { }
- (void)DPSstroke { }
- (void)DPSstrokepath { }
- (void)DPSueofill: (const char *)nums : (int)n : (const char *)ops : (int)l { }
- (void)DPSufill: (const char *)nums : (int)n : (const char *)ops : (int)l { }
- (void)DPSustroke: (const char *)nums : (int)n : (const char *)ops : (int)l { }
- (void)DPSustrokepath: (const char *)nums : (int)n : (const char *)ops : (int)l { }
- (void)DPSwidthshow: (float)x : (float)y : (int)c : (const char *)s { }
- (void)DPSxshow: (const char *)s : (const float *)numarray : (int)size { }
- (void)DPSxyshow: (const char *)s : (const float *)numarray : (int)size { }
- (void)DPSyshow: (const char *)s : (const float *)numarray : (int)size { }
@end
@implementation GPSDrawContext (PathOps)
- (void)DPSarc: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2 { }
- (void)DPSarcn: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2 { }
- (void)DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r { }
- (void)DPSarcto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r : (float *)xt1 : (float *)yt1 : (float *)xt2 : (float *)yt2 { }
- (void)DPScharpath: (const char *)s : (int)b { }
- (void)DPSclip { }
- (void)DPSclippath { }
- (void)DPSclosepath { }
- (void)DPScurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)x3 : (float)y3 { }
- (void)DPSeoclip { }
- (void)DPSeoviewclip { }
- (void)DPSflattenpath { }
- (void)DPSinitclip { }
- (void)DPSinitviewclip { }
- (void)DPSlineto: (float)x : (float)y { }
- (void)DPSmoveto: (float)x : (float)y { }
- (void)DPSnewpath { }
- (void)DPSpathbbox: (float *)llx : (float *)lly : (float *)urx : (float *)ury { }
- (void)DPSpathforall { }
- (void)DPSrcurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)x3 : (float)y3 { }
- (void)DPSrectclip: (float)x : (float)y : (float)w : (float)h { }
- (void)DPSrectviewclip: (float)x : (float)y : (float)w : (float)h { }
- (void)DPSreversepath { }
- (void)DPSrlineto: (float)x : (float)y { }
- (void)DPSrmoveto: (float)x : (float)y { }
- (void)DPSsetbbox: (float)llx : (float)lly : (float)urx : (float)ury { }
- (void)DPSsetucacheparams { }
- (void)DPSuappend: (const char *)nums : (int)n : (const char *)ops : (int)l { }
- (void)DPSucache { }
- (void)DPSucachestatus { }
- (void)DPSupath: (int)b { }
- (void)DPSviewclip { }
- (void)DPSviewclippath { }
@end
@implementation GPSDrawContext (SysOps)
- (void)DPSbind { }
- (void)DPScountdictstack: (int *)n { }
- (void)DPScountexecstack: (int *)n { }
- (void)DPScurrentdict { }
- (void)DPScurrentpacking: (int *)b { }
- (void)DPScurrentshared: (int *)b { }
- (void)DPSdeviceinfo { }
- (void)DPSerrordict { }
- (void)DPSexec { }
- (void)DPSprompt { }
- (void)DPSquit { }
- (void)DPSrand { }
- (void)DPSrealtime: (int *)i { }
- (void)DPSrestore { }
- (void)DPSrrand { }
- (void)DPSrun: (const char *)filename { }
- (void)DPSsave { }
- (void)DPSsetpacking: (int)b { }
- (void)DPSsetshared: (int)b { }
- (void)DPSsrand { }
- (void)DPSstart { }
- (void)DPStype { }
- (void)DPSundef: (const char *)name { }
- (void)DPSusertime: (int *)milliseconds { }
- (void)DPSversion: (int)bufsize : (char *)buf { }
- (void)DPSvmreclaim: (int)code { }
- (void)DPSvmstatus: (int *)level : (int *)used : (int *)maximum { }
@end
@implementation GPSDrawContext (WinOps)
- (void)DPSineofill: (float)x : (float)y : (int *)b { }
- (void)DPSinfill: (float)x : (float)y : (int *)b { }
- (void)DPSinstroke: (float)x : (float)y : (int *)b { }
- (void)DPSinueofill: (float)x : (float)y : (const char *)nums : (int)n : (const char *)ops : (int)l : (int *)b { }
- (void)DPSinufill: (float)x : (float)y : (const char *)nums : (int)n : (const char *)ops : (int)l : (int *)b { }
- (void)DPSinustroke: (float)x : (float)y : (const char *)nums : (int)n : (const char *)ops : (int)l : (int *)b { }
- (void)DPSwtranslation: (float *)x : (float *)y { }
@end
@implementation GPSDrawContext (L2Ops)
- (void)DPSleftbracket { }
- (void)DPSrightbracket { }
- (void)DPSleftleft { }
- (void)DPSrightright { }
- (void)DPScshow: (const char *)s { }
- (void)DPScurrentcolor { }
- (void)DPScurrentcolorrendering { }
- (void)DPScurrentcolorspace { }
- (void)DPScurrentdevparams: (const char *)dev { }
- (void)DPScurrentglobal: (int *)b { }
- (void)DPScurrentoverprint: (int *)b { }
- (void)DPScurrentpagedevice { }
- (void)DPScurrentsystemparams { }
- (void)DPScurrentuserparams { }
- (void)DPSdefineresource: (const char *)category { }
- (void)DPSexecform { }
- (void)DPSfilter { }
- (void)DPSfindencoding: (const char *)key { }
- (void)DPSfindresource: (const char *)key : (const char *)category { }
- (void)DPSgcheck: (int *)b { }
- (void)DPSglobaldict { }
- (void)DPSGlobalFontDirectory { }
- (void)DPSglyphshow: (const char *)name { }
- (void)DPSlanguagelevel: (int *)n { }
- (void)DPSmakepattern { }
- (void)DPSproduct { }
- (void)DPSresourceforall: (const char *)category { }
- (void)DPSresourcestatus: (const char *)key : (const char *)category : (int *)b { }
- (void)DPSrevision: (int *)n { }
- (void)DPSrootfont { }
- (void)DPSserialnumber: (int *)n { }
- (void)DPSsetcolor { }
- (void)DPSsetcolorrendering { }
- (void)DPSsetcolorspace { }
- (void)DPSsetdevparams { }
- (void)DPSsetglobal: (int)b { }
- (void)DPSsetoverprint: (int)b { }
- (void)DPSsetpagedevice { }
- (void)DPSsetpattern: (int)patternDict { }
- (void)DPSsetsystemparams { }
- (void)DPSsetuserparams { }
- (void)DPSstartjob: (int)b : (const char *)password { }
- (void)DPSundefineresource: (const char *)key : (const char *)category { }
@end
@implementation GPSDrawContext (X11Ops)
- (void) DPScurrentXdrawingfunction: (int *)function { }
- (void) DPScurrentXgcdrawable: (int *)gc : (int *)draw : (int *)x : (int *)y { }
- (void) DPScurrentXgcdrawablecolor: (int *)gc : (int *)draw : (int *)x
: (int *)y : (int *)colorInfo { }
- (void) DPScurrentXoffset: (int *)x : (int *)y { }
- (void) DPSsetXdrawingfunction: (int) function { }
- (void) DPSsetXgcdrawable: (int)gc : (int)draw : (int)x : (int)y { }
- (void) DPSsetXgcdrawablecolor: (int)gc : (int)draw : (int)x : (int)y
: (const int *)colorInfo { }
- (void) DPSsetXoffset: (short int)x : (short int)y { }
- (void) DPSsetXrgbactual: (double)r : (double)g : (double)b : (int *)success { }
@end

View file

@ -44,7 +44,7 @@
# include <Foundation/NSConnection.h>
#endif
#include <AppKit/NSDPSContext.h>
#include <AppKit/GPSDrawContext.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSPopUpButton.h>
#include <AppKit/NSPanel.h>
@ -63,10 +63,6 @@ static BOOL gnustep_gui_app_is_in_dealloc;
static NSEvent *null_event;
static id NSApp;
#define ASSIGN(a, b) [b retain]; \
[a release]; \
a = b;
@implementation NSApplication
//
@ -971,9 +967,9 @@ int i;
return nil;
}
- (NSDPSContext *)context // return the DPS context
- (GPSDrawContext *)context // return the DPS context
{
return [NSDPSContext currentContext];
return [GPSDrawContext currentContext];
}
// Reporting an exception
- (void)reportException:(NSException *)anException

View file

@ -42,10 +42,6 @@
#include <AppKit/NSFont.h>
#include <AppKit/NSImage.h>
#define ASSIGN(a, b) [b retain]; \
[a release]; \
a = b;
//
// NSButtonCell implementation
//

View file

@ -41,10 +41,6 @@
#include <AppKit/NSCell.h>
#include <AppKit/NSEvent.h>
#define ASSIGN(a, b) [b retain]; \
[a release]; \
a = b;
@implementation NSCell
//

View file

@ -32,11 +32,6 @@
#include <AppKit/NSWindow.h>
#include <AppKit/NSGraphics.h>
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
@implementation NSClipView
- init

View file

@ -41,11 +41,6 @@
#include <AppKit/NSView.h>
#include <AppKit/NSGraphics.h>
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
@implementation NSColor
// Class variables

View file

@ -30,11 +30,6 @@
#include <AppKit/NSColorWell.h>
#include <AppKit/NSColor.h>
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
@implementation NSColorWell
//

View file

@ -34,11 +34,6 @@
#include <Foundation/NSDictionary.h>
#include <AppKit/NSDPSContext.h>
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
//
// DPS exceptions
//
@ -114,7 +109,7 @@ static BOOL GNU_CONTEXT_SYNCHRONIZED = NO;
- (void)dealloc
{
[context_data release];
DESTROY(context_data);
[chained_child release];
[super dealloc];
}

View file

@ -41,7 +41,7 @@
#include <AppKit/NSEvent.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSDPSContext.h>
#include <AppKit/GPSDrawContext.h>
@implementation NSEvent
@ -68,7 +68,7 @@ static NSString *timerKey = @"NSEventTimersKey";
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
eventNumber:(int)eventNum
trackingNumber:(int)trackingNum
userData:(void *)userData
@ -97,7 +97,7 @@ NSEvent *e = [[[NSEvent alloc] init] autorelease];
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
characters:(NSString *)keys
charactersIgnoringModifiers:(NSString *)ukeys
isARepeat:(BOOL)repeatKey
@ -129,7 +129,7 @@ NSEvent *e = [[[NSEvent alloc] init] autorelease];
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
eventNumber:(int)eventNum
clickCount:(int)clickNum
pressure:(float)pressureValue
@ -160,7 +160,7 @@ NSEvent *e = [[[NSEvent alloc] init] autorelease]; // do nothing if
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
context:(GPSDrawContext *)context
subtype:(short)subType
data1:(int)data1
data2:(int)data2
@ -284,7 +284,7 @@ NSMutableDictionary *dict = [[NSThread currentThread] threadDictionary];
//
// Getting General Event Information
//
- (NSDPSContext *)context
- (GPSDrawContext *)context
{
return event_context;
}

View file

@ -47,11 +47,6 @@
/* Define the following symbol when NSView will support flipped views */
//#define HAS_FLIPPED_VIEWS 1
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
#ifdef MIN
# undef MIN
#endif
@ -1419,17 +1414,17 @@ static MPoint anchor = {0, 0};
- (NSMatrixMode)mode { return mode; }
- (void)setCellClass:(Class)class { cellClass = class; }
- (Class)cellClass { return cellClass; }
- (void)setPrototype:(NSCell*)aCell { ASSIGN(cellPrototype, aCell) }
- (void)setPrototype:(NSCell*)aCell { ASSIGN(cellPrototype, aCell); }
- (id)prototype { return cellPrototype; }
- (NSSize)cellSize { return cellSize; }
- (NSSize)intercellSpacing { return intercell; }
- (void)setBackgroundColor:(NSColor*)c { ASSIGN(backgroundColor, c) }
- (void)setBackgroundColor:(NSColor*)c { ASSIGN(backgroundColor, c); }
- (NSColor*)backgroundColor { return backgroundColor; }
- (void)setCellBackgroundColor:(NSColor*)c { ASSIGN(cellBackgroundColor, c) }
- (void)setCellBackgroundColor:(NSColor*)c { ASSIGN(cellBackgroundColor, c); }
- (NSColor*)cellBackgroundColor { return cellBackgroundColor; }
- (void)setDelegate:(id)object { ASSIGN(delegate, object) }
- (void)setDelegate:(id)object { ASSIGN(delegate, object); }
- (id)delegate { return delegate; }
- (void)setTarget:anObject { ASSIGN(target, anObject) }
- (void)setTarget:anObject { ASSIGN(target, anObject); }
- (id)target { return target; }
- (void)setAction:(SEL)sel { action = sel; }
- (SEL)action { return action; }

View file

@ -39,11 +39,6 @@
#include <AppKit/NSMenu.h>
#include <math.h>
#define ASSIGN(variable, value) \
[value retain]; \
[variable release]; \
variable = value;
#ifdef MAX
# undef MAX
#endif

View file

@ -33,11 +33,6 @@
#include <AppKit/NSMenuItem.h>
#include <AppKit/NSMenu.h>
#define ASSIGN(variable, value) \
[value retain]; \
[variable release]; \
variable = value;
static BOOL usesUserKeyEquivalents = YES;
@implementation NSMenuItem

View file

@ -141,12 +141,12 @@ toData:(NSMutableData *)data
//
// Managing the DPS Context
//
- (NSDPSContext *)createContext
- (GPSDrawContext *)createContext
{
return nil;
}
- (NSDPSContext *)context
- (GPSDrawContext *)context
{
return nil;
}

View file

@ -33,11 +33,6 @@
#include <AppKit/NSScrollView.h>
#include <AppKit/NSWindow.h>
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
@implementation NSScrollView
static Class rulerViewClass = nil;

View file

@ -37,11 +37,6 @@
#include <AppKit/NSApplication.h>
#include <AppKit/NSImage.h>
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
@implementation NSScroller
/* Class variables */

View file

@ -30,11 +30,6 @@
#include <AppKit/NSImage.h>
#include <AppKit/NSTextFieldCell.h>
#define ASSIGN(a, b) \
[b retain]; \
[a release]; \
a = b;
@implementation NSSliderCell
- init

View file

@ -203,7 +203,7 @@
(int)NSMinX(r),(int)NSMinY(r),(int)NSWidth(r),
(int)NSHeight(r));
[self _fillRect: r];
[[NSDPSContext currentContext] flush];
[[GPSDrawContext currentContext] flush];
oldRect=r;
e=[[NSApplication sharedApplication]
nextEventMatchingMask:eventMask

View file

@ -67,10 +67,6 @@ extern BOOL NSEqualRanges(NSRange range1, NSRange range2); // should define in b
#define HUGE 1e99
#define ASSIGN(variable, value) [value retain]; \
[variable release]; \
variable = value;
enum {
NSBackspaceKey = 8,
NSCarriageReturnKey = 13,

View file

@ -33,10 +33,6 @@
#include <AppKit/NSLayoutManager.h>
#include <AppKit/NSTextStorage.h>
#define ASSIGN(variable, value) [value retain]; \
[variable release]; \
variable = value;
// classes needed are: NSRulerView NSTextContainer NSLayoutManager
@implementation NSTextView

View file

@ -51,11 +51,6 @@
#include <AppKit/PSMatrix.h>
#include <AppKit/NSWindowView.h>
#define ASSIGN(a, b) [b retain]; \
[a release]; \
a = b;
//*****************************************************************************
//
// NSWindow

View file

@ -43,7 +43,7 @@ static const float pi = 3.1415926535897932384626433;
@implementation PSMatrix
+ matrixFrom:(float[6])_matrix
+ matrixFrom: (const float[6])_matrix
{
PSMatrix* m = [[self alloc] autorelease];
@ -275,4 +275,18 @@ static const float pi = 3.1415926535897932384626433;
A, B, C, D, TX, TY];
}
- (void) setMatrix: (const float[6])replace
{
memcpy (matrix, replace, sizeof (matrix));
rotationAngle = atan2(replace[2], replace[0]);
rotationAngle *= 180.0 / M_PI;
}
- (void) getMatrix: (float[6])replace
{
memcpy (replace, matrix, sizeof (matrix));
}
@end /* PSMatrix */

View file

@ -319,3 +319,33 @@ NSString *NSAttachmentAttributeName = @"NSAttachmentAttributeName";
NSString *NSLigatureAttributeName = @"NSLigatureAttributeName";
NSString *NSBaselineOffsetAttributeName = @"NSBaselineOffsetAttributeName";
NSString *NSKernAttributeName = @"NSKernAttributeName";
/* Drawing engine externs */
GPSDrawContext *_currentGPSContext;
NSString *DPSconfigurationerror = @"DPSconfigurationerror";
NSString *DPSinvalidaccess = @"DPSinvalidaccess";
NSString *DPSinvalidcontext = @"DPSinvalidcontext";
NSString *DPSinvalidexit = @"DPSinvalidexit";
NSString *DPSinvalidfileaccess = @"DPSinvalidfileaccess";
NSString *DPSinvalidfont = @"DPSinvalidfont";
NSString *DPSinvalidid = @"DPSinvalidid";
NSString *DPSinvalidrestore = @"DPSinvalidrestore";
NSString *DPSinvalidparam = @"DPSinvalidparam";
NSString *DPSioerror = @"DPSioerror";
NSString *DPSlimitcheck = @"DPSlimitcheck";
NSString *DPSnocurrentpoint = @"DPSnocurrentpoint";
NSString *DPSnulloutput = @"DPSnulloutput";
NSString *DPSrangecheck = @"DPSrangecheck";
NSString *DPSstackoverflow = @"DPSstackoverflow";
NSString *DPSstackunderflow = @"DPSstackunderflow";
NSString *DPStypecheck = @"DPStypecheck";
NSString *DPSundefined = @"DPSundefined";
NSString *DPSundefinedfilename = @"DPSundefinedfilename";
NSString *DPSundefinedresource = @"DPSundefinedresource";
NSString *DPSundefinedresult = @"DPSundefinedresult";
NSString *DPSunmatchedmark = @"DPSunmatchedmark";
NSString *DPSunregistered = @"DPSunregistered";
NSString *DPSVMerror = @"DPSVMerror";

794
Source/gpsops.m Normal file
View file

@ -0,0 +1,794 @@
/* gpsops - PostScript operators and mappings to current context
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "AppKit/GPSDrawContext.h"
/* ----------------------------------------------------------------------- */
/* Color operations */
/* ----------------------------------------------------------------------- */
void GScolorimage( void )
{
[_currentGPSContext DPScolorimage];
}
void GScurrentblackgeneration( void )
{
[_currentGPSContext DPScurrentblackgeneration];
}
void GScurrentcmykcolor(float *c, float *m, float *y, float *k)
{
[_currentGPSContext DPScurrentcmykcolor:c :m :y :k];
}
void GScurrentcolorscreen( void )
{
[_currentGPSContext DPScurrentcolorscreen];
}
void GScurrentcolortransfer( void )
{
[_currentGPSContext DPScurrentcolortransfer];
}
void GScurrentundercolorremoval( void )
{
[_currentGPSContext DPScurrentundercolorremoval];
}
void GSsetblackgeneration( void )
{
[_currentGPSContext DPSsetblackgeneration];
}
void GSsetcmykcolor(float c, float m, float y, float k)
{
[_currentGPSContext DPSsetcmykcolor: c : m : y : k];
}
void GSsetcolorscreen( void )
{
[_currentGPSContext DPSsetcolorscreen];
}
void GSsetcolortransfer( void )
{
[_currentGPSContext DPSsetcolortransfer];
}
void GSsetundercolorremoval( void )
{
[_currentGPSContext DPSsetundercolorremoval];
}
/* ----------------------------------------------------------------------- */
/* Font operations */
/* ----------------------------------------------------------------------- */
void GSFontDirectory( void )
{
[_currentGPSContext DPSFontDirectory];
}
void GSISOLatin1Encoding( void )
{
[_currentGPSContext DPSISOLatin1Encoding];
}
void GSSharedFontDirectory( void )
{
[_currentGPSContext DPSSharedFontDirectory];
}
void GSStandardEncoding( void )
{
[_currentGPSContext DPSStandardEncoding];
}
void GScachestatus(int *bsize, int *bmax, int *msize)
{
[_currentGPSContext DPScachestatus: bsize : bmax : msize];
}
void GScurrentcacheparams( void )
{
[_currentGPSContext DPScurrentcacheparams];
}
void GScurrentfont( void )
{
[_currentGPSContext DPScurrentfont];
}
void GSdefinefont( void )
{
[_currentGPSContext DPSdefinefont];
}
void GSfindfont(const char *name)
{
[_currentGPSContext DPSfindfont: name];
}
void GSmakefont( void )
{
[_currentGPSContext DPSmakefont];
}
void GSscalefont(float size)
{
[_currentGPSContext DPSscalefont: size];
}
void GSselectfont(const char *name, float scale)
{
[_currentGPSContext DPSselectfont: name : scale];
}
void GSsetcachedevice(float wx, float wy, float llx, float lly, float urx, float ury)
{
[_currentGPSContext DPSsetcachedevice: wy : wy : lly : lly : urx : ury];
}
void GSsetcachelimit(float n)
{
[_currentGPSContext DPSsetcachelimit: n];
}
void GSsetcacheparams( void )
{
[_currentGPSContext DPSsetcacheparams];
}
void GSsetcharwidth(float wx, float wy)
{
[_currentGPSContext DPSsetcharwidth: wx : wy];
}
void GSsetfont(int f)
{
[_currentGPSContext DPSsetfont: f];
}
void GSundefinefont(const char *name)
{
[_currentGPSContext DPSundefinefont: name];
}
/* ----------------------------------------------------------------------- */
/* Gstate operations */
/* ----------------------------------------------------------------------- */
void
GSconcat(const float m[])
{
[_currentGPSContext DPSconcat: m];
}
void
GScurrentdash( void )
{
[_currentGPSContext DPScurrentdash];
}
void GScurrentflat(float *flatness)
{
[_currentGPSContext DPScurrentflat: flatness];
}
void GScurrentgray(float *gray)
{
[_currentGPSContext DPScurrentgray: gray];
}
void GScurrentgstate(int gst)
{
[_currentGPSContext DPScurrentgstate: gst];
}
void GScurrenthalftone( void )
{
[_currentGPSContext DPScurrenthalftone];
}
void GScurrenthalftonephase(float *x, float *y)
{
[_currentGPSContext DPScurrenthalftonephase: x : y];
}
void GScurrenthsbcolor(float *h, float *s, float *b)
{
[_currentGPSContext DPScurrenthsbcolor: h : s : b];
}
void GScurrentlinecap(int *linecap)
{
[_currentGPSContext DPScurrentlinecap: linecap];
}
void GScurrentlinejoin(int *linejoin)
{
[_currentGPSContext DPScurrentlinejoin: linejoin];
}
void GScurrentlinewidth(float *width)
{
[_currentGPSContext DPScurrentlinewidth: width];
}
void GScurrentmatrix( void )
{
[_currentGPSContext DPScurrentmatrix];
}
void GScurrentmiterlimit(float *limit)
{
[_currentGPSContext DPScurrentmiterlimit: limit];
}
void GScurrentpoint(float *x, float *y)
{
[_currentGPSContext DPScurrentpoint: x : y];
}
void GScurrentrgbcolor(float *r, float *g, float *b)
{
[_currentGPSContext DPScurrentrgbcolor: r : g : b];
}
void GScurrentscreen( void )
{
[_currentGPSContext DPScurrentscreen];
}
void GScurrentstrokeadjust(int *b)
{
[_currentGPSContext DPScurrentstrokeadjust: b];
}
void GScurrenttransfer( void )
{
[_currentGPSContext DPScurrenttransfer];
}
void GSdefaultmatrix( void )
{
[_currentGPSContext DPSdefaultmatrix];
}
void GSgrestore( void )
{
[_currentGPSContext DPSgrestore];
}
void GSgrestoreall( void )
{
[_currentGPSContext DPSgrestoreall];
}
void GSgsave( void )
{
[_currentGPSContext DPSgsave];
}
void GSgstate( void )
{
[_currentGPSContext DPSgstate];
}
void GSinitgraphics( void )
{
[_currentGPSContext DPSinitgraphics];
}
void GSinitmatrix( void )
{
[_currentGPSContext DPSinitmatrix];
}
void GSrotate(float angle)
{
[_currentGPSContext DPSrotate: angle];
}
void GSscale(float x, float y)
{
[_currentGPSContext DPSscale: x : y];
}
void GSsetdash(const float pat[], int size, float offset)
{
[_currentGPSContext DPSsetdash: pat : size : offset];
}
void GSsetflat(float flatness)
{
[_currentGPSContext DPSsetflat: flatness];
}
void GSsetgray(float gray)
{
[_currentGPSContext DPSsetgray: gray];
}
void GSsetgstate(int gst)
{
[_currentGPSContext DPSsetgstate: gst];
}
void GSsethalftone( void )
{
[_currentGPSContext DPSsethalftone];
}
void GSsethalftonephase(float x, float y)
{
[_currentGPSContext DPSsethalftonephase: x : y];
}
void GSsethsbcolor(float h, float s, float b)
{
[_currentGPSContext DPSsethsbcolor: h : s : b];
}
void GSsetlinecap(int linecap)
{
[_currentGPSContext DPSsetlinecap: linecap];
}
void GSsetlinejoin(int linejoin)
{
[_currentGPSContext DPSsetlinejoin: linejoin];
}
void GSsetlinewidth(float width)
{
[_currentGPSContext DPSsetlinewidth: width];
}
void GSsetmatrix( void )
{
[_currentGPSContext DPSsetmatrix];
}
void GSsetmiterlimit(float limit)
{
[_currentGPSContext DPSsetmiterlimit: limit];
}
void GSsetrgbcolor(float r, float g, float b)
{
[_currentGPSContext DPSsetrgbcolor: r : g : b];
}
void GSsetscreen( void )
{
[_currentGPSContext DPSsetscreen];
}
void GSsetstrokeadjust(int b)
{
[_currentGPSContext DPSsetstrokeadjust: b];
}
void GSsettransfer( void )
{
[_currentGPSContext DPSsettransfer];
}
void GStranslate(float x, float y)
{
[_currentGPSContext DPStranslate: x : y];
}
/* ----------------------------------------------------------------------- */
/* I/O operations */
/* ----------------------------------------------------------------------- */
void GSflush( void )
{
[_currentGPSContext DPSflush];
}
/* ----------------------------------------------------------------------- */
/* Matrix operations */
/* ----------------------------------------------------------------------- */
void GSconcatmatrix( void )
{
[_currentGPSContext DPSconcatmatrix];
}
void GSdtransform(float x1, float y1, float *x2, float *y2)
{
[_currentGPSContext DPSdtransform: x1 : y1 : x2 : y2];
}
void GSidentmatrix( void )
{
[_currentGPSContext DPSidentmatrix];
}
void GSidtransform(float x1, float y1, float *x2, float *y2)
{
[_currentGPSContext DPSidtransform: x1 : y1 : x2 : y2];
}
void GSinvertmatrix( void )
{
[_currentGPSContext DPSinvertmatrix];
}
void GSitransform(float x1, float y1, float *x2, float *y2)
{
[_currentGPSContext DPSitransform: x1 : y1 : x2 : y2];
}
void GStransform(float x1, float y1, float *x2, float *y2)
{
[_currentGPSContext DPStransform: x1 : y1 : x2 : y2];
}
/* ----------------------------------------------------------------------- */
/* Paint operations */
/* ----------------------------------------------------------------------- */
void GSashow(float x, float y, const char *s)
{
[_currentGPSContext DPSashow: x : y : s];
}
void GSawidthshow(float cx, float cy, int c, float ax, float ay, const char *s)
{
[_currentGPSContext DPSawidthshow: cx : cy : c : ax : ay : s];
}
void GScopypage( void )
{
[_currentGPSContext DPScopypage];
}
void GSeofill( void )
{
[_currentGPSContext DPSeofill];
}
void GSerasepage( void )
{
[_currentGPSContext DPSerasepage];
}
void GSfill( void )
{
[_currentGPSContext DPSfill];
}
void GSimage( void )
{
[_currentGPSContext DPSimage];
}
void GSimagemask( void )
{
[_currentGPSContext DPSimagemask];
}
void GSkshow(const char *s)
{
[_currentGPSContext DPSkshow: s];
}
void GSrectfill(float x, float y, float w, float h)
{
[_currentGPSContext DPSrectfill: x : y : w : h];
}
void GSrectstroke(float x, float y, float w, float h)
{
[_currentGPSContext DPSrectstroke: x : y : w : h];
}
void GSshow(const char *s)
{
[_currentGPSContext DPSshow: s];
}
void GSshowpage( void )
{
[_currentGPSContext DPSshowpage];
}
void GSstroke( void )
{
[_currentGPSContext DPSstroke];
}
void GSstrokepath( void )
{
[_currentGPSContext DPSstrokepath];
}
void GSueofill(const char nums[], int n, const char ops[], int l)
{
[_currentGPSContext DPSueofill: nums : n : ops : l];
}
void GSufill(const char nums[], int n, const char ops[], int l)
{
[_currentGPSContext DPSufill: nums : n : ops : l];
}
void GSustroke(const char nums[], int n, const char ops[], int l)
{
[_currentGPSContext DPSustroke: nums : n : ops : l];
}
void GSustrokepath(const char nums[], int n, const char ops[], int l)
{
[_currentGPSContext DPSustrokepath: nums : n : ops : l];
}
void GSwidthshow(float x, float y, int c, const char *s)
{
[_currentGPSContext DPSwidthshow: x : y : c : s];
}
void GSxshow(const char *s, const float numarray[], int size)
{
[_currentGPSContext DPSxshow: s : numarray : size];
}
void GSxyshow(const char *s, const float numarray[], int size)
{
[_currentGPSContext DPSxyshow: s : numarray : size];
}
void GSyshow(const char *s, const float numarray[], int size)
{
[_currentGPSContext DPSyshow: s : numarray : size];
}
/* ----------------------------------------------------------------------- */
/* Path operations */
/* ----------------------------------------------------------------------- */
void GSarc(float x, float y, float r, float angle1, float angle2)
{
[_currentGPSContext DPSarc: x : y : r : angle1 : angle2];
}
void GSarcn(float x, float y, float r, float angle1, float angle2)
{
[_currentGPSContext DPSarcn: x : y : r : angle1 : angle2];
}
void GSarct(float x1, float y1, float x2, float y2, float r)
{
[_currentGPSContext DPSarct: x1 : y1 : x2 : y2 : r];
}
void GSarcto(float x1, float y1, float x2, float y2, float r, float *xt1, float *yt1, float *xt2, float *yt2)
{
[_currentGPSContext DPSarcto: x1 : y1 : x2 : y2 : r : xt1 : yt1 : xt2 : yt2];
}
void GScharpath(const char *s, int b)
{
[_currentGPSContext DPScharpath: s : b];
}
void GSclip( void )
{
[_currentGPSContext DPSclip];
}
void GSclippath( void )
{
[_currentGPSContext DPSclippath];
}
void GSclosepath( void )
{
[_currentGPSContext DPSclosepath];
}
void GScurveto(float x1, float y1, float x2, float y2, float x3, float y3)
{
[_currentGPSContext DPScurveto: x1 : y1 : x2 : y2 : x3 : y3];
}
void GSeoclip( void )
{
[_currentGPSContext DPSeoclip];
}
void GSeoviewclip( void )
{
[_currentGPSContext DPSeoviewclip];
}
void GSflattenpath( void )
{
[_currentGPSContext DPSflattenpath];
}
void GSinitclip( void )
{
[_currentGPSContext DPSinitclip];
}
void GSinitviewclip( void )
{
[_currentGPSContext DPSinitviewclip];
}
void GSlineto(float x, float y)
{
[_currentGPSContext DPSlineto: x : y];
}
void GSmoveto(float x, float y)
{
[_currentGPSContext DPSmoveto: x : y];
}
void GSnewpath( void )
{
[_currentGPSContext DPSnewpath];
}
void GSpathbbox(float *llx, float *lly, float *urx, float *ury)
{
[_currentGPSContext DPSpathbbox: llx : lly : urx : ury];
}
void GSpathforall( void )
{
[_currentGPSContext DPSpathforall];
}
void GSrcurveto(float x1, float y1, float x2, float y2, float x3, float y3)
{
[_currentGPSContext DPSrcurveto: x1 : y1 : x2 : y2 : x3 : y3];
}
void GSrectclip(float x, float y, float w, float h)
{
[_currentGPSContext DPSrectclip: x : y : w : h];
}
void GSrectviewclip(float x, float y, float w, float h)
{
[_currentGPSContext DPSrectviewclip: x : y : w : h];
}
void GSreversepath( void )
{
[_currentGPSContext DPSreversepath];
}
void GSrlineto(float x, float y)
{
[_currentGPSContext DPSrlineto: x : y];
}
void GSrmoveto(float x, float y)
{
[_currentGPSContext DPSrmoveto: x : y];
}
void GSsetbbox(float llx, float lly, float urx, float ury)
{
[_currentGPSContext DPSsetbbox: llx : lly : urx : ury];
}
void GSsetucacheparams( void )
{
[_currentGPSContext DPSsetucacheparams];
}
void GSuappend(const char nums[], int n, const char ops[], int l)
{
[_currentGPSContext DPSuappend: nums : n : ops : l];
}
void GSucache( void )
{
[_currentGPSContext DPSucache];
}
void GSucachestatus( void )
{
[_currentGPSContext DPSucachestatus];
}
void GSupath(int b)
{
[_currentGPSContext DPSupath: b];
}
void GSviewclip( void )
{
[_currentGPSContext DPSviewclip];
}
void GSviewclippath( void )
{
[_currentGPSContext DPSviewclippath];
}
/* ----------------------------------------------------------------------- */
/* X operations */
/* ----------------------------------------------------------------------- */
void GScurrentXdrawingfunction(int *function)
{
[_currentGPSContext DPScurrentXdrawingfunction: function];
}
void GScurrentXgcdrawable(int *gc, int *draw, int *x, int *y)
{
[_currentGPSContext DPScurrentXgcdrawable: gc : draw : x : y];
}
void GScurrentXgcdrawablecolor(int *gc, int *draw, int *x, int *y,
int colorInfo[])
{
[_currentGPSContext DPScurrentXgcdrawablecolor: gc : draw : x : y : colorInfo];
}
void GScurrentXoffset(int *x, int *y)
{
[_currentGPSContext DPScurrentXoffset: x : y];
}
void GSsetXdrawingfunction(int function)
{
[_currentGPSContext DPSsetXdrawingfunction: function];
}
void GSsetXgcdrawable(int gc, int draw, int x, int y)
{
[_currentGPSContext DPSsetXgcdrawable: gc : draw : x : y];
}
void GSsetXgcdrawablecolor(int gc, int draw, int x, int y,
const int colorInfo[])
{
[_currentGPSContext DPSsetXgcdrawablecolor: gc : draw : x : y : colorInfo];
}
void GSsetXoffset(short int x, short int y)
{
[_currentGPSContext DPSsetXoffset: x : y];
}
void GSsetXrgbactual(double r, double g, double b, int *success)
{
[_currentGPSContext DPSsetXrgbactual: r : g : b : success];
}