ftp.nice.ch/pub/next/developer/objc/dps/AdobeExamples.N.bs.tar.gz#/AdobeExamples/NX_Scroll/DrawingViewWraps.c

This is DrawingViewWraps.c in view mode; [Download] [Up]

/* DrawingViewWraps.c generated from DrawingViewWraps.psw
   by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
 */

#include <dpsclient/dpsfriends.h>
#include <string.h>

#line 1 "DrawingViewWraps.psw"

/*
 * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
 *
 * (b)  If this Sample Code is distributed as part of the Display PostScript
 *	System Software Development Kit from Adobe Systems Incorporated,
 *	then this copy is designated as Development Software and its use is
 *	subject to the terms of the License Agreement attached to such Kit.
 *
 * (c)  If this Sample Code is distributed independently, then the following
 *	terms apply:
 *
 * (d)  This file may be freely copied and redistributed as long as:
 *	1) Parts (a), (d), (e) and (f) continue to be included in the file,
 *	2) If the file has been modified in any way, a notice of such
 *      modification is conspicuously indicated.
 *
 * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
 *	Adobe Systems Incorporated.
 * 
 * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
 *	CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
 *	AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
 *	ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
 *	OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
 *	WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
 *	WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
 *	DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
 *	FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
 *	OF THIRD PARTY RIGHTS.
 */

/*
 *	DrawingViewWraps.psw
 *
 *
 *	Version:	2.0
 *	Author:	Ken Fromm
 *	History:
 *			03-07-91		Added this comment.
 */
#line 51 "DrawingViewWraps.c"
void PSWMarkTime( void )
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 3, 28,
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* StartTime */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},	/* realtime */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},	/* def */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  static long int _dpsCodes[1] = {-1};
  {
if (_dpsCodes[0] < 0) {
    static const char * const _dps_names[] = {
	"StartTime"};
    long int *_dps_nameVals[1];
    _dps_nameVals[0] = &_dpsCodes[0];

    DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
    }
  }

  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[0].val.nameVal = _dpsCodes[0];
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
}
#line 45 "DrawingViewWraps.psw"

#line 91 "DrawingViewWraps.c"
void PSWReturnTime(int *ElapsedTime)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjGeneric obj4;
    DPSBinObjGeneric obj5;
    DPSBinObjGeneric obj6;
    DPSBinObjGeneric obj7;
    DPSBinObjGeneric obj8;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 9, 76,
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},	/* realtime */
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* StartTime */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},	/* sub */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_LITERAL|DPS_INT, 0, 0, 1},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},	/* flush */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  static long int _dpsCodes[1] = {-1};
  DPSResultsRec _dpsR[1];
  static const DPSResultsRec _dpsRstat[] = {
    { dps_tInt, -1 },
    };
    _dpsR[0] = _dpsRstat[0];
    _dpsR[0].value = (char *)ElapsedTime;

  {
if (_dpsCodes[0] < 0) {
    static const char * const _dps_names[] = {
	"StartTime"};
    long int *_dps_nameVals[1];
    _dps_nameVals[0] = &_dpsCodes[0];

    DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
    }
  }

  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[1].val.nameVal = _dpsCodes[0];
  DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
  DPSAwaitReturnValues(_dpsCurCtxt);
}
#line 50 "DrawingViewWraps.psw"

#line 152 "DrawingViewWraps.c"
void PSWUcachestatus(int *Bsize, int *Bmax, int *Rsize, int *Rmax, int *Blimit)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjGeneric obj4;
    DPSBinObjGeneric obj5;
    DPSBinObjGeneric obj6;
    DPSBinObjGeneric obj7;
    DPSBinObjGeneric obj8;
    DPSBinObjGeneric obj9;
    DPSBinObjGeneric obj10;
    DPSBinObjGeneric obj11;
    DPSBinObjGeneric obj12;
    DPSBinObjGeneric obj13;
    DPSBinObjGeneric obj14;
    DPSBinObjGeneric obj15;
    } _dpsQ;
  static const _dpsQ _dpsF = {
    DPS_DEF_TOKENTYPE, 16, 132,
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 361},	/* ucachestatus */
    {DPS_LITERAL|DPS_INT, 0, 0, 4},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_LITERAL|DPS_INT, 0, 0, 3},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_LITERAL|DPS_INT, 0, 0, 2},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_LITERAL|DPS_INT, 0, 0, 1},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 19},	/* cleartomark */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_LITERAL|DPS_INT, 0, 0, 5},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},	/* flush */
    }; /* _dpsQ */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  DPSResultsRec _dpsR[5];
  static const DPSResultsRec _dpsRstat[] = {
    { dps_tInt, -1 },
    { dps_tInt, -1 },
    { dps_tInt, -1 },
    { dps_tInt, -1 },
    { dps_tInt, -1 },
    };
    _dpsR[0] = _dpsRstat[0];
    _dpsR[0].value = (char *)Bsize;
    _dpsR[1] = _dpsRstat[1];
    _dpsR[1].value = (char *)Bmax;
    _dpsR[2] = _dpsRstat[2];
    _dpsR[2].value = (char *)Rsize;
    _dpsR[3] = _dpsRstat[3];
    _dpsR[3].value = (char *)Rmax;
    _dpsR[4] = _dpsRstat[4];
    _dpsR[4].value = (char *)Blimit;

  DPSSetResultTable(_dpsCurCtxt, _dpsR, 5);
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,132);
  DPSAwaitReturnValues(_dpsCurCtxt);
}
#line 54 "DrawingViewWraps.psw"

#line 222 "DrawingViewWraps.c"
void PSWSetParameters(int LineJoin, int LineCap, float LineWidth, float MiterLimit)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjReal obj4;
    DPSBinObjGeneric obj5;
    DPSBinObjReal obj6;
    DPSBinObjGeneric obj7;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 8, 68,
    {DPS_LITERAL|DPS_INT, 0, 0, 0},	/* param: LineJoin */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 154},	/* setlinejoin */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},	/* param: LineCap */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 153},	/* setlinecap */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: LineWidth */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},	/* setlinewidth */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: MiterLimit */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 346},	/* setmiterlimit */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[0].val.integerVal = LineJoin;
  _dpsP[2].val.integerVal = LineCap;
  _dpsP[4].val.realVal = LineWidth;
  _dpsP[6].val.realVal = MiterLimit;
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,68);
}
#line 59 "DrawingViewWraps.psw"

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.