1 /* $VER: libretto.h 0.1 (26.01.2015) (c) 2015 Grzegorz Kraszewski. */
    2 
    3 #ifndef LIBRARIES_LIBRETTO_H
    4 #define LIBRARIES_LIBRETTO_H
    5 
    6 #include <exec/types.h>
    7 #include <utility/tagitem.h>
    8 #include <intuition/classusr.h>
    9 
   10 #define LIBRETTONAME "libretto.library"
   11 #define LIBRETTOVERSION 0
   12 #define LIBRETTOMINVERSION 0
   13 
   14 
   15 /* Tags */
   16 
   17 #define LTTA_FontFamily                (TAG_USER + 1)    // nullterminated ASCII string
   18 #define LTTA_MetricsUnit               (TAG_USER + 2)    // enumerated units
   19 #define LTTA_Text                      (TAG_USER + 3)    // text to be rendered, APTR
   20 #define LTTA_Length                    (TAG_USER + 4)    // number of characters to process
   21 #define LTTA_Target                    (TAG_USER + 5)    // pointer to target object, or target "data"
   22 #define LTTA_Width                     (TAG_USER + 6)    // for not selfdescribing targets
   23 #define LTTA_Height                    (TAG_USER + 7)    // for not selfdescribing targets
   24 #define LTTA_ByteModulo                (TAG_USER + 8)    // for not selfdescribing targets
   25 #define LTTA_Color                     (TAG_USER + 9)    // ARGB32 color of text
   26 
   27 
   28 /* Special values */
   29 
   30 #define LTTV_Pixels                    1                 // font metrics unit
   31 
   32 #define LTTV_MonoRaster                1                 // monochrome raster
   33 #define LTTV_GrayRaster                2                 // 8-bit grayscale raster
   34 
   35 /* DrawTarget types */
   36 
   37 #define LT_Target_RastPort             1
   38 #define LT_Target_ArrayARGB32          2
   39 
   40 /*
   41   Structure for text sizing
   42   Notes:
   43     1. Box width is Right - Left.
   44     2. Box height is Bottom - Top.
   45 */
   46 
   47 struct LtExtent
   48 {
   49 	LONG Top;                          // top of the box relative to the origin (usually negative)
   50 	LONG Bottom;                       // bottom of the box relative to the origin (usually positive)
   51 	LONG Left;                         // left edge of box relative to the origin (often zero, sometimes negative)
   52 	LONG Right;                        // right edge of box relative to the origin (usually positive)
   53 	LONG AdvanceH;                     // horizontal advance of the origin (usually positive)
   54 	LONG AdvanceV;                     // vertical advance of the origin (usually zero)
   55 };
   56 
   57 
   58 #endif   /* LIBRARIES_LIBRETTO_H */