/*
WPFCONV.H

Public word processor structures and prototypes for file conversion DYL code.
*/

#ifndef SCRLAY_G
#include <scrlay.g>
#endif
#ifndef PRINTER_G
#include <printer.g>
#endif

typedef struct
    {
    SCRLAY_FONT sf;
    UWORD inherit;
    } WP_FONT;

typedef struct
    {
    TEXT    sc[2];
    TEXT    tag_name[16];
    UWORD   sflags;
    WP_FONT font;
    } EMPH_DATA;        /* saved emphasis style structure */

typedef struct
    {
    SCRLAY_MARGINS  marg;
    SCRLAY_SPACING  spc;
    UWORD           olevel;
    SCRLAY_TABS     tabs;
    } PARA_DATA;        /* saved paragraph style structure */

typedef struct
    {
    VOID        *next;  /* style queue header - written by system code */
    EMPH_DATA   ph;
    } EMPH_STYLE;       /* in-memory emphasis style structure */

typedef struct
    {
    VOID        *next;  /* style queue header - written by system code */
    EMPH_DATA   ph;
    PARA_DATA   pa;
    SCRLAY_MARGINS  prn_mar;    /* printer margin positions */
    SCRLAY_MARGINS  scr_mar;    /* screen margin positions */
    SCRLAY_SPACING  prn_spc;    /* printer vertical spacing data */
    SCRLAY_TABS     *pts;       /* screen tabs data */
    SCRLAY_TABS     *ptp;       /* printer tabs data */
    } PARA_STYLE;       /* in-memory paragraph style structure */

/*
Prototypes for file conversion DYL interface.
*/
GLREF_C INT CountParaStyles(VOID);
GLREF_C INT CountEmphStyles(VOID);
GLREF_C PARA_STYLE *SenseParaStyleByIndex(INT);
GLREF_C EMPH_STYLE *SenseEmphStyleByIndex(INT);
GLREF_C PARA_STYLE *SenseParaStyleBySC(TEXT *);
GLREF_C EMPH_STYLE *SenseEmphStyleBySC(TEXT *);
GLREF_C PARA_STYLE *AppendParaStyle(PARA_STYLE *);
GLREF_C EMPH_STYLE *AppendEmphStyle(EMPH_STYLE *);
GLREF_C VOID DoApplyParaStyle(UINT,UINT,PARA_STYLE *);
GLREF_C VOID DoApplyEmphasis(UINT,UINT,EMPH_STYLE *);
GLREF_C VOID SetDefaultStyles(UINT,UINT);
GLREF_C VOID SetBusyStatus(INT);
GLREF_C INT DoConfirmOverwrite(VOID);
GLREF_C PRINTER_PARAMS *SensePrinterParams(VOID **);
GLREF_C WDR_MODEL *SensePrinterModel(VOID);
GLREF_C VOID *SenseWDR(VOID);
GLREF_C VOID SetFileErr(INT);
GLREF_C VOID StartActive(VOID *);
GLREF_C VOID StopActive(VOID);
GLREF_C VOID CloseCurrentFile(VOID);
GLREF_C VOID SwitchToNewFile(TEXT *);
GLREF_C VOID InsertText(UINT,TEXT *,UINT);
GLREF_C VOID DeleteText(UINT,UINT);
GLREF_C VOID ExtractText(UINT,TEXT *,UINT);
GLREF_C UINT CountTags(VOID);
GLREF_C UINT SenseTagItem(UINT,PARA_STYLE *,EMPH_STYLE *);
