1 #ifndef DATATYPES_TEXTCLASS_H
    2 #define DATATYPES_TEXTCLASS_H
    3 
    4 /*
    5 	datatypes text-object definitions (V45)
    6 
    7 	Copyright © 2002-2010 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef UTILITY_TAGITEM_H
   11 # include <utility/tagitem.h>
   12 #endif
   13 
   14 #ifndef DATATYPES_DATATYPESCLASS_H
   15 # include <datatypes/datatypesclass.h>
   16 #endif
   17 
   18 #ifndef LIBRARIES_IFFPARSE_H
   19 # include <libraries/iffparse.h>
   20 #endif
   21 
   22 #pragma pack(2)
   23 
   24 
   25 #define TEXTDTCLASS  "text.datatype"
   26 
   27 
   28 /* Text attributes */
   29 
   30 #define TDTA_Buffer      (DTA_Dummy + 300)
   31 #define TDTA_BufferLen   (DTA_Dummy + 301)
   32 #define TDTA_LineList    (DTA_Dummy + 302)
   33 #define TDTA_WordSelect  (DTA_Dummy + 303)
   34 #define TDTA_WordDelim   (DTA_Dummy + 304)
   35 #define TDTA_WordWrap    (DTA_Dummy + 305)
   36 
   37 
   38 struct Line
   39 {
   40 	struct MinNode ln_Link;
   41 	STRPTR         ln_Text;
   42 	ULONG          ln_TextLen;
   43 	UWORD          ln_XOffset;
   44 	UWORD          ln_YOffset;
   45 	UWORD          ln_Width;
   46 	UWORD          ln_Height;
   47 	UWORD          ln_Flags;
   48 	BYTE           ln_FgPen;
   49 	BYTE           ln_BgPen;
   50 	ULONG          ln_Style;
   51 	APTR           ln_Data;
   52 };
   53 
   54 
   55 /* Line.ln_Flags defines */
   56 
   57 #define LNF_LF        (1<<0)
   58 #define LNF_LINK      (1<<1)
   59 #define LNF_OBJECT    (1<<2)
   60 #define LNF_SELECTED  (1<<3)
   61 
   62 
   63 #define ID_FTXT  MAKE_ID('F','T','X','T')
   64 #define ID_CHRS  MAKE_ID('C','H','R','S') /* Encoded with the 8-bit system codepage */
   65 #define ID_UTF8  MAKE_ID('U','T','F','8') /* Encoded with UTF8                      */
   66 
   67 /* ID_CHRS and ID_UTF8 chunks can be used at the same time. Preferably applications
   68  * dealing with UTF8 should still write a compatible ID_CHRS chunk for legacy
   69  * compatibility.
   70  */
   71 
   72 #pragma pack()
   73 
   74 #endif /* DATATYPES_TEXTCLASS_H */