home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xibm.zip / ibm8514 / brcProcs.h < prev    next >
C/C++ Source or Header  |  1991-09-30  |  12KB  |  663 lines

  1. /*
  2.  * $Id: brcProcs.h,v 1.3 1991/10/01 02:32:04 mtranle Exp $
  3.  *
  4.  * Copyright IBM Corporation 1987,1990
  5.  *
  6.  * All Rights Reserved
  7.  *
  8.  * Permission to use, copy, modify, and distribute this software and its
  9.  * documentation for any purpose and without fee is hereby granted,
  10.  * provided that the above copyright notice appear in all copies and that 
  11.  * both that copyright notice and this permission notice appear in
  12.  * supporting documentation, and that the name of IBM not be
  13.  * used in advertising or publicity pertaining to distribution of the
  14.  * software without specific, written prior permission.
  15.  *
  16.  * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  17.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
  18.  * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  19.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  21.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  22.  * SOFTWARE.
  23.  *
  24. */
  25. /*
  26.  * PRPQ 5799-PFF (C) COPYRIGHT IBM CORPORATION 1987,1990
  27.  * LICENSED MATERIALS - PROPERTY OF IBM
  28.  * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
  29.  */
  30. /*
  31.  *  Hardware interface routines for IBM 8514/A adapter for
  32.  *  X.11 server(s) on IBM equipment.
  33.  *
  34.  */
  35.  
  36. #ifndef _NO_PROTO
  37. /* brcCurs.o */
  38.  
  39. extern int ibm8514CheckCursor(
  40.     const int x,
  41.     const int y,
  42.     const int lx,
  43.     const int ly ) ;
  44.  
  45. extern void ibm8514ReplaceCursor(
  46.     void ) ;
  47.  
  48. extern int ibm8514cursorSemaphore ;
  49.  
  50. #if !defined(CURSOR_ONLY)
  51. extern void ibm8514RemoveCursor(
  52.     void ) ;
  53.  
  54. extern void ibm8514CursorInit(
  55.     int index ) ;
  56.  
  57. extern Bool ibm8514RealizeCursor(
  58.     ScreenPtr pScr,
  59.     CursorPtr pCurs ) ;
  60.  
  61. extern Bool ibm8514UnrealizeCursor(
  62.     ScreenPtr pScr,
  63.     CursorPtr pCurs ) ;
  64.  
  65. extern void ibm8514ColorCursor(
  66.     unsigned long int fg,
  67.     unsigned long int bg ) ;
  68.  
  69. extern void ibm8514RecolorCursor(
  70.     ColormapPtr cmap ) ;
  71.  
  72. extern int ibm8514DisplayCursor(
  73.     ScreenPtr pScr,
  74.     CursorPtr pCurs ) ;
  75.  
  76. extern void ibm8514ShowCursor(
  77.     int x,
  78.     int y ) ;
  79.  
  80. /* brcBlit.o */
  81.  
  82. extern void ibm8514Bitblt(
  83.     int merge,
  84.     int rpm,
  85.     int wpm,
  86.     int x0,
  87.     int y0,
  88.     int x1,
  89.     int y1,
  90.     int lx,
  91.     int ly ) ;
  92.  
  93. extern void ibm8514BlitFG(
  94.     int rpm,
  95.     int wpm,
  96.     int fg,
  97.     int merge,
  98.     int x0,
  99.     int y0,
  100.     int x1,
  101.     int y1,
  102.     int lx,
  103.     int ly ) ;
  104.  
  105. extern void ibm8514BlitFGBG(
  106.     int rpm,
  107.     int wpm,
  108.     int fg,
  109.     int bg,
  110.     int merge,
  111.     int x0,
  112.     int y0,
  113.     int x1,
  114.     int y1,
  115.     int lx,
  116.     int ly ) ;
  117.  
  118. /* brcCmap.o */
  119.  
  120. extern void ibm8514SetColor(
  121.     unsigned long int number,
  122.     unsigned int r,
  123.     unsigned int g,
  124.     unsigned int b,
  125.     VisualPtr pVisual ) ;
  126.  
  127. /* brcFillRct.o */
  128.  
  129. extern void ibm8514PolyFillRect(
  130.      DrawablePtr pDrawable,
  131.     GCPtr       pGC,
  132.     int         nrectFill,
  133.     xRectangle *prectInit ) ;
  134.  
  135. extern void ibm8514FillRectStippled(
  136.     WindowPtr pWin,
  137.     GCPtr     pGC,
  138.     int       nBox,
  139.     BoxPtr    pBox ) ;
  140.  
  141. extern void ibm8514FillRectOpStippled(
  142.     WindowPtr pWin,
  143.     GCPtr     pGC,
  144.     int       nBox,
  145.     BoxPtr    pBox ) ;
  146.  
  147. extern void ibm8514AreaFill(
  148.     WindowPtr pWin,
  149.     GCPtr     pGC,
  150.     int       nBox,
  151.     BoxPtr    pBox ) ;
  152.  
  153. /* brcFillSp.o */
  154.  
  155. extern void ibm8514SolidFS(
  156.     DrawablePtr pDrawable,
  157.     GCPtr pGC,
  158.     int nInit,
  159.     DDXPointPtr pptInit,
  160.     int *pwidthInit,
  161.     int fSorted ) ;
  162.  
  163. extern void ibm8514TileFS(
  164.     DrawablePtr pDrawable,
  165.     GC *pGC,
  166.     int nInit,
  167.     DDXPointPtr pptInit,
  168.     int *pwidthInit,
  169.     int fSorted ) ;
  170.  
  171. extern void ibm8514StippleFS(
  172.     DrawablePtr pDrawable,
  173.     GC *pGC,
  174.     int nInit,
  175.     DDXPointPtr pptInit,
  176.     int *pwidthInit,
  177.     int fSorted ) ;
  178.  
  179. extern void ibm8514OPStippleFS(
  180.     DrawablePtr pDrawable,
  181.     GC *pGC,
  182.     int nInit,
  183.     DDXPointPtr pptInit,
  184.     int *pwidthInit,
  185.     int fSorted ) ;
  186.  
  187. /* brcGC.o */
  188. extern Mask ibm8514ChangeGCtype(
  189.     GC *pGC,
  190.     ppcPrivGCPtr devPriv ) ;
  191.  
  192. extern Mask ibm8514ChangeWindowGC(
  193.     GC *pGC,
  194.     Mask changes ) ;
  195.  
  196. /* brcDash.o */
  197. extern void ibm8514DestroyGCPriv(
  198.     GC *pcGC ) ;
  199.  
  200. /* brcGetSp.o */
  201.  
  202. extern void ibm8514GetSpans(
  203.     DrawablePtr pDrawable,
  204.     int wMax,
  205.     DDXPointPtr ppt,
  206.     int *pwidth,
  207.     int nspans,
  208.     unsigned int *pdstStart ) ;
  209.  
  210. /* brcImg.o */
  211.  
  212. extern void ibm8514DrawColorImage(
  213.     int x,
  214.     int y,
  215.     int w,
  216.     int h,
  217.     unsigned char *data,
  218.     int RowIncrement,
  219.     int merge,
  220.     unsigned long int planes ) ;
  221.  
  222. extern void ibm8514ReadColorImage(
  223.     int x,
  224.     int y,
  225.     int lx,
  226.     int ly,
  227.     unsigned char *data,
  228.     int RowIncrement ) ;
  229.  
  230. /* brcMono.o */
  231.  
  232. extern void ibm8514AlignMonoImage(
  233.     unsigned long int planes,
  234.     int merge,
  235.     int x,
  236.     int y,
  237.     int lx,
  238.     int ly,
  239.     unsigned char *data ) ;
  240.  
  241. extern void ibm8514StageMono(
  242.     int lx,
  243.     int ly,
  244.     unsigned char *data ) ;
  245.  
  246. extern void ibm8514FillMonoImage(
  247.     unsigned long int planes,
  248.     unsigned long int fg,
  249.     unsigned long int bg,
  250.     int merge,
  251.     int x,
  252.     int y,
  253.     int lx,
  254.     int ly,
  255.     unsigned char *data ) ;
  256.  
  257. extern void ibm8514DrawMonoByteImage(
  258.     unsigned char *data,
  259.     int x,
  260.     int y,
  261.     int lx,
  262.     int ly,
  263.     unsigned long int fg,
  264.     int merge,
  265.     unsigned long int planes ) ;
  266.  
  267. extern void ibm8514DrawMonoImage(
  268.     unsigned char *data,
  269.     int x,
  270.     int y,
  271.     int lx,
  272.     int ly,
  273.     unsigned long int fg,
  274.     int merge,
  275.     unsigned long int planes ) ;
  276.  
  277. extern void ibm8514ByteAlignMonoImage(
  278.     unsigned long int planes,
  279.     int merge,
  280.     int x,
  281.     int y,
  282.     int lx,
  283.     int ly,
  284.     unsigned char *data ) ;
  285. /* brcScrInit.o */
  286.  
  287. extern Bool ibm8514InitScreen(
  288.     int index,
  289.     ScreenPtr pScreen,
  290.     pointer pbits,
  291.     int xsize,
  292.     int ysize,
  293.     int dpix,
  294.     int dpiy ) ;
  295.  
  296. /* brcSuspScr.o */
  297.  
  298. extern void ibm8514SuspendScreenAndSave(
  299.     void ) ;
  300.  
  301. extern void ibm8514RestoreScreenAndActivate(
  302.     void ) ;
  303.  
  304. /* brcIO.c */
  305.  
  306. extern Bool ibm8514ScreenInit(
  307.     const int index,
  308.     ScreenPtr const pScreen,
  309.     int const argc,
  310.     char * const * const argv ) ;
  311.  
  312. extern Bool ibm8514ScreenClose(
  313.     const int index,
  314.     ScreenPtr const pScreen ) ;
  315.  
  316. /* brcUtils.o */
  317.  
  318. extern short int ibm8514QueryHead(
  319.     void ) ;
  320.  
  321. extern int ibm8514QueryPlanes(
  322.     void ) ;
  323.  
  324. extern void ibm8514InitializeHardwareState(
  325.     void ) ;
  326.  
  327. extern int ibm8514ScreenInitHW(
  328.     int index ) ;
  329.  
  330. #if defined(ibm032)
  331. extern unsigned short int ibm8514inw(
  332.     unsigned int addr ) ;
  333. #endif
  334.  
  335. /* brcGBlt.o */
  336.  
  337. extern void ibm8514ImageGlyphBlt(
  338.     DrawablePtr pDrawable,
  339.     GC *pGC,
  340.     int x,
  341.     int y,
  342.     unsigned int nglyph,
  343.     CharInfoPtr *ppci,
  344.     unsigned char *pglyphBase ) ;
  345.  
  346. /* brcLine.o */
  347.  
  348. extern void ibm8514HorzLine(
  349.     unsigned long int color,
  350.     int alu,
  351.     unsigned long int mask,
  352.     int x,
  353.     int y,
  354.     int w ) ;
  355.  
  356. extern void ibm8514VertLine(
  357.     unsigned long int color,
  358.     int alu,
  359.     unsigned long int mask,
  360.     int x,
  361.     int y,
  362.     int h ) ;
  363.  
  364. extern void ibm8514BresLine(
  365.     unsigned long int color,
  366.     int alu,
  367.     unsigned long int mask,
  368.     int signdx,
  369.     int signdy,
  370.     int axis,
  371.     int x,
  372.     int y,
  373.     int et,
  374.     int e1,
  375.     int e2,
  376.     int len ) ;
  377.  
  378. /* brcStip.o */
  379.  
  380. extern void ibm8514UnnaturalOpStipple(
  381.     PixmapPtr pStipple,
  382.     unsigned long int fg,
  383.     unsigned long int bg,
  384.     int merge,
  385.     unsigned long int planes,
  386.     int x,
  387.     int y,
  388.     int w,
  389.     int h,
  390.     int xSrc,
  391.     int ySrc ) ;
  392.  
  393. extern void ibm8514UnnaturalStipple(
  394.     PixmapPtr pStipple,
  395.     unsigned long int fg,
  396.     int merge,
  397.     unsigned long int planes,
  398.     int x,
  399.     int y,
  400.     int w,
  401.     int h,
  402.     int xSrc,
  403.     int ySrc ) ;
  404.  
  405. extern void ibm8514Stipple(
  406.     PixmapPtr pStipple,
  407.     unsigned long int fg,
  408.     int merge,
  409.     unsigned long int planes,
  410.     int x,
  411.     int y,
  412.     int w,
  413.     int h,
  414.     int xSrc,
  415.     int ySrc ) ;
  416.  
  417. extern void ibm8514OpStipple(
  418.     PixmapPtr pStipple,
  419.     unsigned long int fg,
  420.     unsigned long int bg,
  421.     int merge,
  422.     unsigned long int planes,
  423.     int x,
  424.     int y,
  425.     int w,
  426.     int h,
  427.     int xSrc,
  428.     int ySrc ) ;
  429.  
  430. /* brcFont.o */
  431.  
  432. extern void ibm8514InitFontCache(
  433.     void ) ;
  434.  
  435. extern Bool ibm8514RealizeFont(
  436.     ScreenPtr pscr,
  437.     FontPtr pFont ) ;
  438.  
  439. extern Bool ibm8514UnrealizeFont(
  440.     ScreenPtr pscr,
  441.     FontPtr pFont ) ;
  442.  
  443. /* brcText.o */
  444.  
  445. extern int ibm8514PolyText8(
  446.     DrawablePtr pDraw,
  447.     GCPtr pGC,
  448.     int x,
  449.     int y,
  450.     int count,
  451.     char *chars ) ;
  452.  
  453. extern int ibm8514PolyText16(
  454.     DrawablePtr pDraw,
  455.     GCPtr pGC,
  456.     int x,
  457.     int y,
  458.     int count,
  459.     unsigned short int *chars ) ;
  460.  
  461. extern void ibm8514ImageText8(
  462.     DrawablePtr pDraw,
  463.     GCPtr pGC,
  464.     int x,
  465.     int y,
  466.     int count,
  467.     char *chars ) ;
  468.  
  469. extern void ibm8514ImageText16(
  470.     DrawablePtr pDraw,
  471.     GCPtr pGC,
  472.     int x,
  473.     int y,
  474.     int count,
  475.     unsigned short int *chars ) ;
  476.  
  477. /* brcPoly.c */
  478.  
  479. extern int ibm8514SolidFillPoly(
  480.     DrawablePtr pDraw,
  481.     GCPtr pGC,
  482.     int count,
  483.     DDXPointPtr pts ) ;
  484.  
  485. /* brcPolyPnt.c */
  486. extern void ibm8514PolyPoint(
  487.     DrawablePtr    pDrawable,
  488.          GCPtr        pGC,
  489.          int        mode,
  490.          int        npt,
  491.          xPoint        *pptInit) ;
  492.  
  493. /* brcPgon.o */
  494.  
  495. extern void ibm8514FillPolygon(
  496.     DrawablePtr dst,
  497.     GCPtr pgc,
  498.     int shape,
  499.     int mode,
  500.     int count,
  501.     DDXPointPtr pPts ) ;
  502.  
  503. /* brcOutL.o */
  504.  
  505. extern void ibm8514Outline(
  506.     unsigned long int planes,
  507.     int x0,
  508.     int y0,
  509.     int x1,
  510.     int y1 ) ;
  511.  
  512. /* brcRect.o */
  513.  
  514. extern void ibm8514DrawRectangle(
  515.     unsigned long int color,
  516.     int merge,
  517.     unsigned long int planes,
  518.     int x0,
  519.     int y0,
  520.     int lx,
  521.     int ly ) ;
  522.  
  523. /* brcTile.o */
  524.  
  525. extern void ibm8514TileRect(
  526.     PixmapPtr pTile,
  527.     int merge,
  528.     unsigned long int planes,
  529.     int x,
  530.     int y,
  531.     int w,
  532.     int h,
  533.     int xSrc,
  534.     int ySrc ) ;
  535.  
  536. extern int ibm8514RotateTile(
  537.     int w,
  538.     int h,
  539.     int dx,
  540.     int dy ) ;
  541.  
  542. /* brcPushPxl.o */
  543.  
  544. extern void ibm8514PushPixels(
  545.     GCPtr pGC,
  546.     PixmapPtr pBitMap,
  547.     DrawablePtr pDrawable,
  548.     int dx,
  549.     int dy,
  550.     int xOrg,
  551.     int yOrg ) ;
  552.  
  553. /* brcOSD.o */
  554.  
  555. extern void ibm8514osdInit(
  556.     int index ) ;
  557.  
  558. extern int ibm8514Probe(
  559.     void ) ;
  560.  
  561. #endif /* CURSOR_ONLY */
  562. #else
  563. /* brcCurs.o */
  564. extern int ibm8514CheckCursor() ;
  565. extern void ibm8514ReplaceCursor() ;
  566. extern int ibm8514cursorSemaphore ;
  567. #if !defined(CURSOR_ONLY)
  568. extern void ibm8514RemoveCursor() ;
  569. extern void ibm8514CursorInit() ;
  570. extern Bool ibm8514RealizeCursor() ;
  571. extern Bool ibm8514UnrealizeCursor() ;
  572. extern void ibm8514ColorCursor() ;
  573. extern void ibm8514RecolorCursor() ;
  574. extern int ibm8514DisplayCursor() ;
  575. extern void ibm8514ShowCursor() ;
  576. /* brcBlit.o */
  577. extern void ibm8514Bitblt() ;
  578. extern void ibm8514BlitFG() ;
  579. extern void ibm8514BlitFGBG() ;
  580. /* brcCmap.o */
  581. extern void ibm8514SetColor() ;
  582. /* brcFillRct.o */
  583. extern void ibm8514PolyFillRect();
  584. extern void ibm8514FillRectStippled();
  585. extern void ibm8514FillRectOpStippled();
  586. extern void ibm8514AreaFill();
  587. /* brcFillSp.o */
  588. extern void ibm8514SolidFS() ;
  589. extern void ibm8514TileFS() ;
  590. extern void ibm8514StippleFS() ;
  591. extern void ibm8514OPStippleFS() ;
  592. /* brcGC.o */
  593. extern Mask ibm8514ChangeGCtype() ;
  594. extern Mask ibm8514ChangeWindowGC() ;
  595. /* brcGetSp.o */
  596. extern void ibm8514GetSpans() ;
  597. /* brcImg.o */
  598. extern void ibm8514DrawColorImage() ;
  599. extern void ibm8514ReadColorImage() ;
  600. /* brcMono.o */
  601. extern void ibm8514AlignMonoImage() ;
  602. extern void ibm8514StageMono() ;
  603. extern void ibm8514FillMonoImage() ;
  604. extern void ibm8514DrawMonoByteImage() ;
  605. extern void ibm8514DrawMonoImage() ;
  606. extern void ibm8514ByteAlignMonoImage() ;
  607. /* brcScrInit.o */
  608. extern Bool ibm8514InitScreen() ;
  609. /* brcSuspScr.o */
  610. extern void ibm8514SuspendScreenAndSave() ;
  611. extern void ibm8514RestoreScreenAndActivate() ;
  612. /* brcIO.c */
  613. extern Bool ibm8514ScreenInit() ;
  614. extern Bool ibm8514ScreenClose() ;
  615. /* brcUtils.o */
  616. extern short int ibm8514QueryHead() ;
  617. extern int ibm8514QueryPlanes() ;
  618. extern void ibm8514InitializeHardwareState() ;
  619. extern int ibm8514ScreenInitHW() ;
  620. #if defined(ibm032)
  621. extern unsigned short int ibm8514inw() ;
  622. #endif
  623. /* brcGBlt.o */
  624. extern void ibm8514ImageGlyphBlt() ;
  625. /* brcLine.o */
  626. extern void ibm8514HorzLine() ;
  627. extern void ibm8514VertLine() ;
  628. extern void ibm8514BresLine() ;
  629. /* brcStip.o */
  630. extern void ibm8514UnnaturalOpStipple() ;
  631. extern void ibm8514UnnaturalStipple() ;
  632. extern void ibm8514Stipple() ;
  633. extern void ibm8514OpStipple() ;
  634. /* brcFont.o */
  635. extern void ibm8514InitFontCache() ;
  636. extern Bool ibm8514RealizeFont() ;
  637. extern Bool ibm8514UnrealizeFont() ;
  638. /* brcText.o */
  639. extern int ibm8514PolyText8() ;
  640. extern int ibm8514PolyText16() ;
  641. extern void ibm8514ImageText8() ;
  642. extern void ibm8514ImageText16() ;
  643. /* brcPoly.c */
  644. extern int ibm8514SolidFillPoly() ;
  645. /* brcPolyPoint.c */
  646. extern void ibm8514PolyPoint() ;
  647. /* brcPgon.o */
  648. extern void ibm8514FillPolygon() ;
  649. /* brcOutL.o */
  650. extern void ibm8514Outline() ;
  651. /* brcRect.o */
  652. extern void ibm8514DrawRectangle() ;
  653. /* brcTile.o */
  654. extern void ibm8514TileRect() ;
  655. extern int ibm8514RotateTile() ;
  656. /* brcPushPxl.o */
  657. extern void ibm8514PushPixels() ;
  658. /* brcOSD.o */
  659. extern void ibm8514osdInit() ;
  660. extern int ibm8514Probe() ;
  661. #endif /* CURSOR_ONLY */
  662. #endif
  663.