home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / OS2 / MEMSIZ.ZIP / OBJECT.H < prev   
Encoding:
C/C++ Source or Header  |  1991-06-17  |  2.3 KB  |  108 lines

  1. /*************************************************************** OBJECT.H
  2.  *                                                                      *
  3.  *                    Object Processor Definitions                      *
  4.  *                                                                      *
  5.  ************************************************************************/
  6.  
  7. #ifndef OBJECT_H
  8. #define OBJECT_H
  9.  
  10. #define CLASS_OBJECT "Object"
  11.  
  12. /************************************************************************
  13.  *                          Type Definitions                            *
  14.  ************************************************************************/
  15.  
  16. typedef MRESULT (APIENTRY METHODFUNCTION) ( HWND, USHORT, MPARAM, MPARAM, PVOID ) ;
  17. typedef METHODFUNCTION FAR *PMETHODFUNCTION ;
  18.  
  19. typedef struct Method
  20. {
  21.   USHORT Action ;
  22.   PMETHODFUNCTION pFunction ;
  23. }
  24. METHOD ;
  25.  
  26. typedef METHOD FAR *PMETHOD ;
  27.  
  28. typedef struct Class
  29. {
  30.   PMETHOD pMethods ;
  31.   USHORT cMethods ;
  32.   MRESULT (APIENTRY *BaseObjectProcessor) (HWND, USHORT, MPARAM, MPARAM ) ;
  33.   USHORT cDataSize ;
  34.   ULONG flStyle ;
  35.   BOOL fFrame ;
  36.   struct
  37.   {
  38.     ULONG flStyle ;
  39.     ULONG flCreateFlags ;
  40.     HMODULE hmodResources ;
  41.     USHORT idResources ;
  42.   }
  43.   FrameData ;
  44. }
  45. CLASS ;
  46.  
  47. typedef CLASS FAR *PCLASS ;
  48.  
  49. typedef struct Object
  50. {
  51.   SEL selObject ;
  52.   SEL selData ;
  53.   PCLASS pClass ;
  54. }
  55. OBJECT ;
  56.  
  57. typedef OBJECT FAR *POBJECT ;
  58.  
  59.  
  60. /************************************************************************
  61.  *                         Function Prototypes                          *
  62.  ************************************************************************/
  63.  
  64. VOID ObjInitialize
  65. (
  66.   HAB *phAB,
  67.   HMQ *phMQ,
  68.   HELPINIT *pHelpInit,
  69.   HWND *phwndHelp
  70. ) ;
  71.  
  72. HWND ObjCreateObject
  73. (
  74.   HWND hwndOwner,
  75.   SHORT idWindow,
  76.   PCLASS pClass,
  77.   PCHAR szTitle,
  78.   HWND hwndHelp
  79. ) ;
  80.  
  81. VOID ObjExecuteAll ( HAB hAB ) ;
  82.  
  83. VOID ObjDestroy ( HWND hwnd ) ;
  84.  
  85. VOID ObjCleanup ( HAB hAB, HMQ hMQ, HWND hwndHelp ) ;
  86.  
  87. MRESULT EXPENTRY ObjMessageProcessor
  88. (
  89.   HWND hwnd,
  90.   USHORT msg,
  91.   MPARAM mp1,
  92.   MPARAM mp2
  93. ) ;
  94.  
  95. MRESULT EXPENTRY GeneralMessageProcessor
  96.   HWND hwnd, 
  97.   USHORT msg, 
  98.   MPARAM mp1, 
  99.   MPARAM mp2,
  100.   PMETHOD pMethods,
  101.   SHORT cMethods,
  102.   MRESULT (EXPENTRY *pDefaultMessageProcessor) (HWND,USHORT,MPARAM,MPARAM),
  103.   PVOID pData
  104. ) ;
  105.  
  106. #endif
  107.