intlmgr.pp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. {$MACRO ON}
  2. (******************************************************************************
  3. *
  4. * Copyright (c) 1998-2000 Palm, Inc. or its subsidiaries.
  5. * All rights reserved.
  6. *
  7. * File: IntlMgr.h
  8. *
  9. * Release: Palm OS SDK 4.0 (63220)
  10. *
  11. * Description:
  12. * This file defines public Int'l Mgr structures and routines.
  13. *
  14. * History:
  15. * 03/21/98 kwk Created by Ken Krugler.
  16. * 10/14/98 kwk Added intlIntlGetRoutineAddress selector and
  17. * IntlGetRoutineAddress routine declaration.
  18. * 08/05/99 kwk Added intlIntlHandleEvent selector and the
  19. * IntlHandleEvent routine declaration.
  20. * 09/22/99 kwk Added intlTxtParamString selector.
  21. * 10/20/99 kwk Moved private stuff to IntlPrv.h
  22. * 03/01/00 kwk Added intlTxtConvertEncoding selector.
  23. * 05/10/00 kwk Added intlIntlSetRoutineAddress selector & routine declaration.
  24. * Also intlErrInvalidSelector.
  25. * 05/18/00 kwk Added intlMgrStrict feature flag.
  26. * 05/26/00 kwk Added intlTxtGetWordWrapOffset selector.
  27. * 07/13/00 kwk Added intlTxtNameToEncoding selector.
  28. * 07/27/00 kwk Added intlTxtConvertEncodingV35 selector.
  29. * 11/29/00 kwk Added intlIntlStrictChecks selector.
  30. *
  31. *****************************************************************************)
  32. {$IFNDEF FPC_DOTTEDUNITS}
  33. unit intlmgr;
  34. {$ENDIF FPC_DOTTEDUNITS}
  35. interface
  36. {$IFDEF FPC_DOTTEDUNITS}
  37. uses PalmApi.Palmos, PalmApi.Coretraps, PalmApi.Errorbase;
  38. {$ELSE FPC_DOTTEDUNITS}
  39. uses palmos, coretraps, errorbase;
  40. {$ENDIF FPC_DOTTEDUNITS}
  41. (***********************************************************************
  42. * Public constants
  43. ***********************************************************************)
  44. const
  45. // Bits set for the Intl Mgr feature.
  46. intlMgrExists = $00000001; // IntlMgr/TextMgr calls can be made.
  47. intlMgrStrict = $00000002; // Trigger extra errors on debug ROM.
  48. // Intl manager error codes.
  49. intlErrInvalidSelector = intlErrorClass or 1;
  50. // Selectors for routines found in the international manager. The order
  51. // of these selectors MUST match the jump table in IntlDispatch.c.
  52. const
  53. intlIntlInit = 0;
  54. intlTxtByteAttr = 1;
  55. intlTxtCharAttr = 2;
  56. intlTxtCharXAttr = 3;
  57. intlTxtCharSize = 4;
  58. intlTxtGetPreviousChar = 5;
  59. intlTxtGetNextChar = 6;
  60. intlTxtGetChar = 7;
  61. intlTxtSetNextChar = 8;
  62. intlTxtCharBounds = 9;
  63. intlTxtPrepFindString = 10;
  64. intlTxtFindString = 11;
  65. intlTxtReplaceStr = 12;
  66. intlTxtWordBounds = 13;
  67. intlTxtCharEncoding = 14;
  68. intlTxtStrEncoding = 15;
  69. intlTxtEncodingName = 16;
  70. intlTxtMaxEncoding = 17;
  71. intlTxtTransliterate = 18;
  72. intlTxtCharIsValid = 19;
  73. intlTxtCompare = 20;
  74. intlTxtCaselessCompare = 21;
  75. intlTxtCharWidth = 22;
  76. intlTxtGetTruncationOffset = 23;
  77. intlIntlGetRoutineAddress = 24;
  78. // New for Palm OS 3.5
  79. intlIntlHandleEvent = 25;
  80. intlTxtParamString = 26;
  81. // Patched for Palm OS 3.5.2
  82. intlTxtConvertEncodingV35 = 27;
  83. // New for Palm OS 4.0
  84. intlTxtConvertEncoding = 28;
  85. intlIntlSetRoutineAddress = 29;
  86. intlTxtGetWordWrapOffset = 30;
  87. intlTxtNameToEncoding = 31;
  88. intlIntlStrictChecks = 32;
  89. intlMaxSelector = intlIntlStrictChecks;
  90. type
  91. IntlSelector = UInt16;
  92. (***********************************************************************
  93. * Public routines
  94. ***********************************************************************)
  95. // Return back the address of the routine indicated by <inSelector>. If
  96. // <inSelector> isn't a valid routine selector, return back NULL.
  97. function IntlGetRoutineAddress(inSelector: IntlSelector): Pointer; syscall sysTrapIntlDispatch, intlIntlGetRoutineAddress;
  98. // Set the address of the international mgr routine indicated by <iSelector>
  99. // to be <iProcPtr>. If <iSelector> isn't valid, return an error.
  100. function IntlSetRoutineAddress(iSelector: IntlSelector; iProcPtr: Pointer): Err; syscall sysTrapIntlDispatch, intlIntlSetRoutineAddress;
  101. implementation
  102. end.