home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR503.W96 / LLIBG.AP_ / LLIBG.AP
Text File  |  1995-06-26  |  25KB  |  716 lines

  1. #ifndef LLIBGAPI_HEADER
  2. #define LLIBGAPI_HEADER
  3.  
  4. /*******************************************************************************
  5. * INCLUDES FILES                                                               *
  6. *******************************************************************************/
  7.  
  8. #include <extend.h>
  9. #include <vm.api>
  10. #include <error.api>
  11. #include <item.api>
  12. #include <fm.api>
  13. #include <gt.api>
  14.  
  15.  
  16. /*******************************************************************************
  17. * TYPEDEFS AND DEFINES                                                         *
  18. *******************************************************************************/
  19.  
  20. #define LLG_VIDEO_TXT                     3
  21. // TEXT MODES
  22. #define LLG_VIDEO_VESA_80_60            264
  23. #define LLG_VIDEO_VESA_132_25           265
  24. #define LLG_VIDEO_VESA_132_43           266
  25. #define LLG_VIDEO_VESA_132_50           267
  26. #define LLG_VIDEO_VESA_132_60           268
  27.  
  28. // GRAPHICS MODES
  29. #define LLG_VIDEO_VGA_640_480_16         18
  30. #define LLG_VIDEO_VESA_800_592_16       258
  31. #define LLG_VIDEO_VESA_1024_768_16      260
  32. #define LLG_VIDEO_VESA_1280_1024_16     262
  33.  
  34. #define LLG_VIDEO_VESA_640_480_256      257
  35. #define LLG_VIDEO_VESA_800_592_256      259
  36. #define LLG_VIDEO_VESA_1024_768_256     261
  37. #define LLG_VIDEO_VESA_1280_1024_256    263
  38.  
  39. #define LLG_VIDEO_VESA_640_480_32K      272
  40. #define LLG_VIDEO_VESA_800_592_32K      275
  41. #define LLG_VIDEO_VESA_1024_768_32K     278
  42. #define LLG_VIDEO_VESA_1280_1024_32K    281
  43.  
  44. #define LLG_VIDEO_VESA_640_480_64K      273
  45. #define LLG_VIDEO_VESA_800_592_64K      276
  46. #define LLG_VIDEO_VESA_1024_768_64K     279
  47. #define LLG_VIDEO_VESA_1280_1024_64K    282
  48.  
  49. #define LLG_VIDEO_VESA_640_480_16M      274
  50. #define LLG_VIDEO_VESA_800_592_16M      277
  51. #define LLG_VIDEO_VESA_1024_768_16M     280
  52. #define LLG_VIDEO_VESA_1280_1024_16M    283
  53.  
  54. #define LLM_CURSOR_ARROW                1
  55. #define LLM_CURSOR_SIZE_NS              2
  56. #define LLM_CURSOR_SIZE_WE              3
  57. #define LLM_CURSOR_SIZE_NW_SE           4
  58. #define LLM_CURSOR_SIZE_NE_SW           5
  59. #define LLM_CURSOR_HAND                 6
  60. #define LLM_CURSOR_FINGER               7
  61. #define LLM_CURSOR_CROSS                8
  62. #define LLM_CURSOR_WAIT                 9
  63.  
  64. #define LLG_FONT_ITALIC                 0x01
  65. #define LLG_FONT_BOLD                   0x02
  66. #define LLG_FONT_UNDERLINE              0x04
  67.  
  68. #define LLG_MODE_SET                    0
  69. #define LLG_MODE_AND                    1
  70. #define LLG_MODE_OR                     2
  71. #define LLG_MODE_XOR                    3
  72. #define LLG_MODE_NO_DISPLAY             4 // Used by _gWriteAt
  73.  
  74. #define LLG_RGB_FLAGS_INDEX             0x00000000L    // for Indexed Palette
  75. #define LLG_RGB_FLAGS_COLOR             0x80000000L
  76.  
  77. #define gRGB(r,g,b)          ((DWORD)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16))) | LLG_RGB_FLAGS_COLOR
  78.  
  79. #define gGetIDXValue(i)      ((BYTE)(i))
  80. #define gGetRValue(rgb)      ((BYTE)(rgb))
  81. #define gGetGValue(rgb)      ((BYTE)(((WORD)(rgb)) >> 8))
  82. #define gGetBValue(rgb)      ((BYTE)((rgb)>>16))
  83.  
  84. #define LLG_DWORD_VOID_PARAM            0xFFFFFFFFL
  85.  
  86. /*******************************************************************************
  87. * STRUCTURES                                                                   *
  88. *******************************************************************************/
  89.  
  90. typedef struct
  91. {
  92.     int iX;                                 // X coordinate
  93.     int iY;                                 // Y coordinate
  94. } LLG_POINT;
  95.  
  96. typedef LLG_POINT far  * LLG_LPPOINT;
  97.  
  98.  
  99. typedef struct
  100. {
  101.     int     iLeft;                          // Left   coordinate
  102.     int     iTop;                           // Top    coordinate
  103.     int     iRight;                         // Right  coordinate
  104.     int     iBottom;                        // Bootom coordinate
  105. } LLG_RECT;
  106.  
  107. typedef LLG_RECT far  * LLG_LPRECT;
  108.  
  109.  
  110. typedef union
  111. {
  112.     struct
  113.     {
  114.         BYTE    bRed;                       // Red   component (0-255) or Indexed Color
  115.         BYTE    bGreen;                     // Green component (0-255)
  116.         BYTE    bBlue;                      // Blue  component (0-255)
  117.         BYTE    bFlags;                     // to make difference between Indexed & RGB Colors
  118.     }       b;
  119.     DWORD   dwColor;
  120. } LLG_RGB;
  121.  
  122. typedef LLG_RGB far  * LLG_LPRGB;
  123.  
  124. typedef struct
  125. {
  126.     WORD    wVersion;
  127.     WORD    wNumEntries;
  128.     LLG_RGB dwPalEntry[1];
  129. } LLG_PALETTE;
  130.  
  131. typedef LLG_PALETTE far  * LLG_LPPALETTE;
  132.  
  133. typedef struct
  134. {
  135.     int     iTextRow;                       // See gMode()
  136.     int     iTextCol;
  137.     int     iGraphRow;
  138.     int     iGraphCol;
  139.     int     iFontRow;
  140.     int     iFontCol;
  141.     DWORD   dwColorNb;
  142.     int     iVideoMode;
  143.     int     iLibVer;
  144.     int     iLastMode;
  145.     DWORD   dwLastColor;
  146. } LLG_VIDEOMODE;
  147.  
  148. typedef LLG_VIDEOMODE far  * LLG_LPVIDEOMODE;
  149.  
  150.  
  151. typedef struct
  152. {
  153.     int     iPixTop;                        // 1 to Font Height,
  154.                                             // the Start Line # of Font Matrix
  155.     int     iPixBot;                        // 1 to Font Height,
  156.                                             // the End Line # of Font Matrix
  157. } LLG_FNTCLIP;
  158.  
  159. typedef LLG_FNTCLIP far  * LLG_LPFNTCLIP;
  160.  
  161.  
  162. typedef struct
  163. {
  164.     int     iX;                             // see _mState()
  165.     int     iY;
  166.     int     iRow;
  167.     int     iCol;
  168.     int     iLeft;
  169.     int     iRight;
  170.     int     iVisible;
  171.     int     iDriverVersion;
  172.     int     iCursorShape;
  173.     int     iClicksLeft;
  174.     int     iClicksRight;
  175. } LLG_MOUSESTATE;
  176.  
  177. typedef LLG_MOUSESTATE far * LLG_LPMOUSESTATE;
  178.  
  179. /*******************************************************************************
  180. * FUNCTIONS PROTOTYPES                                                         *
  181. *******************************************************************************/
  182.  
  183. /////////////////// VIDEO MODES ////////////////////////////////////////////////
  184.  
  185. ERRCODE
  186.     _gModeSet
  187.     (
  188.         int             iMode
  189.     );
  190.  
  191. //\\CES lpVideoModeGet must point to an LLG_LPVIDEOMODE struct allocated
  192. //      by the user sample in c:
  193. //      LLG_VIDEOMODE   VideoMode;
  194. //      _gModeGet( iMode, &VideoMode );
  195.  
  196. ERRCODE
  197.     _gModeGet
  198.     (
  199.         int             iMode,
  200.         LLG_LPVIDEOMODE lpVideoModeGet
  201.     );
  202.  
  203. //////////////////// BITMAP AND ICON RESOURCE FILES ////////////////////////////
  204.  
  205. ITEM                                        // itemArrayBmp
  206.     _gBmpLoad
  207.     (
  208.         char far *      lpFileName          // FILENAME.BMP or FILENAME.ICO
  209.     );
  210.  
  211. void
  212.     _gBmpDisp
  213.     (
  214.         ITEM            itemArrayBmp,       // an item returned by _gBmpLoad
  215.         int             iX1,                //
  216.         int             iY1,                //
  217.         DWORD           dwTransColor        // Transparent Color #
  218.                                             // LLG_NO_COLOR for none
  219.     );
  220.  
  221. /////////////////// FONT RESOURCE FILES ////////////////////////////////////////
  222.  
  223. int                                         // Return a FontID
  224.     _gFntLoad
  225.     (
  226.         char far *      lpFileName          // FONTNAME.FND or FONTNAME.FNT
  227.     );
  228.  
  229. ERRCODE
  230.     _gFntSet
  231.     (
  232.         int             iFontID             // Font Handle
  233.     );
  234.  
  235. int                                         // Current Font Handle
  236.     _gFntGet
  237.     (
  238.         void
  239.     );
  240.  
  241. ERRCODE
  242.     _gFntClipSet
  243.     (
  244.         LLG_LPFNTCLIP   lpFntClipSet        // Clipping
  245.     );
  246.  
  247. ERRCODE
  248.     _gFntClipGet
  249.     (
  250.         LLG_LPFNTCLIP   lpFntClipGet        // Clipping
  251.     );
  252.  
  253. void
  254.     _gFntErase
  255.     (
  256.         int             iFontID             // Font Handle
  257.     );
  258.  
  259. /////////////////// GRAPHICAL PRIMITIVES ///////////////////////////////////////
  260.  
  261. DWORD                                       // Pixel Color
  262.     _gPixelGet
  263.     (
  264.         int             iX,                 // location in X
  265.         int             iY                  // location in Y
  266.     );
  267.  
  268. void
  269.     _gPixelSet
  270.     (
  271.         int             iX,                 // location in X
  272.         int             iY,                 // location in Y
  273.         DWORD           dwColor,            // pixel color
  274.         char            cMode               // drawing mode
  275.     );
  276.  
  277. void
  278.     _gLine
  279.     (
  280.         int             iX1,                // starting point in X
  281.         int             iY1,                // starting point in Y
  282.         int             iX2,                // end point in X
  283.         int             iY2,                // end point in Y
  284.         DWORD           dwColor,            // line color
  285.         char            cMode               // drawing mode
  286.     );
  287.  
  288. void
  289.     _gRect
  290.     (
  291.         int             iX1,                // upper left corner in X
  292.         int             iY1,                // upper left corner in Y
  293.         int             iX2,                // lower right corner in X
  294.         int             iY2,                // lower right corner in Y
  295.         char            cFilled,            // TRUE / FALSE
  296.         DWORD           dwColor,            // drawing color
  297.         char            cMode               // drawing mode
  298.     );
  299.  
  300.  
  301. void
  302.     _gFrame
  303.     (
  304.         int             iLeft,              // upper left corner in X
  305.         int             iTop,               // upper left corner in Y
  306.         int             iRight,             // lower right corner in X
  307.         int             iBottom,            // lower right corner in Y
  308.         DWORD           dwBackgroundColor,  // background color
  309.         DWORD           dwBrightColor,      // light reflex
  310.         DWORD           dwDarkColor,        // shadow effect
  311.         char            cThickTop,          // frame thickness top
  312.         char            cThickLeft,         // frame thickness left
  313.         char            cThickBottom,       // frame thickness bottom
  314.         char            cThickRight,        // frame thickness right
  315.         char            cMode,              // drawing mode
  316.         char            cFilled             // TRUE / FALSE
  317.     );
  318.  
  319. void
  320.     _gEllipse
  321.     (
  322.         int             iXC,                // X Center
  323.         int             iYC,                // Y Center
  324.         int             iA0,                // X Radius
  325.         int             iB0,                // Y Radius
  326.         int             iStartAngle,        // Start Angle ( degrees )
  327.         int             iEndAngle,          // End Angle   ( degrees )
  328.         char            cMode,              // LLG_MODE_...
  329.         char            cFilled,            // TRUE / FALSE
  330.         DWORD           dwFillColor,        // Fill Color
  331.         char            cOutlined,          // TRUE / FALSE
  332.         DWORD           dwOutlineColor,     // OutLine Color
  333.         int             iHeight3D           // 3D effect Height ( pixels )
  334.     );
  335.  
  336. void
  337.     _gPolygon
  338.     (
  339.         int             iVertCount,         // Vertices Count
  340.         LLG_LPPOINT     lpVertexArray,      // Array lpVertexArray[iVertCount]
  341.         char            cFilled,            // TRUE for Filled Polygon
  342.         DWORD           dwOutLineColor,     // OutLine Color
  343.         DWORD           dwFillColor,        // Fill Color
  344.         char            cMode               // LLG_MODE_...
  345.     );
  346.  
  347. int                                         // TextExtend in pixels
  348.     _gWriteAt
  349.     (
  350.         int             iX,                 // upper left corner of text in X
  351.         int             iY,                 // upper left corner of text in Y
  352.         DWORD           dwFontColor,        // font color
  353.         int             iFontID,            // Font Handle
  354.         char far *      lpString,           // Text to Display
  355.         char            cMode,              // LLG_MODE_...
  356.         char            cAttribute          // LLG_FONT_...
  357.     );
  358.  
  359.  
  360. /////////////////// PALETTES ///////////////////////////////////////////////////
  361.  
  362. ERRCODE
  363.     _gPalSet
  364.     (
  365.         LLG_LPPALETTE   lpPaletteArraySet  // Set palette if not NULL
  366.     );
  367.  
  368. ERRCODE
  369.     _gPalGet
  370.     (
  371.         LLG_LPPALETTE   lpPaletteArrayGet   // Store Current palette
  372.     );
  373.  
  374. ERRCODE
  375.     _gRGBColorSet
  376.     (
  377.         int             iPalNum,            // Palette Index
  378.         DWORD           dwColorSet          // Set color ( RGB Format ) in Palette
  379.     );
  380.  
  381. DWORD                                       // Color to get ( RGB Format )
  382.     _gRGBColorGet
  383.     (
  384.         int             iPalNum             // Palette Index
  385.     );
  386.  
  387. /////////////////// CLIPPING ///////////////////////////////////////////////////
  388.  
  389. ERRCODE
  390.     _gClipSet
  391.     (
  392.         LLG_LPRECT      lpClipRectSet       // set a clipping region
  393.     );
  394.  
  395. ERRCODE
  396.     _gClipGet
  397.     (
  398.         LLG_LPRECT      lpClipRectGet       // get active clipping region
  399.     );
  400.  
  401. /////////////////// EXCLUDING ZONES ////////////////////////////////////////////
  402.  
  403. int                                         // current number of exclusions zones
  404.     _gExclCountGet
  405.     (
  406.         void
  407.     );
  408.  
  409. void
  410.     _gExclErase
  411.     (
  412.         void
  413.     );
  414.  
  415. ERRCODE
  416.     _gExclSet
  417.     (
  418.         LLG_LPRECT      lpExclSet,
  419.         BOOL            lIsGraphic          // TRUE for Graph coord.
  420.     );
  421.  
  422.  
  423. ERRCODE
  424.     _gExclGet
  425.     (
  426.         LLG_LPRECT      lpExclGet,          // pointer to the region
  427.         int             iZoneNum            // number of exclusion zone
  428.     );
  429.  
  430.  
  431. /////////////////// SCREEN /////////////////////////////////////////////////////
  432.  
  433. ITEM
  434.     _gScreenSave                            // save screen region
  435.     (
  436.         int             iTop,               // upper left corner in X
  437.         int             iLeft,              // upper left corner in Y
  438.         int             iBottom,            // lower right corner in X
  439.         int             iRight              // lower right corner in Y
  440.     );
  441.  
  442. void
  443.     _gScreenRest                            // restore screen region
  444.     (
  445.         int             iTop,               // upper left corner in X
  446.         int             iLeft,              // upper left corner in Y
  447.         int             iBottom,            // lower right corner in X
  448.         int             iRight,             // lower right corner in Y
  449.         ITEM            itemSavedScreen     // screen to be restored
  450.     );
  451.  
  452. /////////////////// MOUSE //////////////////////////////////////////////////////
  453.  
  454. int
  455.     _mShow
  456.     (
  457.         int             iCursor,            // LLM_CURSOR_...
  458.         int             iRow,               // row where to show mouse cursor
  459.         int             iCol                // column where to show mouse cursor
  460.     );
  461.  
  462. void
  463.     _mHide                                  // hide mouse
  464.     (
  465.         void
  466.     );
  467.  
  468. ERRCODE
  469.     _mState
  470.     (
  471.         BOOL             lReset,            // if TRUE reset the clicks count
  472.  
  473.         LLG_LPMOUSESTATE lpmState           // pointer to mouse state structure
  474.     );
  475.  
  476. ERRCODE
  477.     _mClipSetTxt                            // set a clipping region
  478.     (
  479.         LLG_LPRECT       lpClipRectSet      // pointer to clipping rectangle
  480.     );
  481.  
  482. ERRCODE
  483.     _mClipSetPix                            // set a clipping region
  484.     (
  485.         LLG_LPRECT       lpClipRectSet      // pointer to clipping rectangle
  486.     );
  487.  
  488. ERRCODE
  489.     _mClipGet                               // get active clipping region
  490.     (
  491.         LLG_LPRECT       lpClipRectGet      // pointer to clipping rectangle
  492.     );
  493.  
  494. void
  495.     _mClipErase                             // reset clipping region to
  496.                                             // screen size
  497.     (
  498.         void
  499.     );
  500.  
  501. int
  502.     _mRow                                   // returns the current row in
  503.                                             // text units
  504.     (
  505.         void
  506.     );
  507.  
  508. int
  509.     _mCol                                   // returns the current column in
  510.                                             // text units
  511.     (
  512.         void
  513.     );
  514.  
  515. void
  516.     _mTxtPos                                // sets mouse to a new position
  517.     (
  518.         int iRow,                           // new position in Row
  519.         int iCol                            // new position in Col
  520.     );
  521.  
  522. int
  523.     _mPixX                                  // returns the current horizontal
  524.                                             // position in pixel
  525.     (
  526.         void
  527.     );
  528.  
  529. int
  530.     _mPixY                                  // returns the current vertical
  531.                                             // position in pixel
  532.     (
  533.         void
  534.     );
  535.  
  536. void
  537.     _mPixPos                                // sets mouse to a new position
  538.     (
  539.         int iX,                             // new position in X
  540.         int iY                              // new position in Y
  541.     );
  542.  
  543. void
  544.     _mUpdate                                // Refresh the Mouse Cursor
  545.     (
  546.         void
  547.     );
  548.  
  549. /////////////////// BLOCKS //////////////////////////////////////////////////////
  550. //
  551. // The blocks API is needed if you want to display your owns BitMaps using
  552. // the Light Lib Graphics system. A classical example is displaying incoming
  553. // faxes ...
  554. //
  555. // The Block functions are compatible with the Exclusions and Inclusion areas.
  556. //
  557. // Be carefull using this API.  We suggest you first study the sample code.
  558. // You are responsible for all the memory allocations (lpPalette, lpStrip,
  559. // lpUsedLUT... ).
  560. //
  561. // Because most of the BitMaps are greater than 64Kb, this will end with some
  562. // stripping algo. Again, look in the code sample, a full stripping algo is
  563. // available (In fact the sample is very close to the _gBmpDisp() function).
  564.  
  565.  
  566. typedef struct
  567. {
  568.     int             iWidth;                 // Image Width
  569.     int             iHeight;                // Image Height
  570.     BYTE            bBitsPerPixel;          // BitsPerPixels (1|4|8|24)
  571.     int             iBytesPerLine;          // Byte/Line (ex width=23 in 8 bits means 3 Bytes)
  572.     LLG_LPPALETTE   lpPalette;              // Pointer on a palette structure
  573.     BYTEP           lpStrip;                // Image Data
  574.     BYTEP           lpMask;                 // Used only for ICON , NULL Default
  575. }   LLG_BLOCK;
  576.  
  577. typedef LLG_BLOCK far * LLG_LPBLOCK;
  578.  
  579. DWORD
  580.     _gBlockPut
  581.     (
  582.         LLG_LPBLOCK lpBlock,                // Pointer to a block structure
  583.         BYTEP       lpUsedLUT,              // Pointer to a Look Up Table (made with _gExclLUTMake or _gSharedLUTMake)
  584.         int         iDstX1,                 // ─┐ Destination coordinates
  585.         int         iDstY1,                 // ─┘ on the screen
  586.         int         iSrcX1,                 // ─┐
  587.         int         iSrcY1,                 //  │ Rectangle of image (Block) to
  588.         int         iSrcX2,                 //  │ be displayed
  589.         int         iSrcY2                  // ─┘
  590.     );
  591.  
  592. DWORD
  593.     _gBlockGet
  594.     (
  595.         LLG_LPBLOCK lpBlock,                // Pointer to an empty LLG_LPBLOCK, except lpStrip which must point on a such a large memory area to be able to store datas  (see gBlockSize)
  596.         int         iSrcX1,                 // ─┐ Screen rectangle.
  597.         int         iSrcY1,                 //  │ Warning if the result is more than
  598.         int         iSrcX2,                 //  │ 64K you are responsible for use
  599.         int         iSrcY2                  // ─┘ multiples calls to this function and create a stripping algo
  600.     );
  601.  
  602. // Palettes are usefull only for 16 and 256 colors video mode regardless the
  603. // number of colors in your image.
  604. //
  605. // Palettes are not needed in RGB modes.
  606. //
  607. // 3 modes are available to display : Overwrite, Exclusive, Shared.
  608. //
  609. // In 16 colors mode , Overwrite    : replace the 16 original colors with
  610. //                                    your image palette.
  611. //
  612. //                   , Exclusive and Shared  :give the same effect, and try to
  613. //                                            find the nearest colors in the
  614. //                                            system palette corresponding to
  615. //                                            your image palette.
  616. //
  617. // In 256 colors mode, Overwrite : replace the 256 original colors with your
  618. //                                 image palette
  619. //                   , Exclusive : the first 16 colors are preserved, and the
  620. //                                 next 240 colors match the first 240 colors of
  621. //                                 your image, the last 16 will be mapped
  622. //                                 to the nearest colors available
  623. //                   , Shared    : the first 16 colors are preserved, and the
  624. //                                 next 240 colors come from a standard 
  625. //                                 linear color/grayscale palette.
  626. //                                 Each color of your image is mapped to the
  627. //                                 nearest color in this linear palette. As
  628. //                                 this shared palette is fixed it is possible
  629. //                                 to display multiple 256 colors images in a
  630. //                                 256 color screen at the same time.
  631.  
  632. // 3 ways to display :
  633. // - Overwrite       : generally used in full screen display, No LUT needed,
  634. //                   : just use a _gPalSet() to set the colors of the screen
  635. //                   : and pass NULL for lpUsedLUT in the _gBlockPut()
  636.  
  637.  
  638. // - Exclusive Pal   : Preserve the first 16 colors (text display and ICO/BMP).
  639. //                   : Call _gExclLUTMake() to create the look up table.
  640.  
  641.  
  642. // - Shared Palette  : Preserve the first 16 colors (text display and ICO/BMP).
  643. //                   : Call _gSharedLUTMake() to create the look up table.
  644.  
  645. //                   :
  646. //                   :
  647.  
  648.  
  649. // What happens when the number of colors in the image and the number of colors
  650. // in the display are not the same ?
  651. // If the number of colors in the image is smaller (ex 16) than the number of
  652. // colors in the display (ex 256), it is quite easy and the displayed image is
  653. // good.
  654. //
  655. // If the number of colors in the image is greater (ex 256) than the number of
  656. // colors in the display (ex 16) , the 256 colors are mapped to the nearest 16
  657. // colors available and the displayed image will be poor.
  658. //
  659. // Be aware that B&W images (1 bit) can have a palette. This allows reversed B&W
  660. // or W&B images (common problem with faxes).
  661.  
  662. BYTEP
  663.     _gExclLUTMake                           // Return a lpLUT used by _gBlockPut
  664.                                             // _gExclPalSet must be used
  665.     (                                       //
  666.         LLG_LPPALETTE lpPalette,            // A palette structure filled with the image values
  667.         BYTEP lpLUT                         // Pointer to n Bytes, n is the number of colors of the palette
  668.     );                                      //
  669.                                             //
  670.  
  671.  
  672. BYTEP
  673.     _gSharedLUTMake                         // Return a lpLUT used by _gBlockPut
  674.                                             // _gSharedPalSet must be used
  675.     (
  676.         LLG_LPPALETTE lpPalette,            // A palette structure filled with the image values
  677.         BYTEP lpLUT                         // Pointer to n Bytes, n is the number of colors of the palette
  678.     );                                      //
  679.  
  680.  
  681.  
  682. void
  683.     _gExclPalSet                            // Set Exclusive Palette
  684.                                             // ( preserve 16 first colors )
  685.                                             // Used before a _gBlockPut
  686.     (
  687.         LLG_LPPALETTE lpPalette
  688.     );
  689.  
  690. void
  691.     _gSharedPalSet                          // Set Shared Palette ( by default )
  692.                                             // Used before a _gBlockPut
  693.     (
  694.         void                                // No pointer needed as the palette is available in LLG
  695.     );
  696.  
  697. int
  698.     _gPaletteSize                           // returns Palette Size
  699.                                             // for Current Mode
  700.     (
  701.         void
  702.     );
  703.  
  704. long
  705.     _gBlockSize                             // returns Block Size in Bytes
  706.                                             // for Current Mode
  707.     (
  708.         int iX1,
  709.         int iY1,
  710.         int iX2,
  711.         int iY2
  712.     );
  713.  
  714. #endif
  715.  
  716.