textservicesmgr.pp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {$MACRO ON}
  2. (******************************************************************************
  3. *
  4. * Copyright (c) 1998-2000 Palm, Inc. or its subsidiaries.
  5. * All rights reserved.
  6. *
  7. * File: TextServicesMgr.h
  8. *
  9. * Release: Palm OS SDK 4.0 (63220)
  10. *
  11. * Description:
  12. * Header file for Text Services Manager. This provides the caller with
  13. * an API for interacting with various text services, including front-end
  14. * processors (FEPs), which are sometimes known as input methods.
  15. *
  16. * History:
  17. * 03/05/98 kwk Created by Ken Krugler.
  18. * 02/03/99 kwk Changed name to TextServicesMgr.h, was TextServices.h.
  19. * 10/20/99 kwk Moved private stuff into TextServicesPrv.h
  20. * 04/19/00 kwk Use portable typedef for TsmSelector and TsmFepModeType.
  21. * Fixed up descriptions for TsmGet/SetFepMode. Added new
  22. * selectors for TsmInit, TsmDrawMode, TsmFepHandleEvent,
  23. * TsmFepTerminate, and TsmFepCommit.
  24. * 07/06/00 kwk Set type of unused status ptr param to be void*, and
  25. * moved TsmFepStatusType into the private header file.
  26. * 08/21/00 kwk Moved tsmFtrCreator here from TextServicesPrv.h.
  27. * Added tsmFtrNumFlags, tsmFtrFlagsHasFep.
  28. * 11/15/00 kwk Added tsmGet/SetSystemFep, tsmGet/SetCurrentFep selectors.
  29. *
  30. *****************************************************************************)
  31. {$IFNDEF FPC_DOTTEDUNITS}
  32. unit textservicesmgr;
  33. {$ENDIF FPC_DOTTEDUNITS}
  34. interface
  35. {$IFDEF FPC_DOTTEDUNITS}
  36. uses PalmApi.Palmos, PalmApi.Coretraps, PalmApi.Systemresources;
  37. {$ELSE FPC_DOTTEDUNITS}
  38. uses palmos, coretraps, systemresources;
  39. {$ENDIF FPC_DOTTEDUNITS}
  40. (***********************************************************************
  41. * Public constants
  42. ***********************************************************************)
  43. // Feature Creators and numbers, for use with the FtrGet() call.
  44. const
  45. tsmFtrCreator = sysFileCTextServices;
  46. // Selector used with call to FtrGet(tsmFtrCreator, xxx) to get the
  47. // Text Services Manager flags.
  48. tsmFtrNumFlags = 0;
  49. // Flags returned by FtrGet(tsmFtrCreator, tsmFtrNumFlags) call.
  50. tsmFtrFlagsHasFep = $1; // Bit set if FEP is installed.
  51. // Selectors for routines found in the Text Services manager. The order
  52. // of these selectors MUST match the jump table in TextServicesMgr.c.
  53. type
  54. TsmSelector = UInt16;
  55. const
  56. tsmGetFepMode_ = 0;
  57. tsmSetFepMode_ = 1;
  58. tsmHandleEvent = 2;
  59. tsmInit = 3; // new in 4.0
  60. tsmDrawMode = 4; // new in 4.0
  61. tsmGetSystemFep = 5; // new in 4.0
  62. tsmSetSystemFep = 6; // new in 4.0
  63. tsmGetCurrentFep = 7; // new in 4.0
  64. tsmSetCurrentFep = 8; // new in 4.0
  65. tsmMaxSelector = tsmSetCurrentFep;
  66. // Input mode - used with TsmGet/SetFepMode.
  67. type
  68. TsmFepModeType = UInt16;
  69. const
  70. tsmFepModeDefault = TsmFepModeType(0);
  71. tsmFepModeOff = TsmFepModeType(1);
  72. tsmFepModeCustom = TsmFepModeType(128);
  73. (***********************************************************************
  74. * Public types
  75. ***********************************************************************)
  76. (***********************************************************************
  77. * Public routines
  78. ***********************************************************************)
  79. // Return the current mode for the active FEP. The <nullParam> parameter
  80. // is unused and must be set to NULL.
  81. function TsmGetFepMode(nullParam: Pointer): TsmFepModeType; syscall sysTrapTsmDispatch, tsmGetFepMode_;
  82. // Set the mode for the active FEP to be <inNewMode>. The previous mode
  83. // is returned. The <nullParam> parameter is unused and must be set
  84. // to NULL.
  85. function TsmSetFepMode(nullParam: Pointer; inNewMode: TsmFepModeType): TsmFepModeType; syscall sysTrapTsmDispatch, tsmSetFepMode_;
  86. implementation
  87. end.