b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $Xorg: Ps.h,v 1.5 2001/02/09 02:04:35 xorgcvs Exp $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCopyright 1996, 1998 The Open Group
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncthe above copyright notice appear in all copies and that both that
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynccopyright notice and this permission notice appear in supporting
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncdocumentation.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncThe above copyright notice and this permission notice shall be included in
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncall copies or substantial portions of the Software.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncin this Software without prior written authorization from The Open Group.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (c) Copyright 1996 Hewlett-Packard Company
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (c) Copyright 1996 International Business Machines Corp.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (c) Copyright 1996 Sun Microsystems, Inc.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (c) Copyright 1996 Novell, Inc.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (c) Copyright 1996 Digital Equipment Corp.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (c) Copyright 1996 Fujitsu Limited
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (c) Copyright 1996 Hitachi, Ltd.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Permission is hereby granted, free of charge, to any person obtaining
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * a copy of this software and associated documentation files (the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * "Software"), to deal in the Software without restriction, including
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * without limitation the rights to use, copy, modify, merge, publish,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * distribute, sublicense, and/or sell copies of the Software, and to
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * permit persons to whom the Software is furnished to do so, subject
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * to the following conditions:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * The above copyright notice and this permission notice shall be included
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * in all copies or substantial portions of the Software.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Except as contained in this notice, the names of the copyright holders
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * shall not be used in advertising or otherwise to promote the sale, use
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * or other dealings in this Software without prior written authorization
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * from said copyright holders.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*******************************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync**
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** *********************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** * File: Ps.h
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** * Contents: defines and includes for the Ps driver
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** * for a printing X server.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** * Created By: Roger Helmendach (Liberty Systems)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** * Copyright: Copyright 1996 The Open Group, Inc.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync** *********************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync**
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync********************************************************************/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef HAVE_DIX_CONFIG_H
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <dix-config.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifndef _PS_H_
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define _PS_H_
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <stdio.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef abs
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#undef abs /* this is because of a non-Spec1170ness in misc.h */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <stdlib.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "scrnintstr.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "dix.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "PsDef.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "psout.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <X11/extensions/Print.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <X11/extensions/Printstr.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "regionstr.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <X11/fonts/fontstruct.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "dixfontstr.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "gcstruct.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Some sleazes to force the XrmDB stuff into the server
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifndef HAVE_XPointer
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef char *XPointer;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define Status int
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define True 1
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define False 0
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "misc.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <X11/Xfuncproto.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <X11/Xresource.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "attributes.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Public index variables from PsInit.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsScreenPrivateIndex;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsWindowPrivateIndex;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsContextPrivateIndex;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsPixmapPrivateIndex;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern XpValidatePoolsRec PsValidatePoolsRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Display list structures
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define DPY_BLOCKSIZE 4096
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int mode;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int nPoints;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xPoint *pPoints;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsPolyPointsRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int nSegments;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xSegment *pSegments;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsSegmentsRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int nRects;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xRectangle *pRects;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsRectanglesRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int nArcs;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xArc *pArcs;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsArcsRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int x;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int y;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int count;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *string;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsText8Rec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int x;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int y;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int count;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned short *string;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsText16Rec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int depth;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int x;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int y;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int w;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int h;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int leftPad;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int format;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int res; /* image resolution */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *pData;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsImageRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int x;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int y;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int w;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int h;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsFrameRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef enum
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PolyPointCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PolyLineCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PolySegmentCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PolyRectangleCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync FillPolygonCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PolyFillRectCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PolyArcCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PolyFillArcCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Text8Cmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Text16Cmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync TextI8Cmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync TextI16Cmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PutImageCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync BeginFrameCmd,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync EndFrameCmd
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} DisplayElmType;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct _DisplayElmRec
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DisplayElmType type;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync GCPtr gc;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync union
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsPolyPointsRec polyPts;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsSegmentsRec segments;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsRectanglesRec rects;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsArcsRec arcs;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsText8Rec text8;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsText16Rec text16;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsImageRec image;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsFrameRec frame;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync } c;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} DisplayElmRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef DisplayElmRec *DisplayElmPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct _DisplayListRec
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync struct _DisplayListRec *next;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int nelms;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DisplayElmRec elms[DPY_BLOCKSIZE];
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} DisplayListRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef DisplayListRec *DisplayListPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Private structures
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XrmDatabase resDB;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Bool (*DestroyWindow)(WindowPtr);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsScreenPrivRec, *PsScreenPrivPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct PsFontTypeInfoRec PsFontTypeInfoRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Structure to hold information about one font on disk
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Notes:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * - multiple XLFD names can refer to the same |PsFontTypeInfoRec| (if
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * they all use the same font on the disk)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * - the FreeType font download code uses multiple |PsFontTypeInfoRec|
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * records for one font on disk if they differ in the encoding being
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * used (this is an exception from the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 'one-|PsFontTypeInfoRec|-per-font-on-disk'-design; maybe it it is better
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * to rework that in a later step and add a new per-encoding structure).
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncstruct PsFontTypeInfoRec
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsFontTypeInfoRec *next; /* Next record in list... */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *adobe_ps_name; /* PostScript font name (from the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * "_ADOBE_POSTSCRIPT_FONTNAME" atom) */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *download_ps_name; /* PostScript font name used for font download */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *filename; /* File name of font */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef XP_USE_FREETYPE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *ft_download_encoding; /* encoding used for download */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsFTDownloadFontType ft_download_font_type; /* PS font type used for download (e.g. Type1/Type3/CID/etc.) */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif /* XP_USE_FREETYPE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int is_iso_encoding; /* Is this font encoded in ISO Latin 1 ? */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int font_type; /* See PSFTI_FONT_TYPE_* below... */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Bool downloadableFont; /* Font can be downloaded */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Bool alreadyDownloaded[256]; /* Font has been downloaded (for 256 8bit "sub"-font) */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync};
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define PSFTI_FONT_TYPE_OTHER (0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define PSFTI_FONT_TYPE_PMF (1)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define PSFTI_FONT_TYPE_PS_TYPE1_PFA (2)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define PSFTI_FONT_TYPE_PS_TYPE1_PFB (3)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define PSFTI_FONT_TYPE_TRUETYPE (4)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* PSFTI_FONT_TYPE_FREETYPE is means the font is handled by the freetype engine */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define PSFTI_FONT_TYPE_FREETYPE (5)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct PsFontInfoRec PsFontInfoRec;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Structure which represents our context info for a single XLFD font
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Note that multiple |PsFontInfoRec| records can share the same
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * |PsFontTypeInfoRec| record - the |PsFontInfoRec| records represent
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * different appearances of the same font on disk(=|PsFontTypeInfoRec|)).
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncstruct PsFontInfoRec
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsFontInfoRec *next; /* Next record in list... */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* |font| and |font_fontPrivate| are used by |PsFindFontInfoRec()| to
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * identify a font */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync FontPtr font; /* The font this record is for */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync pointer font_fontPrivate;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsFontTypeInfoRec *ftir; /* Record about the font file on disk */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync const char *dfl_name; /* XLFD for this font */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int size; /* Font size. Use |mtx| if |size==0| */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync float mtx[4]; /* Transformation matrix (see |size|) */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync};
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *jobFileName;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync FILE *pJobFile;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync GC lastGC;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned char *dash;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int validGC;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ClientPtr getDocClient;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int getDocBufSize;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsOutPtr pPsOut;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsFontTypeInfoRec *fontTypeInfoRecords;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsFontInfoRec *fontInfoRecords;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsContextPrivRec, *PsContextPrivPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int validContext;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XpContextPtr context;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsWindowPrivRec, *PsWindowPrivPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync{
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XpContextPtr context;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync GC lastGC;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int validGC;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DisplayListPtr dispList;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PsPixmapPrivRec, *PsPixmapPrivPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Macro functions
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define SEND_PS(f,c) fwrite( c, sizeof( char ), strlen( c ), f )
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MIN(a,b) (((a)<(b))?(a):(b))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifndef MAX
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAX(a,b) (((a)>(b))?(a):(b))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsInit.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char **argv);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern XpContextPtr PsGetContextFromWindow(WindowPtr win);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsPrint.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsStartJob(XpContextPtr pCon, Bool sendClientData, ClientPtr client);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsEndJob(XpContextPtr pCon, Bool cancel);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsStartPage(XpContextPtr pCon, WindowPtr pWin);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsEndPage(XpContextPtr pCon, WindowPtr pWin);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsStartDoc(XpContextPtr pCon, XPDocumentType type);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsEndDoc(XpContextPtr pCon, Bool cancel);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsDocumentData(XpContextPtr pCon, DrawablePtr pDraw, char *pData,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int len_data, char *pFmt, int len_fmt, char *pOpt, int len_opt,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ClientPtr client);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsGetDocumentData(XpContextPtr pCon, ClientPtr client,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int maxBufferSize);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsGC.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsCreateGC(GCPtr pGC);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable );
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsUpdateDrawableGC(GCPtr pGC, DrawablePtr pDrawable,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PsOutPtr *psOut, ColormapPtr *cMap);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsChangeGC(GCPtr pGC, unsigned long changes);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsDestroyGC(GCPtr pGC);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsChangeClip(GCPtr pGC, int type, pointer pValue, int nrects);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsDestroyClip(GCPtr pGC);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern GCPtr PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsMisc.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsQueryBestSize(int type, short *pwidth, short *pheight,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsCloseScreen(int index, ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsLineAttrs(PsOutPtr psOut, GCPtr pGC, ColormapPtr cMap);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsGetMediumDimensions(
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XpContextPtr pCon,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CARD16 *pWidth,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CARD16 *pHeight);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsGetReproducibleArea(
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XpContextPtr pCon,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xRectangle *pRect);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsSetImageResolution(
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XpContextPtr pCon,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int imageRes,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Bool *status);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsSpans.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DDXPointPtr pPoints, int *pWidths, int fSorted);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DDXPointPtr pPoints, int *pWidths, int nSpans,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int fSorted);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsArea.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int x, int y, int w, int h, int leftPad, int format,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int imageRes, char *pImage);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int x, int y, int w, int h, int leftPad, int format,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *pImage);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int w, int h, int leftPad, int format, char *pImage);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern RegionPtr PsCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int srcx, int srcy, int width, int height,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dstx, int dsty);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern RegionPtr PsCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int srcx, int srcy, int width, int height,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dstx, int dsty, unsigned long plane);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsPixel.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int nPoints, xPoint *pPoints);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int width, int height, int x, int y);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsLine.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolyLine(DrawablePtr pDrawable, GCPtr pGC, int mode,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int nPoints, xPoint *pPoints);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xSegment *pSegments);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsPolygon.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRects,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xRectangle *pRects);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int mode, int nPoints, DDXPointPtr pPoints);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRects,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xRectangle *pRects);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsPolygon.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xArc *pArcs);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xArc *pArcs);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsText.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int count, char *string);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int count, unsigned short *string);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int count, char *string);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int count, unsigned short *string);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned int nGlyphs, CharInfoPtr *pCharInfo,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync pointer pGlyphBase);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned int nGlyphs, CharInfoPtr *pCharInfo,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync pointer pGlyphBase);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsWindow.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsCreateWindow(WindowPtr pWin);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsMapWindow(WindowPtr pWin);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsPositionWindow(WindowPtr pWin, int x, int y);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsUnmapWindow(WindowPtr pWin);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync RegionPtr prgnSrc);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsDestroyWindow(WindowPtr pWin);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsFonts.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsRealizeFont(ScreenPtr pscr, FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsUnrealizeFont(ScreenPtr pscr, FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *PsGetFontName(FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsGetFontSize(FontPtr pFont, float *mtx);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *PsGetPSFontName(FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *PsGetPSFaceOrFontName(FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsIsISOLatin1Encoding(FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *PsGetEncodingName(FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern PsFontInfoRec *PsGetFontInfoRec(DrawablePtr pDrawable, FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsFreeFontInfoRecords(PsContextPrivPtr priv);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern PsFTDownloadFontType PsGetFTDownloadFontType(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsFTFonts.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *PsGetFTFontFileName(FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsIsFreeTypeFont(FontPtr pFont);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsAttr.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *PsGetAttributes(XpContextPtr pCon, XPAttributes pool);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *PsGetOneAttribute(XpContextPtr pCon, XPAttributes pool,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *attr);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsAugmentAttributes(XpContextPtr pCon, XPAttributes pool,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync char *attrs);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsSetAttributes(XpContextPtr pCon, XPAttributes pool, char *attrs);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsColor.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsCreateColormap(ColormapPtr pColor);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsDestroyColormap(ColormapPtr pColor);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsInstallColormap(ColormapPtr pColor);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsUninstallColormap(ColormapPtr pColor);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsListInstalledColormaps(ScreenPtr pScreen, XID *pCmapList);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsStoreColors(ColormapPtr pColor, int ndef, xColorItem *pdefs);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsResolveColor(unsigned short *pRed, unsigned short *pGreen,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned short *pBlue, VisualPtr pVisual);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern PsOutColor PsGetPixelColor(ColormapPtr cMap, int pixval);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ColormapPtr cMap);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsPixmap.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int depth);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsScrubPixmap(PixmapPtr pPixmap);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool PsDestroyPixmap(PixmapPtr pPixmap);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int PsCloneDisplayElm(PixmapPtr dst,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DisplayElmPtr elm, DisplayElmPtr newElm,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int xoff, int yoff);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsCopyDisplayList(PixmapPtr src, PixmapPtr dst, int xoff,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int yoff, int x, int y, int w, int h);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern PsElmPtr PsCreateFillElementList(PixmapPtr pix, int *nElms);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern PsElmPtr PsCloneFillElementList(int nElms, PsElmPtr elms);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void PsDestroyFillElementList(int nElms, PsElmPtr elms);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Functions in PsImageUtil.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern unsigned long
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncPsGetImagePixel(char *pImage, int depth, int w, int h, int leftPad, int format,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int px, int py);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif /* _PS_H_ */