DPSCAPClient.h revision 824
824N/A/*
824N/A * DPSCAPClient.h -- DPSCAP client definitions
824N/A *
824N/A * (c) Copyright 1990-1994 Adobe Systems Incorporated.
824N/A * All rights reserved.
824N/A *
824N/A * Permission to use, copy, modify, distribute, and sublicense this software
824N/A * and its documentation for any purpose and without fee is hereby granted,
824N/A * provided that the above copyright notices appear in all copies and that
824N/A * both those copyright notices and this permission notice appear in
824N/A * supporting documentation and that the name of Adobe Systems Incorporated
824N/A * not be used in advertising or publicity pertaining to distribution of the
824N/A * software without specific, written prior permission. No trademark license
824N/A * to use the Adobe trademarks is hereby granted. If the Adobe trademark
824N/A * "Display PostScript"(tm) is used to describe this software, its
824N/A * functionality or for any other purpose, such use shall be limited to a
824N/A * statement that this software works in conjunction with the Display
824N/A * PostScript system. Proper trademark attribution to reflect Adobe's
824N/A * ownership of the trademark shall be given whenever any such reference to
824N/A * the Display PostScript system is made.
824N/A *
824N/A * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
824N/A * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
824N/A * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
824N/A * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
824N/A * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
824N/A * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
824N/A * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
824N/A * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
824N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
824N/A * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
824N/A *
824N/A * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
824N/A * Incorporated which may be registered in certain jurisdictions
824N/A *
824N/A * Author: Adobe Systems Incorporated
824N/A */
824N/A
824N/A#ifndef DPSCAPCLIENT_H
824N/A#define DPSCAPCLIENT_H 1
824N/A
824N/A#include "DPSCAP.h"
824N/A#include "DPSCAPproto.h"
824N/A#include <X11/Xlib.h>
824N/A#ifndef Xmalloc
824N/A#endif
824N/A#include <DPS/XDPSlib.h>
824N/A
824N/A/* === DEFINES === */
824N/A
824N/A#ifndef _NFILE
824N/A#define _NFILE 128
824N/A#endif
824N/A
824N/A#define DPSCAPFAILED -1
824N/A#define DPSCAPSUCCESS 0
824N/A
824N/A#define DPSGCBITS \
824N/A(GCPlaneMask|GCSubwindowMode|GCClipXOrigin|GCClipYOrigin|GCClipMask)
824N/A
824N/A/* === TYPEDEFS === */
824N/A
824N/Atypedef enum {
824N/A dpscap_nopad,
824N/A dpscap_pad,
824N/A dpscap_insert,
824N/A dpscap_append
824N/A} DPSCAPIOFlags;
824N/A
824N/Atypedef struct _t_DPSCAPData {
824N/A struct _t_DPSCAPData *next;
824N/A Display *dpy;
824N/A /* shadow connection to agent */
824N/A Display *agent; /* Dummy display structure is agent */
824N/A char *otherConnID; /* VMS AST? */
824N/A XExtCodes *codes;
824N/A XExtData *extData; /* Back pointer for clearing private */
824N/A Atom typePSOutput;
824N/A Atom typePSOutputWithLen;
824N/A Atom typePSStatus;
824N/A Atom typeNoop;
824N/A Atom typeSync;
824N/A Atom typeXError;
824N/A Atom typePSReady; /* L2-DPS/PROTO 9 addition */
824N/A Atom typeResume;
824N/A unsigned long saveseq;
824N/A int dpscapVersion;
824N/A Window agentWindow;
824N/A} DPSCAPDataRec, *DPSCAPData;
824N/A
824N/Atypedef struct {
824N/A struct _t_DPSCAPData *head; /* list of active agent connections */
824N/A char *defaultAgentName; /* settable agent name */
824N/A char *map[_NFILE]; /* map DPY_NUMBER to agent name */
824N/A} DPSCAPGlobalsRec, *DPSCAPGlobals;
824N/A
824N/A/* === GLOBALS === */
824N/A
824N/Aextern DPSCAPGlobals gCSDPS;
824N/A
824N/A/* === PUBLIC PROCS === */
824N/A
824N/Aextern int CSDPSInit(Display * /* dpy */, int * /* numberType */, char ** /* floatingName */);
824N/A
824N/Aextern XExtData **CSDPSHeadOfDpyExt(Display * /* dpy */);
824N/A
824N/A/* === SUPPORT PROCS === */
824N/A
824N/Aextern void DPSCAPChangeGC(Display * /* agent */, GC /* gc */, unsigned long /* valuemask */, XGCValues * /* values */);
824N/A
824N/Aextern DPSCAPData DPSCAPCreate(Display * /* dpy */, Display * /* agent */);
824N/A
824N/Aextern int DPSCAPDestroy(XExtData * /* extData */);
824N/A
824N/Aextern XExtData * DPSCAPOpenAgent(Display * /* dpy */, char * /* trueDisplayName */);
824N/A
824N/Aextern void DPSCAPRead(DPSCAPData /* my */, char * /* buf */, unsigned /* len */, DPSCAPIOFlags /* includePad */);
824N/A
824N/Aextern void DPSCAPStartUp(void);
824N/A
824N/Aextern void DPSCAPWrite(Display * /* my */, char * /* buf */, unsigned /* len */, DPSCAPIOFlags /* writePad */, DPSCAPIOFlags /* bufMode */);
824N/A
824N/A/* ext callback hooks */
824N/A
824N/Aextern int DPSCAPCloseDisplayProc(Display * /* dpy */, XExtCodes * /* codes */);
824N/A
824N/Aextern int DPSCAPGrabServerProc(Display * /* dpy */, XExtCodes * /* codes */);
824N/A
824N/Aextern int DPSCAPUngrabServerProc(Display * /* dpy */, XExtCodes * /* codes */);
824N/A
824N/Aextern void DPSCAPCloseAgent(Display * /* agent */);
824N/A
824N/Aextern int DPSCAPCopyGCProc(Display * /* dpy */, GC /* gc */, XExtCodes * /* codes */);
824N/A
824N/Aextern int DPSCAPFreeGCProc(Display * /* pdpy */, GC /* gc */, XExtCodes * /* codes */);
824N/A
824N/Aextern int DPSCAPFlushGCProc(Display * /* dpy */, GC /* gc */, XExtCodes * /* codes */);
824N/A
824N/A#endif /* DPSCAPCLIENT_H */