예제 #1
0
파일: PsPrint.c 프로젝트: aosm/X11
/* StartPage 
 */
int
PsStartPage(
  XpContextPtr pCon,
  WindowPtr    pWin)
{
  int                iorient, iplex, icount, ires;
  unsigned short     iwd, iht;
  PsContextPrivPtr   pConPriv =
     (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
  PsWindowPrivPtr    pWinPriv =
     (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr;

/*
 * Put a pointer to the context in the window private structure
 */
  pWinPriv->validContext = 1;
  pWinPriv->context      = pCon;

  /* get page level attributes */
  S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht);
  /*
   *  Start the page
   */
  if (pConPriv->pPsOut == NULL) {
      pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile,
				   iorient, icount, iplex, ires,
				   (int)iwd, (int)iht, False);
  }
  PsOut_BeginPage(pConPriv->pPsOut, iorient, icount, iplex, ires,
		  (int)iwd, (int)iht);

  return Success;
}
예제 #2
0
파일: PsPrint.c 프로젝트: aosm/X11
int
PsStartDoc(XpContextPtr pCon, XPDocumentType type)
{
  int                iorient, iplex, icount, ires;
  unsigned short     iwd, iht;
  PsContextPrivPtr   pConPriv = 
      (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;

  /* get document level attributes */
  S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht);

  pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile,
                                   iorient, icount, iplex, ires,
                                   (int)iwd, (int)iht, (type == XPDocRaw));

  return Success;
}
예제 #3
0
/* StartPage 
 */
int
PsStartPage(
  XpContextPtr pCon,
  WindowPtr    pWin)
{
  int                iorient, iplex, icount, ires;
  unsigned short     iwd, iht;
  register WindowPtr pChild;
  PsContextPrivPtr   pConPriv =
     (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
  PsWindowPrivPtr    pWinPriv =
     (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr;
  char               s[80];
  xEvent event;

/*
 * Put a pointer to the context in the window private structure
 */
  pWinPriv->validContext = 1;
  pWinPriv->context      = pCon;

  /* get page level attributes */
  S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht);
  /*
   *  Start the page
   */
  if (pConPriv->pPsOut == NULL) {
    char *title;
    
    /* get job level attributes */ 
    title = XpGetOneAttribute(pCon, XPJobAttr, "job-name");

    pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile,
                                       title, iorient, icount, iplex, ires,
                                       (int)iwd, (int)iht, False);
    pConPriv->fontInfoRecords     = NULL;
    pConPriv->fontTypeInfoRecords = NULL;
  }
  PsOut_BeginPage(pConPriv->pPsOut, iorient, icount, iplex, ires,
		  (int)iwd, (int)iht);

  return Success;
}
예제 #4
0
int
PsStartDoc(XpContextPtr pCon, XPDocumentType type)
{
  int                iorient, iplex, icount, ires;
  unsigned short     iwd, iht;
  char              *title;
  PsContextPrivPtr   pConPriv = 
      (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;

  /* get job level attributes */ 
  title = XpGetOneAttribute(pCon, XPJobAttr, "job-name");
 
  /* get document level attributes */
  S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht);

  pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile,
                                     title, iorient, icount, iplex, ires,
                                     (int)iwd, (int)iht, (Bool)(type == XPDocRaw));

  pConPriv->fontInfoRecords     = NULL;
  pConPriv->fontTypeInfoRecords = NULL;

  return Success;
}