/*DDK*************************************************************************/
/*                                                                           */
/* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
/* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
/*                                                                           */
/*    The following IBM OS/2 WARP source code is provided to you solely for  */
/*    the purpose of assisting you in your development of OS/2 WARP device   */
/*    drivers. You may use this code in accordance with the IBM License      */
/*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
/*    Copyright statement may not be removed.                                */
/*                                                                           */
/*****************************************************************************/
/**************************************************************************
 *
 * SOURCE FILE NAME = PRDGEXTF
 *
 * DESCRIPTIVE NAME =
 *
 *
 * VERSION = V2.0
 *
 * DATE
 *
 * DESCRIPTION : Printer Device Driver external files for Global routines
 *
 *
 * FUNCTIONS
 *
 *
 * NOTES       : Reference - Device Driver Interface Specification
 *
 *
 * STRUCTURES
 *
 * EXTERNAL REFERENCES
 *
 * EXTERNAL FUNCTIONS
 *
*/


/*
**  Entry points called from the engine.
*/


ULONG prdg_AccumulateBounds (HDC, PRECTL, PDDC, ULONG);
ULONG prdg_ResetBounds(HDC, ULONG, PDDC, ULONG);
ULONG prdg_GetBoundsData(HDC, ULONG, PRECTL, PDDC, ULONG);

/*            */
BitmapListEntry * prdg_GetSelectedBitmapListEntry(PDDC);




extern BOOL  InitGlobalHeap();
extern PDV   CreateDCHeap( );
extern VOID  KillGlobalHeap();
extern VOID  KillHeap( PVOID );
extern PVOID _Optlink PSAllocMem( LONG, PDV );
extern ULONG _Optlink PSFreeMem( PVOID, PDV  );

BOOL  LoadStringTable(PVOID);
extern PBYTE GetR3String(SHORT);

SHORT prdg_Convert      ( PPOINTL,
                           PPOINTL,
                           SHORT,
                           SHORT,
                           SHORT,
                           HDC,
                           SHORT);

extern BOOL WorldToDev(HDC, PPOINTL, PPOINTL);
extern BOOL DevToWorld(HDC, PPOINTL, PPOINTL);

void prdg_AddBounds (PRECTL, PDDC);
void prdg_RequestSemaphore ( Semaphore);
void prdg_ClearSemaphore   ( Semaphore );
void prdg_WaitSemaphore    ( Semaphore );


/*
**  this should be declared once, in some global header               
*/
typedef ULONG  (*PFNL)();


extern PFNL pfnlNotifyTransformChange;
extern PFNL pfnlNotifyClipChange;

/*
**  return codes for DevPostDeviceModes
*/
#define DPDM_ERROR                    (-1L)
#define DPDM_NONE                       0L

/*
**  codes for DevPostDeviceModes
*/
#define DPDM_POSTJOBPROP                0L
#define DPDM_CHANGEPROP                 1L
#define DPDM_QUERYJOBPROP               2L

#define DPDM_USERPROPERTIES 3

#define DEFAULT_SCALE       100
#define DEFAULT_ORIENT      PORTRAIT
#define DEFAULT_MANUAL      FALSE
#define DEFAULT_COLOR       FALSE
#define DEFAULT_TIMEOUTS    0
#define DEFAULT_TOPBOTTOM   FALSE
#define DEFAULT_LEFTRIGHT   FALSE
#define DEFAULT_INVERT      FALSE
#define DEFAULT_COPIES      1
#define INVALID_ADDRESS     (-1L)
