Annotation of os2sdk/demos/apps/lqh/lqh.h, revision 1.1.1.1

1.1       root        1: /* include file for lqh.c */
                      2: 
                      3: #define INCL_BASE         /* include all of the OS/2 base           */
                      4: 
                      5: #include <os2.h>          /* OS/2 includes                          */
                      6: #include "lqhdll.h"       /* definitions for qhdll.dll              */
                      7: 
                      8: #define atNORMAL 0x07     /* normal attribute                       */
                      9: #define atHILITE 0x70     /* highlighted attribute                  */
                     10: #define atITALIC 0x02     /* italics attribute                      */
                     11: #define atBOLD   0x0F     /* bold attribute                         */
                     12: #define atWARNING 0x47    /* error box attribute                    */
                     13: #define atMENU 0x30       /* menu bar                               */
                     14: #define atLEAD 0x3f       /* leading letter of menu                 */
                     15: #define atBOX 0x03        /* box color                              */
                     16: #define atSEARCHBOX 0x17  /* search box color                       */
                     17: 
                     18: #define MAXPRELOAD 150    /* maximum number of preloaded topics     */
                     19: #define MAXLIST 20        /* maximum number of list categories      */
                     20: #define MAXPASTE 5        /* maximum number of paste sections       */
                     21: #define MAXREF 10         /* maximum number of references           */
                     22: #define MAXNAMESIZE 25    /* maximum function name size             */
                     23: #define MAXCATNAME 20     /* maximum category name size             */
                     24: 
                     25: #define BOXLEFT 0         /* left column of box border              */
                     26: #define BOXRIGHT 79       /* right column of box border             */
                     27: #define BOXTOP 1          /* top column of box border               */
                     28: 
                     29: #define THIN  1           /* box line type                          */
                     30: #define THICK 2           /* box line type                          */
                     31: 
                     32: typedef ULONG NC;        /* context number for Help engine functins */
                     33: 
                     34: typedef struct _SELTABLE { /* table of current selectors            */
                     35:     NC ncContext;         /* context number                         */
                     36:     SEL sel;              /* selector                               */
                     37:     USHORT usTopLine;     /* top line of display                    */
                     38:     USHORT usHighLight;   /* highlighted line                       */
                     39: } SELTABLE;
                     40: 
                     41: typedef struct _STRTABLE {       /* table of char-attribute strings */
                     42:     PCH addr;                    /* address of the string           */
                     43:     USHORT cb;                   /* length of the string            */
                     44: } STRTABLE;
                     45: 
                     46: typedef struct _MENUTABLE {
                     47:     BYTE scancode;               /* scan code                       */
                     48:     BYTE pos;                    /* position                        */
                     49: } MENUTABLE;
                     50: 
                     51: typedef struct _LIST {                 /* category structure        */
                     52:     NPSZ name[MAXCATNAME];
                     53: } LIST;
                     54: 
                     55: typedef struct _TOPICHDR {
                     56:     BYTE appChar;                /* app-specific character          */
                     57:     BYTE lineChar;               /* what line to remove             */
                     58:     BYTE ftype;                  /* source file type                */
                     59:     USHORT lnCur;                /* line number last accessed       */
                     60:     USHORT lnOff;                /* offset into topic for that line */
                     61: } TOPICHDR;
                     62: 
                     63: extern VIOCURSORINFO viociCursor;      /* cursor data               */
                     64: extern KBDKEYINFO kbdciKeyInfo;        /* structure for key data    */
                     65: extern QHBOX qhbBox;                   /* contains box dimensions   */
                     66: 
                     67: extern CHAR chMenu[];
                     68: extern CHAR achBlank[2];
                     69: extern MENUTABLE menuCatTable[];
                     70: 
                     71: extern CHAR chReference[];      /* used to store reference strings  */
                     72: extern NPSZ npszRefTable[];     /* table of reference functions     */
                     73: extern STRTABLE strTable[];     /* maintains address of each line   */
                     74: extern USHORT usRefCount;       /* number of reference functions    */
                     75: extern LIST lstList[];          /* list category names              */
                     76: extern USHORT usListPos;        /* position in tables               */
                     77: 
                     78: extern USHORT hmou;               /* handle to the mouse          */
                     79: extern MOUEVENTINFO mouevEvent;        /* mouse event packet structure */
                     80: extern NOPTRRECT mourtRect;
                     81: extern BOOL fMouButton;             /* TRUE if button clicked       */
                     82: extern USHORT MouReadType;          /* don't wait for mouse event   */
                     83: 
                     84: extern BYTE bNormalAtt;
                     85: extern BYTE bHiAtt;
                     86: extern BYTE bBoldAtt;
                     87: extern BYTE bItalicAtt;
                     88: extern BYTE bMenuAtt;
                     89: extern BYTE bHiMenuAtt;
                     90: extern BYTE bLead;
                     91: extern BYTE bHiLead;
                     92: 
                     93: extern SEL selBoxSave;       /* selector to memory for screen save  */
                     94: SEL selStringTable;          /* selector for char-attribute strings */
                     95: 
                     96: extern USHORT usBottomLine;   /* current bottom line number         */
                     97: extern USHORT usInterior;     /* maximum number of displayed lines  */
                     98: extern USHORT usTotalLines;   /* total number of line               */
                     99: extern USHORT usStructLine;   /* starting line of structure section */
                    100: 
                    101: extern BOOL fListDisplay;     /* TRUE if function list is displayed */
                    102: extern BOOL fBack;            /* True if HelpNcBack() was called    */
                    103: extern USHORT usSaveMenuPos;  /* current Category menu position     */
                    104: 
                    105: extern SELTABLE selTable[];     /* table of preloaded topics        */
                    106: extern USHORT usCurrent;        /* current index in selTable        */
                    107: 
                    108: extern ULONG FAR hsemNewRef;    /* RAM semaphore used by PreLoad()  */
                    109: extern TID tidPreLoad;          /* identifier for PreLoad thread    */
                    110: extern BYTE bThreadStack[];     /* stack for PreLoad thread         */
                    111: 
                    112: extern CHAR chMenuTable[];      /* table of menu keys               */
                    113: extern SHORT sMenuTablePos;
                    114: extern SHORT sDirection;         /* used by menus                   */
                    115: 
                    116: extern NC ncHelp;                /* handle to help data file        */
                    117: extern BYTE bAttr[];
                    118: extern CHAR chHelpName[];        /* path and name for qh.hlp        */
                    119: extern CHAR chPasteName[];       /* path and name for paste.qh      */
                    120: extern USHORT usOpenType;        /* truncate/append                 */
                    121: extern VIOMODEINFO vmiMode;      /* video mode                      */
                    122: 
                    123: VOID cdecl main();                 /* qhmain */
                    124: BOOL ReadScreen(BOOL);             /* qhmain */
                    125: VOID Display();                    /* qhmain */
                    126: VOID FAR Abort();                  /* qhmain */
                    127: VOID ScrollUp();                   /* qhmain */
                    128: VOID ScrollDown();                 /* qhmain */
                    129: VOID MouseRelease();               /* qhmain */
                    130: BOOL isalpha(CHAR);                /* qhmain */
                    131: VOID Reference();                  /* qhmenu */
                    132: VOID Options();                    /* qhmenu */
                    133: VOID Search();                     /* qhmenu */
                    134: VOID Input();                      /* qhmenu */
                    135: VOID ListMenu();                   /* qhmenu */
                    136: VOID AddBar(USHORT, USHORT);       /* qhmenu */
                    137: VOID DeleteBar(USHORT, USHORT);    /* qhmenu */
                    138: BOOL MenuLoop(QHBOX *, USHORT *, BOOL, USHORT); /* qhmenu */
                    139: BOOL HelpSearch(NPSZ, BOOL, NC);   /* qhhelp */
                    140: VOID FAR PreLoadThread();          /* qhhelp */
                    141: BOOL Init();                       /* qhinit */
                    142: 
                    143: /* Help engine prototypes */
                    144: 
                    145: VOID   FAR PASCAL HelpClose(NC);
                    146: NC     FAR PASCAL HelpOpen(PCH);
                    147: NC     FAR PASCAL HelpNc(PCH, NC);
                    148: USHORT FAR PASCAL HelpNcCb(NC);
                    149: USHORT FAR PASCAL HelpLook(NC, PCH);
                    150: BYTE   FAR PASCAL HelpSetChar(NC, BYTE);
                    151: BOOL   FAR PASCAL HelpDecomp(PBYTE, PBYTE, NC);
                    152: NC     FAR PASCAL HelpNcNext(NC);
                    153: NC     FAR PASCAL HelpNcBack();
                    154: VOID   FAR PASCAL HelpNcRecord(NC);
                    155: SHORT  FAR PASCAL HelpGetCells(USHORT, INT, PCHAR, PCHAR, PBYTE);
                    156: SHORT  FAR PASCAL HelpGetLine(USHORT, USHORT, PBYTE, PBYTE);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.