Terminals.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:26k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Terminals.h
  3.  
  4.      Contains:   Communications Toolbox Terminal tool Interfaces.
  5.  
  6.      Version:    Technology: System 7.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1988-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __TERMINALS__
  18. #define __TERMINALS__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __DIALOGS__
  23. #include "Dialogs.h"
  24. #endif
  25. #ifndef __CTBUTILITIES__
  26. #include "CTBUtilities.h"
  27. #endif
  28. #ifndef __CONNECTIONS__
  29. #include "Connections.h"
  30. #endif
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40. #if PRAGMA_STRUCT_ALIGN
  41.     #pragma options align=mac68k
  42. #elif PRAGMA_STRUCT_PACKPUSH
  43.     #pragma pack(push, 2)
  44. #elif PRAGMA_STRUCT_PACK
  45.     #pragma pack(2)
  46. #endif
  47. #if CALL_NOT_IN_CARBON
  48. enum {
  49.     curTMVersion                = 2                             /* current Terminal Manager version */
  50. };
  51. enum {
  52.     curTermEnvRecVers           = 0                             /* current Terminal Manager Environment Record version */
  53. };
  54. enum {
  55.                                                                 /* error codes    */
  56.     tmGenericError              = -1,
  57.     tmNoErr                     = 0,
  58.     tmNotSent                   = 1,
  59.     tmEnvironsChanged           = 2,
  60.     tmNotSupported              = 7,
  61.     tmNoTools                   = 8
  62. };
  63. typedef OSErr                           TMErr;
  64. enum {
  65.     tmInvisible                 = 1 << 0,
  66.     tmSaveBeforeClear           = 1 << 1,
  67.     tmNoMenus                   = 1 << 2,
  68.     tmAutoScroll                = 1 << 3,
  69.     tmConfigChanged             = 1 << 4
  70. };
  71. typedef unsigned long                   TMFlags;
  72. enum {
  73.     selTextNormal               = 1 << 0,
  74.     selTextBoxed                = 1 << 1,
  75.     selGraphicsMarquee          = 1 << 2,
  76.     selGraphicsLasso            = 1 << 3,
  77.     tmSearchNoDiacrit           = 1 << 8,
  78.     tmSearchNoCase              = 1 << 9
  79. };
  80. typedef unsigned short                  TMSearchTypes;
  81. typedef short                           TMSelTypes;
  82. enum {
  83.     cursorText                  = 1,
  84.     cursorGraphics              = 2
  85. };
  86. typedef unsigned short                  TMCursorTypes;
  87. enum {
  88.     tmTextTerminal              = 1 << 0,
  89.     tmGraphicsTerminal          = 1 << 1
  90. };
  91. typedef unsigned short                  TMTermTypes;
  92. struct TermDataBlock {
  93.     TMTermTypes                     flags;
  94.     Handle                          theData;
  95.     Handle                          auxData;
  96.     long                            reserved;
  97. };
  98. typedef struct TermDataBlock            TermDataBlock;
  99. typedef TermDataBlock *                 TermDataBlockPtr;
  100. typedef TermDataBlockPtr *              TermDataBlockH;
  101. typedef TermDataBlockPtr *              TermDataBlockHandle;
  102. struct TermEnvironRec {
  103.     short                           version;
  104.     TMTermTypes                     termType;
  105.     short                           textRows;
  106.     short                           textCols;
  107.     Point                           cellSize;
  108.     Rect                            graphicSize;
  109.     Point                           slop;
  110.     Rect                            auxSpace;
  111. };
  112. typedef struct TermEnvironRec           TermEnvironRec;
  113. typedef TermEnvironRec *                TermEnvironPtr;
  114. union TMSelection {
  115.     Rect                            selRect;
  116.     RgnHandle                       selRgnHandle;
  117. };
  118. typedef union TMSelection               TMSelection;
  119. typedef struct TermRecord               TermRecord;
  120. typedef TermRecord *                    TermPtr;
  121. typedef TermPtr *                       TermHandle;
  122. typedef CALLBACK_API( long , TerminalSendProcPtr )(Ptr thePtr, long theSize, long refCon, CMFlags flags);
  123. typedef CALLBACK_API( void , TerminalBreakProcPtr )(long duration, long refCon);
  124. typedef CALLBACK_API( long , TerminalCacheProcPtr )(long refCon, TermDataBlockPtr theTermData);
  125. typedef CALLBACK_API( void , TerminalSearchCallBackProcPtr )(TermHandle hTerm, short refNum, Rect *foundRect);
  126. typedef CALLBACK_API( Boolean , TerminalClikLoopProcPtr )(long refCon);
  127. typedef CALLBACK_API( CMErr , TerminalEnvironsProcPtr )(long refCon, ConnEnvironRec *theEnvirons);
  128. typedef CALLBACK_API( void , TerminalChooseIdleProcPtr )(void );
  129. typedef CALLBACK_API( long , TerminalToolDefProcPtr )(TermHandle hTerm, short msg, long p1, long p2, long p3);
  130. typedef STACK_UPP_TYPE(TerminalSendProcPtr)                     TerminalSendUPP;
  131. typedef STACK_UPP_TYPE(TerminalBreakProcPtr)                    TerminalBreakUPP;
  132. typedef STACK_UPP_TYPE(TerminalCacheProcPtr)                    TerminalCacheUPP;
  133. typedef STACK_UPP_TYPE(TerminalSearchCallBackProcPtr)           TerminalSearchCallBackUPP;
  134. typedef STACK_UPP_TYPE(TerminalClikLoopProcPtr)                 TerminalClikLoopUPP;
  135. typedef STACK_UPP_TYPE(TerminalEnvironsProcPtr)                 TerminalEnvironsUPP;
  136. typedef STACK_UPP_TYPE(TerminalChooseIdleProcPtr)               TerminalChooseIdleUPP;
  137. typedef STACK_UPP_TYPE(TerminalToolDefProcPtr)                  TerminalToolDefUPP;
  138. /*    TMTermTypes     */
  139. struct TermRecord {
  140.     short                           procID;
  141.     TMFlags                         flags;
  142.     TMErr                           errCode;
  143.     long                            refCon;
  144.     long                            userData;
  145.     TerminalToolDefUPP              defProc;
  146.     Ptr                             config;
  147.     Ptr                             oldConfig;
  148.     TerminalEnvironsUPP             environsProc;
  149.     long                            reserved1;
  150.     long                            reserved2;
  151.     Ptr                             tmPrivate;
  152.     TerminalSendUPP                 sendProc;
  153.     TerminalBreakUPP                breakProc;
  154.     TerminalCacheUPP                cacheProc;
  155.     TerminalClikLoopUPP             clikLoop;
  156.     WindowPtr                       owner;
  157.     Rect                            termRect;
  158.     Rect                            viewRect;
  159.     Rect                            visRect;
  160.     long                            lastIdle;
  161.     TMSelection                     selection;
  162.     TMSelTypes                      selType;
  163.     long                            mluField;
  164. };
  165. #if OPAQUE_UPP_TYPES
  166. #if CALL_NOT_IN_CARBON
  167.     EXTERN_API(TerminalSendUPP)
  168.     NewTerminalSendUPP             (TerminalSendProcPtr     userRoutine);
  169.     EXTERN_API(TerminalBreakUPP)
  170.     NewTerminalBreakUPP            (TerminalBreakProcPtr    userRoutine);
  171.     EXTERN_API(TerminalCacheUPP)
  172.     NewTerminalCacheUPP            (TerminalCacheProcPtr    userRoutine);
  173.     EXTERN_API(TerminalSearchCallBackUPP)
  174.     NewTerminalSearchCallBackUPP    (TerminalSearchCallBackProcPtr userRoutine);
  175.     EXTERN_API(TerminalClikLoopUPP)
  176.     NewTerminalClikLoopUPP         (TerminalClikLoopProcPtr userRoutine);
  177.     EXTERN_API(TerminalEnvironsUPP)
  178.     NewTerminalEnvironsUPP         (TerminalEnvironsProcPtr userRoutine);
  179.     EXTERN_API(TerminalChooseIdleUPP)
  180.     NewTerminalChooseIdleUPP       (TerminalChooseIdleProcPtr userRoutine);
  181.     EXTERN_API(TerminalToolDefUPP)
  182.     NewTerminalToolDefUPP          (TerminalToolDefProcPtr  userRoutine);
  183.     EXTERN_API(void)
  184.     DisposeTerminalSendUPP         (TerminalSendUPP         userUPP);
  185.     EXTERN_API(void)
  186.     DisposeTerminalBreakUPP        (TerminalBreakUPP        userUPP);
  187.     EXTERN_API(void)
  188.     DisposeTerminalCacheUPP        (TerminalCacheUPP        userUPP);
  189.     EXTERN_API(void)
  190.     DisposeTerminalSearchCallBackUPP    (TerminalSearchCallBackUPP userUPP);
  191.     EXTERN_API(void)
  192.     DisposeTerminalClikLoopUPP     (TerminalClikLoopUPP     userUPP);
  193.     EXTERN_API(void)
  194.     DisposeTerminalEnvironsUPP     (TerminalEnvironsUPP     userUPP);
  195.     EXTERN_API(void)
  196.     DisposeTerminalChooseIdleUPP    (TerminalChooseIdleUPP  userUPP);
  197.     EXTERN_API(void)
  198.     DisposeTerminalToolDefUPP      (TerminalToolDefUPP      userUPP);
  199.     EXTERN_API(long)
  200.     InvokeTerminalSendUPP          (Ptr                     thePtr,
  201.                                     long                    theSize,
  202.                                     long                    refCon,
  203.                                     CMFlags                 flags,
  204.                                     TerminalSendUPP         userUPP);
  205.     EXTERN_API(void)
  206.     InvokeTerminalBreakUPP         (long                    duration,
  207.                                     long                    refCon,
  208.                                     TerminalBreakUPP        userUPP);
  209.     EXTERN_API(long)
  210.     InvokeTerminalCacheUPP         (long                    refCon,
  211.                                     TermDataBlockPtr        theTermData,
  212.                                     TerminalCacheUPP        userUPP);
  213.     EXTERN_API(void)
  214.     InvokeTerminalSearchCallBackUPP    (TermHandle          hTerm,
  215.                                     short                   refNum,
  216.                                     Rect *                  foundRect,
  217.                                     TerminalSearchCallBackUPP userUPP);
  218.     EXTERN_API(Boolean)
  219.     InvokeTerminalClikLoopUPP      (long                    refCon,
  220.                                     TerminalClikLoopUPP     userUPP);
  221.     EXTERN_API(CMErr)
  222.     InvokeTerminalEnvironsUPP      (long                    refCon,
  223.                                     ConnEnvironRec *        theEnvirons,
  224.                                     TerminalEnvironsUPP     userUPP);
  225.     EXTERN_API(void)
  226.     InvokeTerminalChooseIdleUPP    (TerminalChooseIdleUPP   userUPP);
  227.     EXTERN_API(long)
  228.     InvokeTerminalToolDefUPP       (TermHandle              hTerm,
  229.                                     short                   msg,
  230.                                     long                    p1,
  231.                                     long                    p2,
  232.                                     long                    p3,
  233.                                     TerminalToolDefUPP      userUPP);
  234. #endif  /* CALL_NOT_IN_CARBON */
  235. #else
  236.     enum { uppTerminalSendProcInfo = 0x00002FF0 };                  /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  237.     enum { uppTerminalBreakProcInfo = 0x000003C0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes) */
  238.     enum { uppTerminalCacheProcInfo = 0x000003F0 };                 /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  239.     enum { uppTerminalSearchCallBackProcInfo = 0x00000EC0 };        /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
  240.     enum { uppTerminalClikLoopProcInfo = 0x000000D0 };              /* pascal 1_byte Func(4_bytes) */
  241.     enum { uppTerminalEnvironsProcInfo = 0x000003E0 };              /* pascal 2_bytes Func(4_bytes, 4_bytes) */
  242.     enum { uppTerminalChooseIdleProcInfo = 0x00000000 };            /* pascal no_return_value Func() */
  243.     enum { uppTerminalToolDefProcInfo = 0x0000FEF0 };               /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  244.     #define NewTerminalSendUPP(userRoutine)                         (TerminalSendUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalSendProcInfo, GetCurrentArchitecture())
  245.     #define NewTerminalBreakUPP(userRoutine)                        (TerminalBreakUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalBreakProcInfo, GetCurrentArchitecture())
  246.     #define NewTerminalCacheUPP(userRoutine)                        (TerminalCacheUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalCacheProcInfo, GetCurrentArchitecture())
  247.     #define NewTerminalSearchCallBackUPP(userRoutine)               (TerminalSearchCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalSearchCallBackProcInfo, GetCurrentArchitecture())
  248.     #define NewTerminalClikLoopUPP(userRoutine)                     (TerminalClikLoopUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalClikLoopProcInfo, GetCurrentArchitecture())
  249.     #define NewTerminalEnvironsUPP(userRoutine)                     (TerminalEnvironsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalEnvironsProcInfo, GetCurrentArchitecture())
  250.     #define NewTerminalChooseIdleUPP(userRoutine)                   (TerminalChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalChooseIdleProcInfo, GetCurrentArchitecture())
  251.     #define NewTerminalToolDefUPP(userRoutine)                      (TerminalToolDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalToolDefProcInfo, GetCurrentArchitecture())
  252.     #define DisposeTerminalSendUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  253.     #define DisposeTerminalBreakUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  254.     #define DisposeTerminalCacheUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  255.     #define DisposeTerminalSearchCallBackUPP(userUPP)               DisposeRoutineDescriptor(userUPP)
  256.     #define DisposeTerminalClikLoopUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  257.     #define DisposeTerminalEnvironsUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  258.     #define DisposeTerminalChooseIdleUPP(userUPP)                   DisposeRoutineDescriptor(userUPP)
  259.     #define DisposeTerminalToolDefUPP(userUPP)                      DisposeRoutineDescriptor(userUPP)
  260.     #define InvokeTerminalSendUPP(thePtr, theSize, refCon, flags, userUPP)  (long)CALL_FOUR_PARAMETER_UPP((userUPP), uppTerminalSendProcInfo, (thePtr), (theSize), (refCon), (flags))
  261.     #define InvokeTerminalBreakUPP(duration, refCon, userUPP)       CALL_TWO_PARAMETER_UPP((userUPP), uppTerminalBreakProcInfo, (duration), (refCon))
  262.     #define InvokeTerminalCacheUPP(refCon, theTermData, userUPP)    (long)CALL_TWO_PARAMETER_UPP((userUPP), uppTerminalCacheProcInfo, (refCon), (theTermData))
  263.     #define InvokeTerminalSearchCallBackUPP(hTerm, refNum, foundRect, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppTerminalSearchCallBackProcInfo, (hTerm), (refNum), (foundRect))
  264.     #define InvokeTerminalClikLoopUPP(refCon, userUPP)              (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppTerminalClikLoopProcInfo, (refCon))
  265.     #define InvokeTerminalEnvironsUPP(refCon, theEnvirons, userUPP)  (CMErr)CALL_TWO_PARAMETER_UPP((userUPP), uppTerminalEnvironsProcInfo, (refCon), (theEnvirons))
  266.     #define InvokeTerminalChooseIdleUPP(userUPP)                    CALL_ZERO_PARAMETER_UPP((userUPP), uppTerminalChooseIdleProcInfo)
  267.     #define InvokeTerminalToolDefUPP(hTerm, msg, p1, p2, p3, userUPP)  (long)CALL_FIVE_PARAMETER_UPP((userUPP), uppTerminalToolDefProcInfo, (hTerm), (msg), (p1), (p2), (p3))
  268. #endif
  269. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  270. #define NewTerminalSendProc(userRoutine)                        NewTerminalSendUPP(userRoutine)
  271. #define NewTerminalBreakProc(userRoutine)                       NewTerminalBreakUPP(userRoutine)
  272. #define NewTerminalCacheProc(userRoutine)                       NewTerminalCacheUPP(userRoutine)
  273. #define NewTerminalSearchCallBackProc(userRoutine)              NewTerminalSearchCallBackUPP(userRoutine)
  274. #define NewTerminalClikLoopProc(userRoutine)                    NewTerminalClikLoopUPP(userRoutine)
  275. #define NewTerminalEnvironsProc(userRoutine)                    NewTerminalEnvironsUPP(userRoutine)
  276. #define NewTerminalChooseIdleProc(userRoutine)                  NewTerminalChooseIdleUPP(userRoutine)
  277. #define NewTerminalToolDefProc(userRoutine)                     NewTerminalToolDefUPP(userRoutine)
  278. #define CallTerminalSendProc(userRoutine, thePtr, theSize, refCon, flags) InvokeTerminalSendUPP(thePtr, theSize, refCon, flags, userRoutine)
  279. #define CallTerminalBreakProc(userRoutine, duration, refCon)    InvokeTerminalBreakUPP(duration, refCon, userRoutine)
  280. #define CallTerminalCacheProc(userRoutine, refCon, theTermData) InvokeTerminalCacheUPP(refCon, theTermData, userRoutine)
  281. #define CallTerminalSearchCallBackProc(userRoutine, hTerm, refNum, foundRect) InvokeTerminalSearchCallBackUPP(hTerm, refNum, foundRect, userRoutine)
  282. #define CallTerminalClikLoopProc(userRoutine, refCon)           InvokeTerminalClikLoopUPP(refCon, userRoutine)
  283. #define CallTerminalEnvironsProc(userRoutine, refCon, theEnvirons) InvokeTerminalEnvironsUPP(refCon, theEnvirons, userRoutine)
  284. #define CallTerminalChooseIdleProc(userRoutine)                 InvokeTerminalChooseIdleUPP(userRoutine)
  285. #define CallTerminalToolDefProc(userRoutine, hTerm, msg, p1, p2, p3) InvokeTerminalToolDefUPP(hTerm, msg, p1, p2, p3, userRoutine)
  286. #if CALL_NOT_IN_CARBON
  287. EXTERN_API( TMErr )
  288. InitTM                          (void);
  289. EXTERN_API( Handle )
  290. TMGetVersion                    (TermHandle             hTerm);
  291. EXTERN_API( short )
  292. TMGetTMVersion                  (void);
  293. EXTERN_API( TermHandle )
  294. TMNew                           (const Rect *           termRect,
  295.                                  const Rect *           viewRect,
  296.                                  TMFlags                flags,
  297.                                  short                  procID,
  298.                                  WindowPtr              owner,
  299.                                  TerminalSendUPP        sendProc,
  300.                                  TerminalCacheUPP       cacheProc,
  301.                                  TerminalBreakUPP       breakProc,
  302.                                  TerminalClikLoopUPP    clikLoop,
  303.                                  TerminalEnvironsUPP    environsProc,
  304.                                  long                   refCon,
  305.                                  long                   userData);
  306. EXTERN_API( void )
  307. TMDispose                       (TermHandle             hTerm);
  308. EXTERN_API( void )
  309. TMKey                           (TermHandle             hTerm,
  310.                                  const EventRecord *    theEvent);
  311. EXTERN_API( void )
  312. TMUpdate                        (TermHandle             hTerm,
  313.                                  RgnHandle              visRgn);
  314. EXTERN_API( void )
  315. TMPaint                         (TermHandle             hTerm,
  316.                                  const TermDataBlock *  theTermData,
  317.                                  const Rect *           theRect);
  318. EXTERN_API( void )
  319. TMActivate                      (TermHandle             hTerm,
  320.                                  Boolean                activate);
  321. EXTERN_API( void )
  322. TMResume                        (TermHandle             hTerm,
  323.                                  Boolean                resume);
  324. EXTERN_API( void )
  325. TMClick                         (TermHandle             hTerm,
  326.                                  const EventRecord *    theEvent);
  327. EXTERN_API( void )
  328. TMIdle                          (TermHandle             hTerm);
  329. EXTERN_API( long )
  330. TMStream                        (TermHandle             hTerm,
  331.                                  void *                 theBuffer,
  332.                                  long                   theLength,
  333.                                  CMFlags                flags);
  334. EXTERN_API( Boolean )
  335. TMMenu                          (TermHandle             hTerm,
  336.                                  short                  menuID,
  337.                                  short                  item);
  338. EXTERN_API( void )
  339. TMReset                         (TermHandle             hTerm);
  340. EXTERN_API( void )
  341. TMClear                         (TermHandle             hTerm);
  342. EXTERN_API( void )
  343. TMResize                        (TermHandle             hTerm,
  344.                                  const Rect *           newViewRect);
  345. EXTERN_API( long )
  346. TMGetSelect                     (TermHandle             hTerm,
  347.                                  Handle                 theData,
  348.                                  ResType *              theType);
  349. EXTERN_API( void )
  350. TMGetLine                       (TermHandle             hTerm,
  351.                                  short                  lineNo,
  352.                                  TermDataBlock *        theTermData);
  353. EXTERN_API( void )
  354. TMSetSelection                  (TermHandle             hTerm,
  355.                                  const TMSelection *    theSelection,
  356.                                  TMSelTypes             selType);
  357. EXTERN_API( void )
  358. TMScroll                        (TermHandle             hTerm,
  359.                                  short                  dh,
  360.                                  short                  dv);
  361. EXTERN_API( Boolean )
  362. TMValidate                      (TermHandle             hTerm);
  363. EXTERN_API( void )
  364. TMDefault                       (Ptr *                  theConfig,
  365.                                  short                  procID,
  366.                                  Boolean                allocate);
  367. EXTERN_API( Handle )
  368. TMSetupPreflight                (short                  procID,
  369.                                  long *                 magicCookie);
  370. EXTERN_API( void )
  371. TMSetupSetup                    (short                  procID,
  372.                                  const void *           theConfig,
  373.                                  short                  count,
  374.                                  DialogPtr              theDialog,
  375.                                  long *                 magicCookie);
  376. EXTERN_API( Boolean )
  377. TMSetupFilter                   (short                  procID,
  378.                                  const void *           theConfig,
  379.                                  short                  count,
  380.                                  DialogPtr              theDialog,
  381.                                  EventRecord *          theEvent,
  382.                                  short *                theItem,
  383.                                  long *                 magicCookie);
  384. EXTERN_API( void )
  385. TMSetupItem                     (short                  procID,
  386.                                  const void *           theConfig,
  387.                                  short                  count,
  388.                                  DialogPtr              theDialog,
  389.                                  short *                theItem,
  390.                                  long *                 magicCookie);
  391. EXTERN_API( void )
  392. TMSetupXCleanup                 (short                  procID,
  393.                                  const void *           theConfig,
  394.                                  short                  count,
  395.                                  DialogPtr              theDialog,
  396.                                  Boolean                OKed,
  397.                                  long *                 magicCookie);
  398. EXTERN_API( void )
  399. TMSetupPostflight               (short                  procID);
  400. EXTERN_API( Ptr )
  401. TMGetConfig                     (TermHandle             hTerm);
  402. EXTERN_API( short )
  403. TMSetConfig                     (TermHandle             hTerm,
  404.                                  const void *           thePtr);
  405. EXTERN_API( OSErr )
  406. TMIntlToEnglish                 (TermHandle             hTerm,
  407.                                  const void *           inputPtr,
  408.                                  Ptr *                  outputPtr,
  409.                                  short                  language);
  410. EXTERN_API( OSErr )
  411. TMEnglishToIntl                 (TermHandle             hTerm,
  412.                                  const void *           inputPtr,
  413.                                  Ptr *                  outputPtr,
  414.                                  short                  language);
  415. EXTERN_API( void )
  416. TMGetToolName                   (short                  id,
  417.                                  Str255                 name);
  418. EXTERN_API( short )
  419. TMGetProcID                     (ConstStr255Param       name);
  420. EXTERN_API( void )
  421. TMSetRefCon                     (TermHandle             hTerm,
  422.                                  long                   refCon);
  423. EXTERN_API( long )
  424. TMGetRefCon                     (TermHandle             hTerm);
  425. EXTERN_API( void )
  426. TMSetUserData                   (TermHandle             hTerm,
  427.                                  long                   userData);
  428. EXTERN_API( long )
  429. TMGetUserData                   (TermHandle             hTerm);
  430. EXTERN_API( short )
  431. TMAddSearch                     (TermHandle             hTerm,
  432.                                  ConstStr255Param       theString,
  433.                                  const Rect *           where,
  434.                                  TMSearchTypes          searchType,
  435.                                  TerminalSearchCallBackUPP  callBack);
  436. EXTERN_API( void )
  437. TMRemoveSearch                  (TermHandle             hTerm,
  438.                                  short                  refnum);
  439. EXTERN_API( void )
  440. TMClearSearch                   (TermHandle             hTerm);
  441. EXTERN_API( Point )
  442. TMGetCursor                     (TermHandle             hTerm,
  443.                                  TMCursorTypes          cursType);
  444. EXTERN_API( TMErr )
  445. TMGetTermEnvirons               (TermHandle             hTerm,
  446.                                  TermEnvironRec *       theEnvirons);
  447. EXTERN_API( short )
  448. TMChoose                        (TermHandle *           hTerm,
  449.                                  Point                  where,
  450.                                  TerminalChooseIdleUPP  idleProc);
  451. EXTERN_API( void )
  452. TMEvent                         (TermHandle             hTerm,
  453.                                  const EventRecord *    theEvent);
  454. EXTERN_API( Boolean )
  455. TMDoTermKey                     (TermHandle             hTerm,
  456.                                  ConstStr255Param       theKey);
  457. EXTERN_API( short )
  458. TMCountTermKeys                 (TermHandle             hTerm);
  459. EXTERN_API( void )
  460. TMGetIndTermKey                 (TermHandle             hTerm,
  461.                                  short                  id,
  462.                                  Str255                 theKey);
  463. EXTERN_API( void )
  464. TMGetErrorString                (TermHandle             hTerm,
  465.                                  short                  id,
  466.                                  Str255                 errMsg);
  467. #endif  /* CALL_NOT_IN_CARBON */
  468. #endif  /* CALL_NOT_IN_CARBON */
  469. #if PRAGMA_STRUCT_ALIGN
  470.     #pragma options align=reset
  471. #elif PRAGMA_STRUCT_PACKPUSH
  472.     #pragma pack(pop)
  473. #elif PRAGMA_STRUCT_PACK
  474.     #pragma pack()
  475. #endif
  476. #ifdef PRAGMA_IMPORT_OFF
  477. #pragma import off
  478. #elif PRAGMA_IMPORT
  479. #pragma import reset
  480. #endif
  481. #ifdef __cplusplus
  482. }
  483. #endif
  484. #endif /* __TERMINALS__ */