home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / bento / headers / mssgintf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-02  |  4.5 KB  |  151 lines

  1. /*
  2.     File:        MssgIntf.h
  3.  
  4.     Contains:    Messaging system class interface.
  5.  
  6.     Written by:    Nick Pilch
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <19>      2/9/94    NP        Tiger Team cleanup.
  13.         <18>      2/8/94    JA        Minor tweaks for CodeWarrior.
  14.         <17>      2/7/94    NP        Tiger Team doings.
  15.         <16>     1/17/94    NP        Removed consts from public API.
  16.         <15>     1/14/94    NP        Init changes.
  17.         <14>    10/18/93    NP        Removed code name.
  18.         <13>    10/11/93    NP        Added CreatePartObjSpec. Added parameter to
  19.                                     CreatePartAddrDesc.
  20.         <12>     8/23/93    NP        Removed typedef from foreward decl.
  21.         <11>     8/16/93    CG        Removed ResetTimer, SuspendTheCurrentEvent,
  22.                                     ResumeTheCurrentEvent, GetTheCurrentEvent,
  23.                                     SetTheCurrentEvent, GetInteractionAllowed,
  24.                                     SetInteractionAllowed, and InteractWithUser
  25.                                     from the API.
  26.         <10>     7/28/93    NP        Removed constant kXMPAppShell to
  27.                                     SemtIntf.h.
  28.          <9>     7/26/93    CG        Added CreatePartAddrDesc method.
  29.          <8>     7/21/93    NP        Added XMPUnused to eliminate compiler
  30.                                     warning.
  31.          <7>     7/12/93    CG        Added fSession.
  32.          <6>      7/2/93    CG        Abstract/Concrete breakout.
  33.          <5>     6/10/93    NP        Added some private members.
  34.          <4>     5/18/93    NP        Updated constructor.
  35.          <3>     4/28/93    NP        File name changes.
  36.          <2>     4/23/93    NP        Added Initialize and Purge.
  37.          <1>     4/13/93    NP        first checked in
  38.  
  39.     To Do:
  40. */
  41.  
  42. #ifndef _MSSGINTF_
  43. #define _MSSGINTF_
  44.  
  45. #ifndef _XMPTYPES_
  46. #include "XMPTypes.h"
  47. #endif
  48.  
  49. #ifndef _XMPOBJ_
  50. #include "XMPObj.h"
  51. #endif
  52.  
  53. //==============================================================================
  54. // Classes defined in this interface
  55. //==============================================================================
  56.  
  57. class XMPAbsMessageInterface;
  58.  
  59. //==============================================================================
  60. // Classes used by this interface
  61. //==============================================================================
  62.  
  63. class XMPObject;
  64. class XMPPart;
  65. class XMPShape;
  66. class XMPSETransactionList;
  67. class XMPSession;
  68.  
  69. //==============================================================================
  70. // Scalar Types
  71. //==============================================================================
  72.  
  73. typedef XMPBoolean (*XMPIdleProcPtr)(XMPPart*            thePart,
  74.                                         XMPEventData*    theEventRecord,
  75.                                         XMPULong        sleepTime,
  76.                                         XMPShape        mouseRgn);
  77.  
  78. typedef XMPBoolean (*XMPEventFilterProcPtr)(XMPPart*        thePart,
  79.                                             XMPEventData*    theEventRecord,
  80.                                             XMPSLong        returnID,
  81.                                             XMPSLong        transactionID,
  82.                                             AEAddressDesc    sender);
  83. #if 0
  84. struct XMPNotificationRecord;    // forward declaration
  85.  
  86. typedef void (*XMPNotificationResponseProcPtr)
  87.                     (XMPPart*                    thePart,
  88.                         XMPNotificationRecord*    notificationRecord);
  89.  
  90. struct XMPNotificationRecord
  91. {
  92.     XMPUShort                        itemToMark;            /*item to mark in menu*/
  93.     XMPIcon                            icon;                /*handle to small icon*/
  94.     XMPSound                        sound;            /*handle to sound record*/
  95.     XMPName                            alertString; /*string to appear in alert*/
  96.     XMPNotificationResponseProcPtr    responseFunction; /*pointer to response routine*/
  97.     XMPSLong                        refCon;                /*for application use*/
  98. };
  99. #endif // 0
  100. //==============================================================================
  101. // XMPMessageInterface
  102. //==============================================================================
  103.  
  104. class XMPAbsMessageInterface : public XMPObject
  105. {
  106.   public:
  107.  
  108.     XMPVMethod void CreatePartAddrDesc(AEDesc*        theAddressDesc,
  109.                                             XMPPart*    part)
  110.         =0;
  111.         
  112.     XMPVMethod void CreatePartObjSpec(AEDesc* theObjSpec, XMPPart* thePart)
  113.         =0;
  114.         
  115.     XMPVMethod XMPSShort            CreateEvent(AEEventClass    theAEEventClass,
  116.                                         AEEventID        theAEEventID,
  117.                                         AEAddressDesc*    target,
  118.                                         XMPSLong        transactionID,
  119.                                         AppleEvent*        result) 
  120.         = 0;
  121.  
  122.     XMPVMethod void                Send(XMPPart*                    part,
  123.                                     AppleEvent*                theAppleEvent,
  124.                                     AppleEvent*                reply,
  125.                                     AESendMode                sendMode,
  126.                                     AESendPriority            sendPriority,
  127.                                     XMPULong                timeOutInTicks,
  128.                                     XMPIdleProcPtr            idleProc,
  129.                                     XMPEventFilterProcPtr    filterProc) 
  130.         = 0;
  131.  
  132.     XMPVMethod XMPBoolean    ProcessSemanticEvent(XMPEventData theEvent) 
  133.         = 0;
  134.     
  135.     XMPVMethod XMPSize        Purge(XMPSize howMuch) 
  136.         = 0;
  137.  
  138.   public: // Private by convention
  139.  
  140.     XMPAbsMessageInterface(){}
  141.     XMPVMethod ~XMPAbsMessageInterface(){}
  142. };
  143.  
  144. #ifdef PLATFORM_MACINTOSH
  145. #ifndef _MSSGINTM_
  146. #include "MssgIntM.h"
  147. #endif
  148. #endif
  149.  
  150. #endif // _MSSGINTF_
  151.