home *** CD-ROM | disk | FTP | other *** search
- /*************************************
- * *
- * Texts v2.0 *
- * by Torsten Jürgeleit in 05/91 *
- * *
- * Defines, structs and protos *
- * *
- *************************************/
-
- #ifndef TEXT_LIST_H
- #define TEXT_LIST_H
-
- /* Defines */
-
- #define TEXT_DATA_TYPE_TEXT 1
- #define TEXT_DATA_TYPE_NUM_UNSIGNED_DEC 2
- #define TEXT_DATA_TYPE_NUM_SIGNED_DEC 3
- #define TEXT_DATA_TYPE_NUM_HEX 4
- #define TEXT_DATA_TYPE_NUM_BIN 5
-
- #define MAX_TEXT_DATA_TYPE TEXT_DATA_TYPE_NUM_BIN
-
- #define TEXT_DATA_FLAG_BOLD (1 << 0)
- #define TEXT_DATA_FLAG_ITALIC (1 << 1)
- #define TEXT_DATA_FLAG_UNDERLINED (1 << 2)
- #define TEXT_DATA_FLAG_ABSOLUTE_POS (1 << 3) /* absolute text pos given - don't add border offsets */
- #define TEXT_DATA_FLAG_CENTER (1 << 4) /* center text with in window width */
- #define TEXT_DATA_FLAG_PLACE_LEFT (1 << 5) /* place text left of given left edge */
- #define TEXT_DATA_FLAG_COLOR2 (1 << 6) /* use 2nd text render pen */
- #define TEXT_DATA_FLAG_COMPLEMENT (1 << 7) /* use complement of front and back pen */
- #define TEXT_DATA_FLAG_BACK_FILL (1 << 8) /* use draw mode JAM2 to fill text background with ri_BackPen */
- #define TEXT_DATA_FLAG_NO_PRINT (1 << 9) /* don't print text - only calc width */
-
- /* Defines for internal use only */
-
- #define MAX_NUM_BUFFER_SIZE 34
- #define MAX_DEC_NUM_DIGITS 10
- #define MAX_HEX_NUM_DIGITS 8
- #define MAX_BIN_NUM_DIGITS 32
-
- /* Structures */
-
- struct TextData {
- USHORT td_Type;
- USHORT td_Flags;
- SHORT td_LeftEdge;
- SHORT td_TopEdge;
- BYTE *td_Text;
- struct TextAttr *td_TextAttr;
- };
- /* Global prototypes */
-
- VOID display_texts(struct RenderInfo *ri, struct Window *win,
- struct TextData *td, SHORT hoffset, SHORT voffset);
- USHORT print_text(struct RenderInfo *ri, struct Window *win, BYTE *text,
- USHORT left_edge, USHORT top_edge, USHORT type, USHORT flags,
- struct TextAttr *text_attr);
- USHORT convert_unsigned_dec(ULONG num, BYTE *buffer);
- USHORT convert_signed_dec(LONG num, BYTE *buffer);
- USHORT convert_hex(ULONG num, BYTE *buffer);
- USHORT convert_bin(ULONG num, BYTE *buffer);
-
- /* Global pragmas */
-
- #pragma regcall(display_texts(a0,a1,a2,d0,d1))
- #pragma regcall(print_text(a0,a1,a2,d0,d1,d2,d3,a3))
- #pragma regcall(convert_unsigned_dec(d0,a0))
- #pragma regcall(convert_signed_dec(d0,a0))
- #pragma regcall(convert_hex(d0,a0))
- #pragma regcall(convert_bin(d0,a0))
-
- #endif
-