home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / cplus / os2h / wpfinder.xh < prev    next >
Encoding:
Text File  |  1993-05-02  |  8.2 KB  |  330 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: wpfinder.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler spc: 1.22
  7.  *     SOM Emitter emitxh: 1.11
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Module Header
  13.  * 
  14.  *  Module Name: WPFINDER
  15.  * 
  16.  *  OS/2 Presentation Manager Workplace class definitions
  17.  * 
  18.  *  Copyright (c) International Business Machines Corporation 1991, 1992
  19.  * 
  20.  */
  21.  
  22. #ifndef wpfinder_xh
  23. #define wpfinder_xh
  24. class WPFinder;
  25.  
  26. #define WPFinder_MajorVersion 1
  27. #define WPFinder_MinorVersion 2
  28.  
  29. /* C++ som defs */
  30. #include <somcls.xh>
  31.  
  32. /* C++ parent def */
  33. #ifndef wpfilter_xh
  34. #include "wpfilter.xh"
  35. #endif
  36.  
  37. /*
  38.  * Passthru lines: File: "C.xh", "after"
  39.  */
  40.  
  41.    #define SATTR_INCLUDE_SUBFOLDERS   0x0001
  42.    #define SATTR_INCLUDE_FINDRESULTS  0x0002
  43.    #define SATTR_MULTIPLE_SELECT      0x0004
  44.    #define SATTR_APPEND_RESULTS       0x0008
  45.  
  46.    #define FRESULTS_BUFSIZE           32
  47.    typedef LHANDLE HFOBJ;
  48.  
  49.    typedef struct _FINDRESULTS
  50.    {
  51.       struct _FINDRESULTS *pNext;                      /* Next struct pointer */
  52.       ULONG                cObjects;                   /* Count of found objs */
  53.       OBJECT               Object[FRESULTS_BUFSIZE];           /* Object list */
  54.       CHAR                 SelectState[FRESULTS_BUFSIZE];   /* Selection list */
  55.    } FINDRESULTS;
  56.    typedef FINDRESULTS *PFINDRESULTS;
  57.  
  58.    typedef struct _FOBJ
  59.    {
  60.       struct _FOBJ     *pNext;
  61.       PFINDRESULTS      pFResults;                  /* Current results struct */
  62.       ULONG             Index;                /* Index in current object list */
  63.    } FOBJ;
  64.    typedef FOBJ *PFOBJ;
  65.  
  66.    #define HANDLE_MAGIC 0x99999999
  67.  
  68.  
  69. #ifndef WPFinder_API
  70. #define WPFinder_API
  71. /*
  72.  * The Class API
  73.  */
  74.  
  75. /* A procedure to create the WPFinder Class */
  76. SOMEXTERN SOMClass * SOMLINK WPFinderNewClass(
  77.         integer4 majorVersion,
  78.         integer4 minorVersion);
  79.  
  80. /* A macro to return the WPFinder class object */
  81. class M_WPFinder;
  82. #define _WPFinder ((M_WPFinder*)WPFinderClassData.classObject)
  83.  
  84. /* The static interface to WPFinder and its instances */
  85. SOMEXTERN struct WPFinderClassDataStructure {
  86.     SOMClass *classObject;
  87.     somMToken wpFind;
  88.     somMToken wpSetFindAttrs;
  89.     somMToken wpQueryFindAttrs;
  90.     somMToken wpSetStartFolder;
  91.     somMToken wpQueryStartFolder;
  92.     somMToken wpBeginEnumFoundObj;
  93.     somMToken wpEndEnumFoundObj;
  94.     somMToken wpGetNextFoundObj;
  95.     somMToken wpFindParametersDialog;
  96.     somMToken wpSelectionListDialog;
  97.     somMToken wpCreateFindResultsFolder;
  98.     somMToken wpSetSelectionState;
  99.     somMToken wpAllocResultBlock;
  100.     somMToken wpFreeResultBlock;
  101.     somMToken wpCleanupFindResults;
  102. } WPFinderClassData;
  103.  
  104. /*
  105.  * -- Typedefs for Procedures that support WPFinder Methods
  106.  */
  107. extern "C" {
  108. typedef BOOL    (SOMLINK *somTD_WPFinder_wpSetFindAttrs)(WPFinder *somSelf,ULONG ulAttrs);
  109. typedef ULONG    (SOMLINK *somTD_WPFinder_wpQueryFindAttrs)(WPFinder *somSelf);
  110. typedef BOOL    (SOMLINK *somTD_WPFinder_wpFind)(WPFinder *somSelf,HWND hwndOwner,BOOL fShowCriteria);
  111. typedef BOOL    (SOMLINK *somTD_WPFinder_wpSetStartFolder)(WPFinder *somSelf,WPFolder *Folder);
  112. typedef WPFolder *   (SOMLINK *somTD_WPFinder_wpQueryStartFolder)(WPFinder *somSelf);
  113. typedef HFOBJ    (SOMLINK *somTD_WPFinder_wpBeginEnumFoundObj)(WPFinder *somSelf);
  114. typedef BOOL    (SOMLINK *somTD_WPFinder_wpEndEnumFoundObj)(WPFinder *somSelf,HFOBJ hfo);
  115. typedef WPObject *   (SOMLINK *somTD_WPFinder_wpGetNextFoundObj)(WPFinder *somSelf,HFOBJ hfo,BOOL fSelected);
  116. typedef BOOL    (SOMLINK *somTD_WPFinder_wpFindParametersDialog)(WPFinder *somSelf,HWND hwndOwner);
  117. typedef BOOL    (SOMLINK *somTD_WPFinder_wpSelectionListDialog)(WPFinder *somSelf,HWND hwndOwner);
  118. typedef WPFolder *   (SOMLINK *somTD_WPFinder_wpCreateFindResultsFolder)(WPFinder *somSelf,WPFolder *Location,PSZ pszTitle);
  119. }
  120.  
  121.  
  122. #endif /* WPFinder_API */
  123.  
  124.  
  125. /*
  126.  * -- The C++ Wrapper Class for WPFinder
  127.  */
  128. class WPFinder : public WPFilter
  129. {
  130. public:
  131.  
  132. void *operator new(size_t size)
  133. {
  134.    (void) size;
  135.    if (!WPFinderClassData.classObject) 
  136.       WPFinderNewClass(WPFinder_MajorVersion,WPFinder_MinorVersion);
  137.    return (void *)
  138.       ((somTD_SOMClass_somNew)
  139.       somResolve(SOM_TestCls((SOMAny *)(WPFinderClassData.classObject),
  140.                              SOMClassClassData.classObject),
  141.                  SOMClassClassData.somNew))
  142.          ((SOMClass*)(WPFinderClassData.classObject));
  143. }
  144.  
  145. void operator delete(void * obj)
  146. {
  147.    ((SOMObject *)obj)->somFree();
  148. }
  149.  
  150. /* public method: wpSetFindAttrs */
  151. BOOL    wpSetFindAttrs(ULONG ulAttrs)
  152. {
  153.    return (BOOL) SOM_Resolve((SOMAny *)this,WPFinder,wpSetFindAttrs)
  154.     (this,ulAttrs);
  155. }
  156.  
  157.  
  158. /* public method: wpQueryFindAttrs */
  159. ULONG    wpQueryFindAttrs()
  160. {
  161.    return (ULONG) SOM_Resolve((SOMAny *)this,WPFinder,wpQueryFindAttrs)
  162.     (this);
  163. }
  164.  
  165.  
  166. /* public method: wpFind */
  167. BOOL    wpFind(HWND hwndOwner,
  168.         BOOL fShowCriteria)
  169. {
  170.    return (BOOL) SOM_Resolve((SOMAny *)this,WPFinder,wpFind)
  171.     (this,hwndOwner,fShowCriteria);
  172. }
  173.  
  174.  
  175. /* public method: wpSetStartFolder */
  176. BOOL    wpSetStartFolder(WPFolder *Folder)
  177. {
  178.    return (BOOL) SOM_Resolve((SOMAny *)this,WPFinder,wpSetStartFolder)
  179.     (this,Folder);
  180. }
  181.  
  182.  
  183. /* public method: wpQueryStartFolder */
  184. WPFolder *   wpQueryStartFolder()
  185. {
  186.    return (WPFolder*) SOM_Resolve((SOMAny *)this,WPFinder,wpQueryStartFolder)
  187.     (this);
  188. }
  189.  
  190.  
  191. /* public method: wpBeginEnumFoundObj */
  192. HFOBJ    wpBeginEnumFoundObj()
  193. {
  194.    return (HFOBJ) SOM_Resolve((SOMAny *)this,WPFinder,wpBeginEnumFoundObj)
  195.     (this);
  196. }
  197.  
  198.  
  199. /* public method: wpEndEnumFoundObj */
  200. BOOL    wpEndEnumFoundObj(HFOBJ hfo)
  201. {
  202.    return (BOOL) SOM_Resolve((SOMAny *)this,WPFinder,wpEndEnumFoundObj)
  203.     (this,hfo);
  204. }
  205.  
  206.  
  207. /* public method: wpGetNextFoundObj */
  208. WPObject *   wpGetNextFoundObj(HFOBJ hfo,
  209.         BOOL fSelected)
  210. {
  211.    return (WPObject*) SOM_Resolve((SOMAny *)this,WPFinder,wpGetNextFoundObj)
  212.     (this,hfo,fSelected);
  213. }
  214.  
  215.  
  216. /* public method: wpFindParametersDialog */
  217. BOOL    wpFindParametersDialog(HWND hwndOwner)
  218. {
  219.    return (BOOL) SOM_Resolve((SOMAny *)this,WPFinder,wpFindParametersDialog)
  220.     (this,hwndOwner);
  221. }
  222.  
  223.  
  224. /* public method: wpSelectionListDialog */
  225. BOOL    wpSelectionListDialog(HWND hwndOwner)
  226. {
  227.    return (BOOL) SOM_Resolve((SOMAny *)this,WPFinder,wpSelectionListDialog)
  228.     (this,hwndOwner);
  229. }
  230.  
  231.  
  232. /* public method: wpCreateFindResultsFolder */
  233. WPFolder *   wpCreateFindResultsFolder(WPFolder *Location,
  234.         PSZ pszTitle)
  235. {
  236.    return (WPFolder*) SOM_Resolve((SOMAny *)this,WPFinder,wpCreateFindResultsFolder)
  237.     (this,Location,pszTitle);
  238. }
  239.  
  240.  
  241.  
  242. };   /* WPFinder */
  243.  
  244.  
  245.  
  246. #endif       /* wpfinder_xh */
  247.  
  248. /*
  249.  * This file was generated by the SOM Compiler.
  250.  * FileName: wpfinder.xh.
  251.  * Generated using:
  252.  *     SOM Precompiler spc: 1.22
  253.  *     SOM Emitter emitxh: 1.11
  254.  */
  255. #ifndef wpfinder_mxh
  256. #define wpfinder_mxh
  257. class M_WPFinder;
  258.  
  259. #define M_WPFinder_MajorVersion 1
  260. #define M_WPFinder_MinorVersion 2
  261.  
  262. /* C++ som defs */
  263. #include <somcls.xh>
  264.  
  265. /* C++ parent def */
  266. #ifndef wpfilter_xh
  267. #include "wpfilter.xh"
  268. #endif
  269.  
  270. #ifndef M_WPFinder_API
  271. #define M_WPFinder_API
  272. /*
  273.  * The Class API
  274.  */
  275.  
  276. /* A procedure to create the M_WPFinder Class */
  277. SOMEXTERN SOMClass * SOMLINK M_WPFinderNewClass(
  278.         integer4 majorVersion,
  279.         integer4 minorVersion);
  280.  
  281. /* A macro to return the M_WPFinder class object */
  282. #define _M_WPFinder ((SOMClass*)M_WPFinderClassData.classObject)
  283.  
  284. /* The static interface to M_WPFinder and its instances */
  285. SOMEXTERN struct M_WPFinderClassDataStructure {
  286.     SOMClass *classObject;
  287. } M_WPFinderClassData;
  288.  
  289. /*
  290.  * -- Typedefs for Procedures that support M_WPFinder Methods
  291.  */
  292. extern "C" {
  293. }
  294.  
  295.  
  296. #endif /* M_WPFinder_API */
  297.  
  298.  
  299. /*
  300.  * -- The C++ Wrapper Class for M_WPFinder
  301.  */
  302. class M_WPFinder : public M_WPFilter
  303. {
  304. public:
  305.  
  306. void *operator new(size_t size)
  307. {
  308.    (void) size;
  309.    if (!M_WPFinderClassData.classObject) 
  310.       M_WPFinderNewClass(M_WPFinder_MajorVersion,M_WPFinder_MinorVersion);
  311.    return (void *)
  312.       ((somTD_SOMClass_somNew)
  313.       somResolve(SOM_TestCls((SOMAny *)(M_WPFinderClassData.classObject),
  314.                              SOMClassClassData.classObject),
  315.                  SOMClassClassData.somNew))
  316.          ((SOMClass*)(M_WPFinderClassData.classObject));
  317. }
  318.  
  319. void operator delete(void * obj)
  320. {
  321.    ((SOMObject *)obj)->somFree();
  322. }
  323.  
  324.  
  325. };   /* M_WPFinder */
  326.  
  327.  
  328.  
  329. #endif       /* wpfinder_mxh */
  330.