Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.0 KiB

4 years ago
  1. /*****************************************************************************
  2. * *
  3. * HOTSPOT.H *
  4. * *
  5. * Copyright (C) Microsoft Corporation 1990. *
  6. * All Rights reserved. *
  7. * *
  8. ******************************************************************************
  9. /*****************************************************************************
  10. * *
  11. * Defines *
  12. * *
  13. *****************************************************************************/
  14. enum HSPT {
  15. hsptNone, // No hotspot
  16. hsptNegative, // Not a hotspot (don't repeat check)
  17. hsptUndefined, // hotspot with undefined jump term
  18. hsptDefine = 4, // Glossary/popup hotspot
  19. hsptJump, // Jump hotspot
  20. hsptMacro, // Macro hotspot
  21. hsptULDefine, // Glossary/popup hotspot with underline
  22. hsptULJump, // Jump hotspot with underline
  23. hsptULMacro, // Macro hotspot with underline
  24. };
  25. #if 0
  26. // Hotspot types.
  27. #define hsptNone ((HSPT) 0) // No hotspot
  28. #define hsptNegative ((HSPT) 1) // Not a hotspot (don't repeat check)
  29. #define hsptUndefined ((HSPT) 2) // hotspot with undefined jump term
  30. #define hsptDefine ((HSPT) 4) // Glossary/popup hotspot
  31. #define hsptJump ((HSPT) 5) // Jump hotspot
  32. #define hsptMacro ((HSPT) 6) // Macro hotspot
  33. #define hsptULDefine ((HSPT) 7) // Glossary/popup hotspot with underline
  34. #define hsptULJump ((HSPT) 8) // Jump hotspot with underline
  35. #define hsptULMacro ((HSPT) 9) // Macro hotspot with underline
  36. #endif
  37. // This macro returns the appropriate hotspot type, given a character format:
  38. #define HsptFromQcf( qcf ) (((qcf)->fAttr & fUnderLine) ? hsptDefine : \
  39. (((qcf)->fAttr & fStrikethrough) ? hsptJump : \
  40. (((qcf)->fAttr & fDblUnderline) ? hsptJump : \
  41. hsptNone )))
  42. /* Returns TRUE if flag indicates we are processing a hotspot,
  43. * FALSE otherwise.
  44. */
  45. #define FIsHotspotFlag(hspt) ((hspt) >= hsptDefine)
  46. #define FIsULHotspot(hspt) ((hspt) >= hsptULDefine)
  47. // This macro converts from a normal hotspot to an underlined hotspot.
  48. #define ULHsptFromHspt(hspt) ((HSPT) ((hspt) + (hsptULDefine - hsptDefine)))
  49. /*****************************************************************************
  50. * *
  51. * Typedefs *
  52. * *
  53. *****************************************************************************/
  54. /* Hotspot type */
  55. // typedef char HSPT;
  56. /*****************************************************************************
  57. * *
  58. * Static Variables *
  59. * *
  60. *****************************************************************************/
  61. // Global hotspot type. Belongs in hpj.
  62. extern HSPT hsptG;
  63. /*****************************************************************************
  64. * *
  65. * Prototypes *
  66. * *
  67. *****************************************************************************/
  68. BOOL STDCALL FIsHotspot(PSTR, QCF, PCFSTK, PERR);
  69. int STDCALL CbTranslateHotspot(char *, HSPT *);