Source code of Windows XP (NT5)
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.

59 lines
1.4 KiB

  1. /*
  2. File: ligstate.h
  3. Contains: This file contains the definitions
  4. needed to get/set letter image group state.
  5. Written by: Mikhail Ovsiannikov
  6. Copyright: 1998 by ParaGraph Int'l, all rights reserved.
  7. Change History (most recent first):
  8. <1> 3/24/98 mbo New today
  9. */
  10. #ifndef __LISTATE_H
  11. #define __LISTATE_H
  12. enum E_LIG_STATE {
  13. LIG_STATE_UNDEF = 0,
  14. LIG_STATE_OFTEN = 1,
  15. LIG_STATE_RARELY = 2,
  16. LIG_STATE_NEVER = 3
  17. };
  18. #define LIG_FIRST_LETTER 0x20
  19. #define LIG_LAST_LETTER 0xFF
  20. #define LIG_NUM_LETTERS (LIG_LAST_LETTER - LIG_FIRST_LETTER + 1)
  21. #if LIG_NUM_LETTERS <= 0
  22. #error
  23. #endif
  24. #define LIG_LET_NUM_GROUPS 8
  25. #define LIG_NUM_BITS_PER_GROUP 2
  26. #define LIG_NUM_BIT_GROUP_MASK 0x3
  27. #define LIG_STATES_SIZE \
  28. (LIG_NUM_LETTERS * LIG_LET_NUM_GROUPS * LIG_NUM_BITS_PER_GROUP / 8)
  29. typedef unsigned char LIGStatesType[LIG_STATES_SIZE];
  30. /*
  31. * Sets state for a given letter and group.
  32. * Returns 0 if letter and group are in the allowed range, -1 otherwise.
  33. */
  34. int LIGSetGroupState(LIGStatesType *ioGStates,
  35. int inLetter,
  36. int inGroup,
  37. E_LIG_STATE inGroupState);
  38. /*
  39. * Returns state for a given letter and group.
  40. */
  41. E_LIG_STATE LIGGetGroupState(const LIGStatesType *inGStates,
  42. int inLetter,
  43. int inGroup);
  44. #endif /* __LISTATE_H */