824N/A/*
824N/A * dpsXpriv.h -- client lib internal impl interface for the X version
824N/A *
824N/A * (c) Copyright 1989-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 DPSXPRIVATE_H
824N/A#define DPSXPRIVATE_H
824N/A
824N/A#ifdef VMS
824N/A#include <decw$include/X.h>
824N/A#include <decw$include/Xlib.h>
824N/A#include <decw$include/Xutil.h>
824N/A#else /* VMS */
824N/A#include <X11/X.h>
824N/A#include <X11/Xlib.h>
824N/A#include <X11/Xutil.h>
824N/A#endif /* VMS */
824N/A
824N/A#include <DPS/XDPSlib.h>
824N/A#include "DPS/dpsclient.h"
824N/A#include "dpsprivate.h"
824N/A#include "DPS/dpsXclient.h"
824N/A#include "publictypes.h"
824N/A
824N/A/* typedefs */
824N/A
824N/Atypedef struct _t_XDPSPrivContextRec
824N/A {
824N/A Display *dpy;
824N/A Drawable drawable;
824N/A GC gc;
824N/A int x;
824N/A int y;
824N/A unsigned int eventmask;
824N/A XStandardColormap *grayramp;
824N/A XStandardColormap *ccube;
824N/A int actual;
824N/A DPSContext ctxt; /* Points back to its context */
824N/A ContextXID cxid;
824N/A char *newObjFormat; /* This is the object format that a */
824N/A /* new context must use for sending */
824N/A /* BOS's to the client. If the */
824N/A /* server and client have the same */
824N/A /* number formats then this will be */
824N/A /* null. */
824N/A int secure;
824N/A } XDPSPrivContextRec, *XDPSPrivContext;
824N/A
824N/A
824N/Aextern DPSProcs XDPSconvProcs;
824N/Aextern DPSProcs XDPSrawProcs;
824N/Aextern int XDPSQuitBlocking;
824N/A
824N/A
824N/Aextern XDPSPrivContext XDPSCreatePrivContextRec (
824N/A Display * /* dpy */,
824N/A Drawable /* drawable */,
824N/A GC /* gc */,
824N/A int /* x */,
824N/A int /* y */,
824N/A unsigned int /* eventmask */,
824N/A XStandardColormap * /* grayramp */,
824N/A XStandardColormap * /* ccube */,
824N/A int /* actual */,
824N/A int /* secure */);
824N/A
824N/A /* See if dpy supports the DPS extension. If not, return NULL. If so,
824N/A it sets up a private context object that is used for creating
824N/A contexts and spaces. */
824N/A
824N/Aextern DPSNumFormat DPSCreatePrivContext(
824N/A XDPSPrivContext /* wh */,
824N/A DPSContext /* ctxt */,
824N/A ContextPSID * /* cidP */,
824N/A SpaceXID * /* sxidP */,
824N/A boolean /* newSpace */,
824N/A DPSClientPrintProc /* printProc */);
824N/A /* returns -1 if server can't create the context */
824N/A
824N/Aextern void DPSIncludePrivContext(
824N/A XDPSPrivContext /* wh */,
824N/A DPSContext /* ctxt */,
824N/A ContextPSID /* cid */,
824N/A SpaceXID /* sxid */,
824N/A DPSClientPrintProc /* printProc */);
824N/A
824N/Aextern void DPSSendPostScript(
824N/A XDPSPrivContext /* wh */,
824N/A DPSClientPrintProc /* printProc */,
824N/A ContextPSID /* cid */,
824N/A char * /* buffer */,
824N/A long int /* count */,
824N/A boolean (* /* returnControl */)(void));
824N/A
824N/Aextern void DPSSendInterrupt(
824N/A XDPSPrivContext /* wh */,
824N/A ContextPSID /* cid */,
824N/A DPSClientPrintProc /* printProc */);
824N/A
824N/Aextern void DPSSendEOF(
824N/A XDPSPrivContext /* wh */,
824N/A ContextPSID /* cid */,
824N/A DPSClientPrintProc /* printProc */);
824N/A
824N/Aextern void DPSSendTerminate(
824N/A XDPSPrivContext /* wh */,
824N/A ContextPSID /* cid */,
824N/A DPSClientPrintProc /* printProc */);
824N/A
824N/Aextern void XDPSPrivZapDpy(
824N/A Display * /* dpy */);
824N/A
824N/Aextern DPSNumFormat XDPSNumFormat (Display * /* dpy */);
824N/A
824N/A /* Determine the number format for server over the "dpy" connection. */
824N/A
824N/Aextern void XDPSSetProcs (void);
824N/A
824N/A /* Set pointers to raw and conversion context procs. */
824N/A
824N/Aextern void XDPSSetContextEncoding (
824N/A DPSContext /* ctxt */,
824N/A DPSProgramEncoding /* progEncoding */,
824N/A DPSNameEncoding /* nameEncoding */);
824N/A
824N/A /* Sets context's program and name encodings to new values. */
824N/A
824N/Aextern void XDPSStatusEventHandler (XDPSLStatusEvent * /* event */);
824N/A
824N/A /* Is registered with Xlib and is called when a dps status event is
824N/A received. It determines what context the event belongs to and,
824N/A if that context has a status event handler, calls its handler
824N/A passing it the status type. */
824N/A
824N/Aextern void XDPSReadyEventHandler (XDPSLReadyEvent * /* event */);
824N/A
824N/A /* Is registered with Xlib and is called when a dps ready event is
824N/A received. It determines what context the event belongs to and,
824N/A if that context has a status event handler, calls its handler
824N/A passing it the ready data. */
824N/A
824N/Aextern void XDPSForceEvents (Display * /* dpy */);
824N/A
824N/A /* Forces processing of events that are pending over the 'dpy'
824N/A connection. This causes DPS events to be handled by their handlers. */
824N/A
824N/Aextern void XDPSSendUnfreeze (Display * /* dpy */, ContextXID /* cxid */);
824N/A
824N/Aextern void DPSSendDestroySpace(
824N/A XDPSPrivContext /* wh */,
824N/A SpaceXID /* sxid */,
824N/A DPSClientPrintProc /* printProc */);
824N/A
824N/A#endif /* DPSXPRIVATE_H */