home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / wpshidl / idl / wpobject.idl < prev    next >
Encoding:
Text File  |  1993-11-18  |  36.3 KB  |  964 lines

  1.  
  2. //# This file was generated by the SOM Compiler.
  3. //# FileName: wpobject.id2.
  4. //# Generated using:
  5. //#     SOM Precompiler somopc: 2.2
  6. //#     SOM Emitter emitidl: 2.7
  7.  
  8. //  Module Header
  9. //
  10. //  Module Name: WPOBJECT
  11. //
  12. //  OS/2 Presentation Manager Workplace class definitions
  13. //
  14. //  Copyright (c) International Business Machines Corporation 1991, 1992
  15. //
  16.  
  17. #ifndef wpobject_idl
  18. #define wpobject_idl
  19.  
  20. #include <somobj.idl>
  21. #include <somcls.idl>
  22.  
  23. interface WPFolder;
  24. interface M_WPObject;
  25. interface M_WPObject;
  26.  
  27. #include "wptypes.idl"
  28.  
  29. interface WPObject : SOMObject
  30.  
  31. {
  32.   ULONG wpAddObjectGeneralPage(in HWND hwndNotebook);
  33.  
  34.   ULONG wpAddObjectWindowPage(in HWND hwndNotebook);
  35.  
  36.   BOOL wpAddSettingsPages(in HWND hwndNotebook);
  37.  
  38.   BOOL wpAddToObjUseList(in PUSEITEM pUseItem);
  39.  
  40.   PBYTE wpAllocMem(in ULONG cbBytes,
  41.                    in PULONG prc);
  42.  
  43.   BOOL32 wpAppendObject(in WPObject targetObject,
  44.                         in BOOL32 fMove);
  45.  
  46.   BOOL wpAssertObjectMutexSem();
  47.  
  48.   BOOL wpClose();
  49.  
  50.   PMINIRECORDCORE wpCnrInsertObject(in HWND hwndCnr,
  51.                                     in PPOINTL pptlIcon,
  52.                                     in PMINIRECORDCORE preccParent,
  53.                                     in PRECORDINSERT pRecInsert);
  54.  
  55.   BOOL wpCnrRemoveObject(in HWND hwndCnr);
  56.  
  57.   BOOL wpCnrSetEmphasis(in ULONG ulEmphasisAttr,
  58.                         in BOOL fTurnOn);
  59.  
  60.   ULONG wpConfirmDelete(in ULONG fConfirmations);
  61.  
  62.   ULONG wpConfirmObjectTitle(in WPFolder Folder,
  63.                              inout WPObject ppDuplicate,
  64.                              in PSZ pszTitle,
  65.                              in ULONG cbTitle,
  66.                              in ULONG menuID);
  67.  
  68.  
  69.   void wpCopiedFromTemplate();
  70.  
  71.   WPObject wpCopyObject(in WPFolder Folder,
  72.                         in BOOL fLock);
  73.  
  74.   WPObject wpCreateAnother(in PSZ pszTitle,
  75.                            in PSZ pszSetupEnv,
  76.                            in WPFolder Folder);
  77.  
  78.   WPObject wpCreateFromTemplate(in WPFolder folder,
  79.                                 in BOOL fLock);
  80.  
  81.   WPObject wpCreateShadowObject(in WPFolder Folder,
  82.                                 in BOOL fLock);
  83.  
  84.   ULONG wpDelete(in ULONG fConfirmations);
  85.  
  86.   BOOL wpDeleteFromObjUseList(in PUSEITEM pUseItem);
  87.  
  88.   BOOL wpDisplayHelp(in ULONG HelpPanelId,
  89.                      in PSZ HelpLibrary);
  90.  
  91.   BOOL wpDoesObjectMatch(in PVOID pvoidExtendedCriteria);
  92.  
  93.   MRESULT wpDraggedOverObject(in WPObject DraggedOverObject);
  94.  
  95.   MRESULT wpDragOver(in HWND hwndCnr,
  96.                      in PDRAGINFO pdrgInfo);
  97.  
  98.   MRESULT wpDrop(in HWND hwndCnr,
  99.                  in PDRAGINFO pdrgInfo,
  100.                  in PDRAGITEM pdrgItem);
  101.  
  102.   BOOL wpDroppedOnObject(in WPObject DroppedOnObject);
  103.  
  104.   MRESULT wpEndConversation(in ULONG ulItemID,
  105.                             in ULONG flResult);
  106.  
  107.   ULONG wpFilterPopupMenu(in ULONG ulFlags,
  108.                           in HWND hwndCnr,
  109.                           in BOOL fMultiSelect);
  110.  
  111.   PUSEITEM wpFindUseItem(in ULONG type,
  112.                          in PUSEITEM pCurrentItem);
  113.  
  114.   BOOL wpFormatDragItem(in PDRAGITEM pdrgItem);
  115.  
  116.   BOOL wpFree();
  117.  
  118.   BOOL wpFreeMem(in PBYTE pByte);
  119.  
  120.   BOOL wpHide();
  121.  
  122.   void wpInitData();
  123.  
  124.   BOOL wpInsertPopupMenuItems(in HWND hwndMenu,
  125.                               in ULONG iPosition,
  126.                               in HMODULE hmod,
  127.                               in ULONG MenuID,
  128.                               in ULONG SubMenuID);
  129.  
  130.   ULONG wpInsertSettingsPage(in HWND hwndNotebook,
  131.                              in PPAGEINFO ppageinfo);
  132.  
  133.   BOOL wpMenuItemHelpSelected(in ULONG MenuId);
  134.  
  135.   BOOL wpMenuItemSelected(in HWND hwndFrame,
  136.                           in ULONG ulMenuId);
  137.  
  138.   BOOL wpModifyPopupMenu(in HWND hwndMenu,
  139.                          in HWND hwndCnr,
  140.                          in ULONG iPosition);
  141.  
  142.   BOOL wpMoveObject(in WPFolder Folder);
  143.  
  144.   HWND wpOpen(in HWND hwndCnr,
  145.               in ULONG ulView,
  146.               in ULONG param);
  147.  
  148.   BOOL wpPrintObject(in PPRINTDEST pPrintDest,
  149.                      in ULONG ulReserved);
  150.  
  151.   ULONG wpQueryConcurrentView();
  152.  
  153.   ULONG wpQueryButtonAppearance();
  154.  
  155.   ULONG wpQueryConfirmations();
  156.  
  157.   BOOL wpQueryDefaultHelp(in PULONG pHelpPanelId,
  158.                           in PSZ HelpLibrary);
  159.  
  160.   ULONG wpQueryDefaultView();
  161.  
  162.   ULONG wpQueryDetailsData(inout PVOID ppDetailsData,
  163.                            in PULONG pcp);
  164.  
  165.   ULONG wpQueryError();
  166.  
  167.   HPOINTER wpQueryIcon();
  168.  
  169.   ULONG wpQueryIconData(in PICONINFO pIconInfo);
  170.  
  171.   ULONG wpQueryMinWindow();
  172.  
  173.   ULONG wpQueryNameClashOptions(in ULONG menuID);
  174.  
  175.   ULONG wpQueryStyle();
  176.  
  177.   BOOL32 wpSetTaskRec(in PTASKREC pNew,
  178.                       in PTASKREC pOld);
  179.  
  180.   PTASKREC wpFindTaskRec();
  181.  
  182.   PSZ wpQueryTitle();
  183.  
  184.   BOOL wpRegisterView(in HWND hwndFrame,
  185.                       in PSZ pszViewTitle);
  186.  
  187.   ULONG wpReleaseObjectMutexSem();
  188.  
  189.   MRESULT wpRender(in PDRAGTRANSFER pdxfer);
  190.  
  191.   MRESULT wpRenderComplete(in PDRAGTRANSFER pdxfer,
  192.                            in ULONG ulResult);
  193.  
  194.   BOOL32 wpReplaceObject(in WPObject targetObject,
  195.                          in BOOL32 fMove);
  196.  
  197.   ULONG wpRequestObjectMutexSem(in ULONG ulTimeout);
  198.  
  199.   BOOL wpRestore();
  200.  
  201.   BOOL wpRestoreData(in PSZ pszClass,
  202.                      in ULONG ulKey,
  203.                      in PBYTE pValue,
  204.                      in PULONG pcbValue);
  205.  
  206.   BOOL wpRestoreLong(in PSZ pszClass,
  207.                      in ULONG ulKey,
  208.                      in PULONG pulValue);
  209.  
  210.   BOOL wpRestoreState(in ULONG ulReserved);
  211.  
  212.   BOOL wpRestoreString(in PSZ pszClass,
  213.                        in ULONG ulKey,
  214.                        in PSZ pszValue,
  215.                        in PULONG pcbValue);
  216.  
  217.   BOOL wpSaveData(in PSZ pszClass,
  218.                   in ULONG ulKey,
  219.                   in PBYTE pValue,
  220.                   in ULONG cbValue);
  221.  
  222.   BOOL wpSaveImmediate();
  223.  
  224.   BOOL wpSaveDeferred();
  225.  
  226.   BOOL wpSaveLong(in PSZ pszClass,
  227.                   in ULONG ulKey,
  228.                   in ULONG ulValue);
  229.  
  230.   BOOL wpSaveState();
  231.  
  232.   BOOL wpSaveString(in PSZ pszClass,
  233.                     in ULONG ulKey,
  234.                     in PSZ pszValue);
  235.  
  236.   BOOL wpScanSetupString(in PSZ pszSetupString,
  237.                          in PSZ pszKey,
  238.                          in PSZ pszValue,
  239.                          in PULONG pcbValue);
  240.  
  241.   void wpSetConcurrentView(in ULONG ulCCView);  //sahsom2 VOID -> void
  242.  
  243.   void wpSetButtonAppearance(in ULONG ulButtonType);    //sahsom2 VOID -> void
  244.  
  245.   BOOL wpSetDefaultHelp(in ULONG HelpPanelId,
  246.                         in PSZ HelpLibrary);
  247.  
  248.   BOOL wpSetDefaultView(in ULONG ulView);
  249.  
  250.   BOOL wpSetError(in ULONG ulErrorId);
  251.  
  252.   BOOL wpSetIcon(in HPOINTER hptrNewIcon);
  253.  
  254.   BOOL wpSetIconData(in PICONINFO pIconInfo);
  255.  
  256.   void wpSetMinWindow(in ULONG ulMinWindow);    //sahsom2 VOID -> void
  257.  
  258.   BOOL wpSetStyle(in ULONG ulNewStyle);
  259.  
  260.   BOOL wpModifyStyle(in ULONG ulStyleFlags,
  261.                      in ULONG ulStyleMask);
  262.  
  263.   BOOL wpSetTitle(in PSZ pszNewTitle);
  264.  
  265.   BOOL wpSetup(in PSZ pszSetupString);
  266.  
  267.   BOOL wpSwitchTo(in ULONG View);
  268.  
  269.   void wpUnInitData();
  270.  
  271.   HWND wpViewObject(in HWND hwndCnr,
  272.                     in ULONG ulView,
  273.                     in ULONG param);
  274.  
  275.   ULONG wpQueryTrueStyle();
  276.  
  277.   HOBJECT wpQueryHandle();
  278.  
  279.   BOOL wpUnlockObject();
  280.  
  281.  
  282.  
  283.  
  284. #ifdef __SOMIDL__
  285.   implementation {
  286.  
  287.     releaseorder: wpSetTitle,wpQueryTitle,wpSetStyle,wpQueryStyle,wpSetIcon,
  288.                   wpQueryIcon,wpSetContainer,wpQueryContainer,wpSetNextObj,
  289.                   wpQueryNextObj,wpSetDefaultView,wpQueryDefaultView,
  290.                   wpMakeDormant,wpSaveState,wpBeginSave,wpEndSave,
  291.                   wpSaveLong,wpSaveString,wpSaveData,wpAppendSaveData,
  292.                   wpRestoreState,wpBeginRestore,wpEndRestore,wpRestoreLong,
  293.                   wpRestoreString,wpRestoreData,wpExtractRestoreData,
  294.                   wpAllocMem,wpFreeMem,wpAddToObjUseList,wpDeleteFromObjUseList,
  295.                   wpFindUseItem,wpSwitchTo,withdrawn1,wpFilterPopupMenu,
  296.                   wpModifyPopupMenu,wpMenuItemSelected,wpFormatDragItem,
  297.                   wpDrop,wpDragOver,wpRender,wpEndConversation,withdrawn10,
  298.                   wpMakeObject,wpDestroyObject,wpFree,wpCopiedFromTemplate,
  299.                   wpAddSettingsPages,wpAddObjectGeneralPage,wpDisplayHelp,
  300.                   wpMenuItemHelpSelected,wpInsertSettingsPage,wpInsertPopupMenuItems,
  301.                   withdrawn5,withdrawn6,withdrawn4,withdrawn3,wpCnrInsertObject,
  302.                   wpCnrRemoveObject,wpInitData,wpUnInitData,wpSetup,
  303.                   wpScanSetupString,wpSaveImmediate,wpOpen,wpClose,
  304.                   wpHide,wpRestore,wpSetIconData,wpQueryIconData,wpQueryIconSaved,
  305.                   wpDelete,wpConfirmDelete,withdrawn2,withdrawn11,
  306.                   withdrawn7,wpRegisterView,wpIdentify,wpSetDefaultHelp,
  307.                   wpQueryDefaultHelp,wpDoesObjectMatch,wpCnrRefreshDetails,
  308.                   wpSetError,wpQueryError,wpDraggedOverObject,wpDroppedOnObject,
  309.                   wpSetDefaultIconPos,wpQueryDefaultIconPos,wpSetState,
  310.                   wpQueryState,wpSetObjectID,wpQueryObjectID,wpIsDeleteable,
  311.                   wpQueryHandle,wpSaveDeferred,wpAddObjectWindowPage,
  312.                   wpQueryConcurrentView,wpSetConcurrentView,wpQueryMinWindow,
  313.                   wpSetMinWindow,wpViewObject,wpQueryButtonAppearance,
  314.                   wpSetButtonAppearance,wpQueryConfirmations,wpCnrSetEmphasis,
  315.                   wpQueryCoreRecord,wpFindViewItem,wpCreateFromTemplate,
  316.                   wpQueryTrueStyle,wpAssertObjectMutexSem,wpReleaseObjectMutexSem,
  317.                   wpRequestObjectMutexSem,wpCreateAnother,wpCreateShadowObject,
  318.                   wpCopyObject,wpMoveObject,wpLockObject,wpUnlockObject,
  319.                   wpIsLocked,wpRenderComplete,wpQueryDetailsData,wpPrintObject,
  320.                   wpQueryTaskRec,wpSetTaskRec,wpSnoozeNotify,wpModifyStyle,
  321.                   wpSetInsertState,wpFindTaskRec,wpAppendObject,wpReplaceObject,
  322.                   wpQueryNameClashOptions,wpConfirmObjectTitle,_get_pobjNext,
  323.                   wpQueryContainerFlagPtr,wpAddWindowPosKey,wpDeleteWindowPosKeys,
  324.                   wpObjectInsertPreparation,wpCnrDeleteUseItem;
  325.  
  326.     //# Class Modifiers
  327.     externalstem = wpobj;
  328.     local;
  329.     externalprefix = obj_;
  330.     majorversion = 1;
  331.     minorversion = 2;
  332.     filestem = wpobject;
  333.     metaclass = M_WPObject;
  334.     callstyle = oidl;
  335.     dllname = "pmwp.dll";               //sahsom2
  336.  
  337.     passthru C_h =      ""
  338. "   #define INCL_WINSTDCNR"
  339. "   #include <pmstddlg.h>"
  340. ""
  341. "      #ifndef M_WPObject"
  342. "      #define M_WPObject SOMClass"
  343. "      #endif"
  344. "      #ifndef WPObject"
  345. "      #define WPObject SOMAny"
  346. "      #endif"
  347. ""
  348. "      /* Object style flags (see wpSetStyle) */"
  349. ""
  350. "      #define OBJSTYLE_NOMOVE          2"
  351. "      #define OBJSTYLE_NOLINK          4"
  352. "      #define OBJSTYLE_NOCOPY          8"
  353. "      #define OBJSTYLE_NOTDEFAULTICON 16"
  354. "      #define OBJSTYLE_TEMPLATE       32"
  355. "      #define OBJSTYLE_NODELETE       64"
  356. "      #define OBJSTYLE_NOPRINT       128"
  357. "      #define OBJSTYLE_NODRAG        256"
  358. "      #define OBJSTYLE_NOTVISIBLE    512"
  359. "      #define OBJSTYLE_NOSETTINGS   1024"
  360. "      #define OBJSTYLE_NORENAME     2048"
  361. "      #define OBJSTYLE_NODROP       4096"
  362. ""
  363. "      /*  Class style flags (see wpclsQueryStyle) */"
  364. ""
  365. "      #define CLSSTYLE_NEVERMOVE      OBJSTYLE_NOMOVE"
  366. "      #define CLSSTYLE_NEVERLINK      OBJSTYLE_NOLINK"
  367. "      #define CLSSTYLE_NEVERCOPY      OBJSTYLE_NOCOPY"
  368. "      #define CLSSTYLE_NEVERTEMPLATE  16"
  369. "      #define CLSSTYLE_NEVERDELETE    OBJSTYLE_NODELETE"
  370. "      #define CLSSTYLE_NEVERPRINT     OBJSTYLE_NOPRINT"
  371. "      #define CLSSTYLE_NEVERDRAG      OBJSTYLE_NODRAG"
  372. "      #define CLSSTYLE_NEVERVISIBLE   OBJSTYLE_NOTVISIBLE"
  373. "      #define CLSSTYLE_NEVERRENAME    OBJSTYLE_NORENAME"
  374. "      #define CLSSTYLE_PRIVATE        4096"
  375. ""
  376. "      /*  Flags for the wpFilterPopupMenu() method */"
  377. ""
  378. "      #define CTXT_CRANOTHER     0x0001   /* Flags for ulFlags */"
  379. "      #define CTXT_NEW           CTXT_CRANOTHER"
  380. "      #define CTXT_OPEN          0x0002"
  381. "      #define CTXT_WINDOW        0x0004"
  382. "      #define CTXT_SWITCHTO      CTXT_WINDOW"
  383. "      #define CTXT_CLOSE         0x0008"
  384. "      #define CTXT_SETTINGS      0x0010"
  385. "      #define CTXT_PRINT         0x0020"
  386. "      #define CTXT_HELP          0x0040"
  387. "      #define CTXT_DELETE        0x0080"
  388. "      #define CTXT_COPY          0x0100"
  389. "      #define CTXT_MOVE          0x0200"
  390. "      #define CTXT_SHADOW        0x0400"
  391. "      #define CTXT_LINK          CTXT_SHADOW"
  392. "      #define CTXT_PROGRAM       0x0800"
  393. "      #define CTXT_ICON        0x001000"
  394. "      #define CTXT_TREE        0x002000"
  395. "      #define CTXT_DETAILS     0x004000"
  396. "      #define CTXT_FIND        0x008000"
  397. "      #define CTXT_SELECT      0x010000"
  398. "      #define CTXT_ARRANGE     0x020000"
  399. "      #define CTXT_SORT        0x040000"
  400. "      #define CTXT_SHUTDOWN    0x080000"
  401. "      #define CTXT_LOCKUP      0x100000"
  402. "      #define CTXT_PALETTE     0x200000"
  403. "      #define CTXT_REFRESH     0x400000"
  404. ""
  405. ""
  406. ""
  407. "      /* common context menu ids */"
  408. ""
  409. "      #define WPMENUID_USER          0x6500"
  410. "      #define WPMENUID_PRIMARY            0"
  411. "      #define WPMENUID_OPEN               1"
  412. "      #define WPMENUID_HELP               2"
  413. "      #define WPMENUID_PRINT              3"
  414. "      #define WPMENUID_SELECT     4"
  415. "      #define WPMENUID_SORT       5"
  416. ""
  417. ""
  418. "      /*  Open views for the wpOpen() method */"
  419. ""
  420. "      #define OPEN_UNKNOWN      -1"
  421. "      #define OPEN_DEFAULT       0"
  422. "      #define OPEN_CONTENTS      1"
  423. "      #define OPEN_SETTINGS      2"
  424. "      #define OPEN_HELP          3"
  425. "      #define OPEN_RUNNING       4"
  426. "      #define OPEN_PROMPTDLG     5"
  427. "      #define OPEN_PALETTE       121                                   /*SPLIT*/"
  428. "      #define OPEN_USER          0x6500"
  429. ""
  430. "      /*  Definitions for the INUSE list that is kept"
  431. "       *  for every object via wpAddToObjUseList and"
  432. "       *  wpRemoveFromObjUseList methods..."
  433. "       */"
  434. ""
  435. "      /* This structure is always followed immediately by a type"
  436. "       * dependant struct such as MEMORYITEM,RECORDITEM,VIEWITEM"
  437. "       * or some other user defined structure..."
  438. "       */"
  439. "      typedef struct _USEITEM"
  440. "      {"
  441. "         ULONG  type;                  /* Type of this Item */"
  442. "         struct _USEITEM *pNext;   /* Next item in use list */"
  443. "      } USEITEM;"
  444. "      typedef USEITEM *PUSEITEM;"
  445. ""
  446. "      #define USAGE_MEMORY          1  /* Values of 'type' */"
  447. "      #define USAGE_RECORD          4"
  448. "      #define USAGE_OPENVIEW        5"
  449. "      #define USAGE_LINK            6"
  450. "      #define USAGE_OPENFILE       20"
  451. ""
  452. "      typedef struct _MEMORYITEM       /* USAGE_MEMORY struct */"
  453. "      {"
  454. "         ULONG     cbBuffer;           /* Number of bytes in memory block */"
  455. "      } MEMORYITEM;"
  456. "      typedef MEMORYITEM *PMEMORYITEM;"
  457. ""
  458. "      typedef struct _RECORDITEM       /* USAGE_RECORD struct */"
  459. "      {"
  460. "         HWND            hwndCnr;      /* Cnr into which object is inserted */"
  461. "         PMINIRECORDCORE pRecord;      /* Record pointer within that cnr */"
  462. "         ULONG           ulUser;       /* For application use */         "
  463. "      } RECORDITEM;"
  464. "      typedef RECORDITEM *PRECORDITEM;"
  465. ""
  466. "      #define VIEWSTATE_OPENING       0x0001   /* The view is being opened */"
  467. "      #define VIEWSTATE_OBJECTDELETED 0x0002   /* The object is being deleted */"
  468. "      #define VIEWSTATE_USERHIDDEN    0x0004   /* The view was hidden by user */"
  469. "      #define VIEWSTATE_POPULATING    0x0008   /* The view is populating      */"
  470. ""
  471. "      typedef struct _VIEWITEM         /* USAGE_OPENVIEW struct */"
  472. "      {"
  473. "         ULONG        view;            /* Object view that this represents */"
  474. "         LHANDLE      handle;          /* Open handle */"
  475. "         ULONG        ulViewState;     /* View State flags */"
  476. "         HWND         hwndCnr;         /* System use only (window animation) */"
  477. "         PMINIRECORDCORE pRecord;      /* System use only (window animation) */"
  478. "      } VIEWITEM;"
  479. "      typedef VIEWITEM *PVIEWITEM;"
  480. ""
  481. "      typedef struct _LINKITEM         /* USAGE_LINK struct */"
  482. "      {"
  483. "         WPObject    *LinkObj;         /* The link object */"
  484. "      } LINKITEM;"
  485. "      typedef LINKITEM *PLINKITEM;"
  486. ""
  487. "      typedef struct _VIEWFILE         /* USAGE_OPENFILE struct */"
  488. "      {"
  489. "         ULONG        ulMenuId;        /* Menu id if association or menu page */"
  490. "         LHANDLE      handle;          /* Open handle */"
  491. "         HWND         hwndCnr;         /* System use only (window animation) */"
  492. "         PMINIRECORDCORE pRecord;      /* System use only (window animation) */"
  493. "      } VIEWFILE;"
  494. "      typedef VIEWFILE *PVIEWFILE;"
  495. ""
  496. "      /* Notes: The class name immediately follows the control block. The"
  497. "       *        first instance variable control block immediately follows"
  498. "       *        this."
  499. "       */"
  500. "      typedef struct _WPSRCLASSBLOCK"
  501. "      {"
  502. "        SHORT   ClassNameLength;       /* Length of class name, including the"
  503. "                                        * .. null terminator. This must be a"
  504. "                                        * .. SHORT and must be at the beginning"
  505. "                                        * .. of the structure."
  506. "                                        */"
  507. "        USHORT  IVarLength;            /* Length of instance variable"
  508. "                                        * .. information, including the two-"
  509. "                                        * .. byte null terminator"
  510. "                                        */"
  511. "      } WPSRCLASSBLOCK;"
  512. ""
  513. "      /*  Persistant storage structures (see wpSaveShort"
  514. "       *  and wpRestoreShort etc...)"
  515. "       */"
  516. ""
  517. ""
  518. "      /* This control structure does not reside in the dormant state."
  519. "       * It is used only when a persistant data block is"
  520. "       * resident in memory - either when an object is being saved or"
  521. "       * when it is being restored..."
  522. "       */"
  523. "      typedef struct _OBJDATA"
  524. "      {"
  525. "         WPSRCLASSBLOCK       *CurrentClass;"
  526. "         WPSRCLASSBLOCK       *First;"
  527. "         PUCHAR                NextData;"
  528. "         USHORT                Length;"
  529. "      } OBJDATA;"
  530. "      typedef OBJDATA *POBJDATA;"
  531. ""
  532. "      /*  wpCnrInsertObject/wpCnrRemoveObject structs"
  533. "       *  and macros..."
  534. "       */"
  535. ""
  536. "      typedef struct _CLASSDETAILS     /* Class Details struct */"
  537. "      {"
  538. "         PSZ          pszAttribute;    /* Translatable string for a class attribute*/"
  539. "         PVOID        pSortRecord;     /* Function pointer for sort function for attribute*/"
  540. "         struct _CLASSDETAILS *pNext; /* Next item in class details list */"
  541. "      } CLASSDETAILS;"
  542. "      typedef CLASSDETAILS *PCLASSDETAILS;"
  543. ""
  544. "      /* Macro to return the object associated with a given MINIRECORDCORE"
  545. "       * that was inserted using the wpCnrInsertObject method"
  546. "       */"
  547. "      #define OBJECT_FROM_PREC( prec )   ( (PVOID)( * (((PULONG)prec)-2) ) )"
  548. ""
  549. "      /* Macro to access the app defineable dword within the RECORDITEM"
  550. "       * structure that is created when an object is put into a list"
  551. "       * control using the wpCnrInsertObject method."
  552. "       */"
  553. "      PULONG EXPENTRY ShlGetUserWordPtr("
  554. "         HWND            hwndCnr,"
  555. "         PMINIRECORDCORE prec );"
  556. ""
  557. "      #define USERWORD_FROM_PREC( hwnd, prec )              \ "
  558. "         ( (ULONG)( *ShlGetUserWordPtr(hwnd,prec) ) )"
  559. ""
  560. "      /* Details comparison function definition"
  561. "       *"
  562. "       *    Param1  PVOID   - Pointer to details field value"
  563. "       *    Param2  PVOID   - Pointer to value to be compared with"
  564. "       *"
  565. "       *    Returns LONG    - Must be CMP_EQUAL, CMP_GREATER, CMP_LESS"
  566. "       */"
  567. "      typedef LONG (EXPENTRY FNCOMPARE)(PVOID,PVOID);"
  568. "      typedef FNCOMPARE *PFNCOMPARE;"
  569. ""
  570. "      #define CMP_EQUAL            0"
  571. "      #define CMP_GREATER          1"
  572. "      #define CMP_LESS             2"
  573. "      #define CMP_GREATER_OR_EQUAL 3"
  574. "      #define CMP_LESS_OR_EQUAL    4"
  575. "      #define CMP_NOT_EQUAL        5"
  576. ""
  577. "      #define NUM_CMP_VALUES       6"
  578. ""
  579. "      /* Owner draw function definition"
  580. "       *"
  581. "       *    Param1  HWND  - Handle of window that is being painted"
  582. "       *    Param2  PVOID - POWNERITEM structure pointer, see the container"
  583. "       *                    control programming reference for the meaning"
  584. "       *                    of the fields in this structure."
  585. "       *    Param3  PVOID - Pointer to the comparison value to draw (this"
  586. "       *                    is NULL, except when this function is painting"
  587. "       *                    its value into the include criteria dialog"
  588. "       *                    when it points to Criteria.CompareValue...)"
  589. "       *"
  590. "       *    Returns BOOL  - TRUE if the field was ownerdrawn, FALSE if the"
  591. "       *                    container control should do default painting."
  592. "       */"
  593. "      typedef BOOL (EXPENTRY FNOWNDRW)(HWND,PVOID,PVOID);"
  594. "      typedef FNOWNDRW *PFNOWNDRW;"
  595. ""
  596. "      /* Details comparison criteria structure"
  597. "       */"
  598. "      typedef struct _CRITERIA"
  599. "      {"
  600. "         PVOID            pReserved;           /* Reserved - MUST be null!!!! */"
  601. "         struct _CRITERIA *pNext;"
  602. "         struct _CRITERIA *pPrev;"
  603. "         ULONG            ClassFieldInfoIndex; /* Index of the details field  */"
  604. "         ULONG            LogicalOperator;     /* CRITERIA_AND or CRITERIA_OR */"
  605. "         ULONG            ComparisonType;      /* CMP_LESS_OR_EQUAL etc...    */"
  606. "         ULONG            ulLenCompareValue;   /* sizeof(ComparisonData)      */"
  607. "         CHAR             CompareValue[1];     /* Value to be compared with   */"
  608. "      } CRITERIA;"
  609. "      typedef CRITERIA *PCRITERIA;"
  610. ""
  611. "      #define CRITERIA_AND        0"
  612. "      #define CRITERIA_OR         1"
  613. ""
  614. "      /* ClassCriteria structure: points to a linked list of CRITERIA"
  615. "       * for the given class. ClassCriteria may be linked into a list"
  616. "       * too - and passed to a filter object, or the wpclsFindObjectFirst"
  617. "       * method call..."
  618. "       */"
  619. "      typedef struct _CLASSCRITERIA                                     /*!INC*/"
  620. "      {"
  621. "         struct _CLASSCRITERIA *pNext;"
  622. "         struct _CLASSCRITERIA *pPrev;"
  623. "         M_WPObject            *Class;          /* Class object */"
  624. "         PCRITERIA              pCriteria;      /* Linked list of criteria */"
  625. "         WPObject              *NotifyObject;   /* Owner of the criteria list */"
  626. "      } CLASSCRITERIA;"
  627. "      typedef CLASSCRITERIA *PCLASSCRITERIA;"
  628. ""
  629. "      /* This structure is passed to a details criteria edit window"
  630. "       * when it is created, so that it knows the current value and"
  631. "       * min/max values for the criteria to be edited."
  632. "       *"
  633. "       * As the user modifies the compare value using the criteria"
  634. "       * edit window, it should update the buffer pointed to by"
  635. "       * 'pCompareValue'."
  636. "       */"
  637. "      typedef struct _EDITCTLINIT                                       /*!INC*/"
  638. "      {"
  639. "         ULONG cb;                /* must have length in control data! MindyP */"
  640. "         PVOID pCompareValue;     /* Buffer containing the current value */"
  641. "         ULONG ulLenCompareValue; /* Length of pCompareValue buffer */"
  642. "         PVOID pMinCompareValue;  /* READ-ONLY parameter, NULL => default */"
  643. "         PVOID pMaxCompareValue;  /* READ-ONLY parameter, NULL => default */"
  644. "      } EDITCTLINIT;"
  645. "      typedef EDITCTLINIT *PEDITCTLINIT;"
  646. ""
  647. "      /* Structure for wpclsQueryDetailsInfo method"
  648. "       *"
  649. "       * CLASSFIELDINFO is identical to the FIELDINFO structure of the"
  650. "       * container control with the following differences:"
  651. "       *"
  652. "       * - The offStruct field from FIELDINFO is reserved."
  653. "       * - The offFieldData and usLenFieldData structure elements have"
  654. "       *   been added."
  655. "       * - Compare/Sort/Ownerdraw fields have also been added for the"
  656. "       *   convenience of the programmer, so that object details can"
  657. "       *   be customized and objects can be found or included by any"
  658. "       *   of their displayable object details."
  659. "       *"
  660. "       * For example if the application has the following details data:"
  661. "       *"
  662. "       * typedef struct _SAMPLE {"
  663. "       *   CDATE   cdate;"
  664. "       *   CTIME   ctime;"
  665. "       *   PSZ     psz;"
  666. "       * }  SAMPLE;"
  667. "       *"
  668. "       * classfieldinfo[0].offFieldData   = FIELDOFFSET(SAMPLE,cdate);"
  669. "       * classfieldinfo[0].ulLenFieldData = FIELDOFFSET(SAMPLE,ctime) -"
  670. "       *                                    FIELDOFFSET(SAMPLE,cdate);"
  671. "       *"
  672. "       * classfieldinfo[1].offFieldData   = FIELDOFFSET(SAMPLE,ctime);"
  673. "       * classfieldinfo[1].ulLenFieldData = FIELDOFFSET(SAMPLE,psz) -"
  674. "       *                                    FIELDOFFSET(SAMPLE,ctime);"
  675. "       *"
  676. "       * classfieldinfo[2].offFieldData   = FIELDOFFSET(SAMPLE,psz);"
  677. "       * classfieldinfo[2].ulLenFieldData = sizeof(SAMPLE) -"
  678. "       *                                    FIELDOFFSET(SAMPLE,psz);"
  679. "       *"
  680. "       * NOTE: It is essential that the fields be linked in order ex. above"
  681. "       *       cdate must be followed by ctime and finally psz."
  682. "       */"
  683. "      typedef struct _CLASSFIELDINFO                                    /*!INC*/"
  684. "      {"
  685. "         /* Details field attributes"
  686. "          */"
  687. "         ULONG      cb;                  /* size of CLASSFIELDINFO struct  */"
  688. "         ULONG      flData;              /* attributes of field's data     */"
  689. "         ULONG      flTitle;             /* attributes of field's title    */"
  690. "         PVOID      pTitleData;          /* title data (default is string) */"
  691. "                                         /* If CFT_BITMAP, must be HBITMAP */"
  692. "         ULONG      ulReserved;          /* Reserved                       */"
  693. "         PVOID      pUserData;           /* pointer to user data           */"
  694. "         struct _CLASSFIELDINFO *pNextFieldInfo; /* pointer to next linked */"
  695. "                                                /* CLASSFIELDINFO structure*/"
  696. "         ULONG      cxWidth;             /* width of field in pels         */"
  697. "         ULONG      offFieldData;        /* offset from beginning of       */"
  698. "                                         /*   this class's data for this   */"
  699. "                                         /*   field. (first field is 0).   */"
  700. "         ULONG      ulLenFieldData;      /* width of data in bytes.        */"
  701. "                                         /*   (4 for a pointer).           */"
  702. "         PFNOWNDRW  pfnOwnerDraw;        /* Ownerdraw procedure for detail */"
  703. "                                         /* column. Can be NULL except if  */"
  704. "                                         /* ownerdraw is being used.       */"
  705. "         /* Include/Sort parameters"
  706. "          */"
  707. "         ULONG      flCompare;           /* Flags: for example, use the    */"
  708. "                                         /*   COMPARE_SUPPORTED flag if    */"
  709. "                                         /*   your field can be compared   */"
  710. "         PFNCOMPARE pfnCompare;          /* Comparison function for this   */"
  711. "                                         /*   field. Can be NULL unless    */"
  712. "                                         /*   ownerdraw is used.           */"
  713. "         ULONG      DefaultComparison;   /* This is the default compare    */"
  714. "                                         /*   operator in the include      */"
  715. "                                         /*   page criteria dialog. (eg:   */"
  716. "                                         /*   CMP_LESS_OR_EQUAL)           */"
  717. "         ULONG      ulLenCompareValue;   /* Maximum length of the compare  */"
  718. "                                         /*   data. Can be NULL unless     */"
  719. "                                         /*   ownerdraw is used.           */"
  720. "         PVOID      pDefCompareValue;    /* The default value to be used   */"
  721. "                                         /*   for comparisons. Can be NULL */"
  722. "                                         /*   unless ownerdraw is used.    */"
  723. "         PVOID      pMinCompareValue;    /* The default value to be used   */"
  724. "                                         /*   for comparisons.Can be NULL  */"
  725. "                                         /*   unless ownerdraw is used.    */"
  726. "         PVOID      pMaxCompareValue;    /* The default value to be used   */"
  727. "                                         /*   for comparisons.Can be NULL  */"
  728. "                                         /*   unless ownerdraw is used.    */"
  729. "         PSZ        pszEditControlClass; /* Window class to be used to edit*/"
  730. "                                         /*   the compare value. Can be    */"
  731. "                                         /*   NULL unless ownerdraw is used*/"
  732. "         PFNCOMPARE pfnSort;             /* Sort function for this @SM09511*/"
  733. "                                         /*   field. Can be NULL unless    */"
  734. "                                         /*   ownerdraw is used.           */"
  735. "      } CLASSFIELDINFO;"
  736. ""
  737. "      typedef CLASSFIELDINFO *PCLASSFIELDINFO;"
  738. ""
  739. "      #define COMPARE_SUPPORTED      1"
  740. "      #define SORTBY_SUPPORTED       2"
  741. ""
  742. "      /* Standard notebook size constants */"
  743. "      #define STDNOTEBOOKWIDTH    290"
  744. "      #define STDNOTEBOOKHEIGHT   275"
  745. ""
  746. "      /* Confirm flags */"
  747. "      #define CONFIRM_DELETE        0x0001"
  748. "      #define CONFIRM_DELETEFOLDER  0x0002"
  749. "      #define CONFIRM_RENAMEFILESWITHEXT 0x0004"
  750. "      #define CONFIRM_KEEPASSOC          0x0008"
  751. "      #define CONFIRM_ACTION        0x0010"
  752. "      #define CONFIRM_PROGRESS      0x0020"
  753. ""
  754. "      #define OK_DELETE             1"
  755. "      #define NO_DELETE             2"
  756. "      #define CANCEL_DELETE         3"
  757. ""
  758. "      #define NUM_OBJDETAILS_FIELDS    2     /* number of object details */"
  759. ""
  760. "      /* Search Type for wpclsQueryExtendedCriteria */"
  761. ""
  762. "      #define SEARCH_ALL_FOLDERS 1"
  763. "      #define SEARCH_THIS_FOLDER 2"
  764. "      #define SEARCH_THIS_TREE   3"
  765. ""
  766. "      /* Find method related types and constants */"
  767. ""
  768. "      typedef WPObject   *OBJECT;                             /* FIND */"
  769. "      typedef OBJECT     *POBJECT;"
  770. "      typedef M_WPObject *CLASS;"
  771. "      typedef CLASS      *PCLASS;"
  772. "      typedef LHANDLE     HFIND;"
  773. "      typedef HFIND      *PHFIND;"
  774. ""
  775. "      /* wpDrop method return code  */"
  776. ""
  777. "      #define RC_DROP_DROPCOMPLETE 2"
  778. "      #define RC_DROP_ITEMCOMPLETE 1"
  779. "      #define RC_DROP_RENDERING    0"
  780. "      #define RC_DROP_ERROR       -1"
  781. ""
  782. "      /*handle for files being tracked by the shell */"
  783. ""
  784. "      typedef LHANDLE HFS;"
  785. "      #define MAXSZHFS 10       /* size of the translated string */"
  786. ""
  787. "    #define SETTINGS_PAGE_REMOVED  -1"
  788. ""
  789. "    /* wpSetConcurrentView values */"
  790. "      #define CCVIEW_DEFAULT 0"
  791. "      #define CCVIEW_ON      1"
  792. "      #define CCVIEW_OFF     2"
  793. ""
  794. "    /* wpSetMinWindow values */"
  795. "      #define MINWIN_DEFAULT 0"
  796. "      #define MINWIN_HIDDEN  1"
  797. "      #define MINWIN_VIEWER  2"
  798. "      #define MINWIN_DESKTOP 3"
  799. ""
  800. "    /* wpSetButtonAppearance values */"
  801. "      #define HIDEBUTTON      1"
  802. "      #define MINBUTTON      2"
  803. "      #define DEFAULTBUTTON  3"
  804. ""
  805. "      #define  HIDDENMINWINDOW_DEFAULT MINWIN_VIEWER"
  806. "      #define WPFolder SOMAny     /* Define WPFolder */"
  807. ""
  808. "      typedef struct _TASKREC"
  809. "      {"
  810. "         struct _TASKREC *next;     /* next in the list of current tasks   */"
  811. "         ULONG            useCount; /* can be referenced by multiple object*/"
  812. "         PVOID            pStdDlg;  /* ptr to standard WP task dialog      */"
  813. "         WPFolder        *folder;   /* intended folder for the object      */"
  814. "         LONG             xOrigin;  /* intended position for the object    */"
  815. "         LONG             yOrigin;  /* intended position for the object    */"
  816. "         PSZ              pszTitle; /* intended name for the object        */"
  817. "         ULONG            cbTitle;  /* length of the name buffer           */"
  818. "         PMINIRECORDCORE  positionAfterRecord; /* intended sort position   */"
  819. "         BOOL            fKeepAssociations;"
  820. "         PVOID            pReserved;    /* reserved - equal null           */"
  821. ""
  822. "      }  TASKREC;"
  823. "      typedef TASKREC *PTASKREC;"
  824. ""
  825. "/*"
  826. " * Passthru some stuff to the .h file"
  827. " */"
  828. "";
  829.  
  830.  
  831.  
  832.     //# Method Modifiers
  833.     somInit: override;
  834.     somUninit: override;
  835.  
  836.     //# Data Modifiers
  837.  
  838.  
  839.   };
  840. #endif /* __SOMIDL__ */
  841. };
  842.  
  843. interface M_WPObject
  844. {
  845.   BOOL wpclsCreateDefaultTemplates(in WPObject Folder);
  846.  
  847.   void wpclsInitData();
  848.  
  849.   WPObject wpclsMakeAwake(in PSZ pszTitle,
  850.                           in ULONG ulStyle,
  851.                           in HPOINTER hptrIcon,
  852.                           in POBJDATA pObjData,
  853.                           in WPFolder Folder,
  854.                           in ULONG ulUser);
  855.  
  856.   WPObject wpclsNew(in PSZ pszTitle,
  857.                     in PSZ pszSetupEnv,
  858.                     in WPFolder Folder,
  859.                     in BOOL fLock);
  860.  
  861.   BOOL wpclsQueryDefaultHelp(in PULONG pHelpPanelId,
  862.                              in PSZ pszHelpLibrary);
  863.  
  864.   ULONG wpclsQueryDefaultView();
  865.  
  866.   PCLASSDETAILS wpclsQueryDetails();
  867.  
  868.   ULONG wpclsQueryDetailsInfo(inout PCLASSFIELDINFO ppClassFieldInfo,
  869.                               in PULONG pSize);
  870.  
  871.   BOOL wpclsQueryExtendedCriteria(in PSZ pszName,
  872.                                   in ULONG ulSearchType,
  873.                                   in PVOID pvoidExtendedCriteria);
  874.  
  875.   WPObject wpclsQueryFolder(in PSZ pszLocation,
  876.                             in BOOL fLock);
  877.  
  878.   HPOINTER wpclsQueryIcon();
  879.  
  880.   void wpclsQuerySearchInfo(inout M_WPObject ClassExtended,       //sahsom2 VOID -> void
  881.                             inout M_WPObject ClassCreate,
  882.                             in PULONG pulClassCriteriaSize);
  883.  
  884.   ULONG wpclsQueryStyle();
  885.  
  886.   PSZ wpclsQueryTitle();
  887.  
  888.   void wpclsUnInitData();
  889.  
  890.   BOOL wpclsFindObjectFirst(in PCLASS pClassList,
  891.                             in PHFIND phFind,
  892.                             in PSZ pszTitle,
  893.                             in WPFolder Folder,
  894.                             in BOOL fSubfolders,
  895.                             in PVOID pExtendedCriteria,
  896.                             in POBJECT pBuffer,
  897.                             in PULONG pCount);
  898.  
  899.   BOOL wpclsFindObjectNext(in HFIND hFind,
  900.                            in POBJECT pBuffer,
  901.                            in PULONG pCount);
  902.  
  903.   BOOL wpclsFindObjectEnd(in HFIND hFind);
  904.  
  905.   BOOL wpclsSetError(in ULONG ulErrorId);
  906.  
  907.   ULONG wpclsQueryError();
  908.  
  909.   BOOL wpclsQuerySettingsPageSize(in PSIZEL pSizl);
  910.  
  911.   ULONG wpclsQueryIconData(in PICONINFO pIconInfo);
  912.  
  913.  
  914.   WPObject wpclsQueryObject(in HOBJECT hObject);
  915.  
  916.   ULONG wpclsQueryButtonAppearance();
  917.  
  918.  
  919.  
  920.  
  921. #ifdef __SOMIDL__
  922.   implementation {
  923.  
  924.     releaseorder: wpclsInitData,wpclsUnInitData,withdrawn8,wpclsMakeAwake,
  925.                   wpclsIncUsage,wpclsDecUsage,wpclsQueryTitle,wpclsQueryIcon,
  926.                   wpclsQueryDefaultHelp,wpclsQueryStyle,wpclsQueryDetailsInfo,
  927.                   wpclsQueryDefaultView,wpclsQueryDetails,wpclsQuerySearchInfo,
  928.                   wpclsQueryExtendedCriteria,wpclsCreateDefaultTemplates,
  929.                   withdrawn9,wpclsFindObjectFirst,wpclsFindObjectNext,
  930.                   wpclsFindObjectEnd,wpclsFindObjects,wpclsSetError,
  931.                   wpclsQueryError,wpclsQuerySettingsPageSize,wpclsSetSettingsPageSize,
  932.                   wpclsQueryIconData,wpclsSetIcon,wpclsSetIconData,
  933.                   wpclsQueryObject,wpclsObjectFromHandle,wpclsSaveDirtyObjects,
  934.                   wpclsLockDirtyList,wpclsUnlockDirtyList,wpclsLockRestartList,
  935.                   wpclsUnlockRestartList,wpclsQueryButtonAppearance,
  936.                   wpclsNew,wpclsQueryFolder,wpclsLockSleepyList,wpclsUnlockSleepyList,
  937.                   wpclsRemoveObjects,wpclsInsertMultipleObjects;
  938.  
  939.     //# Class Modifiers
  940.     externalstem = wpobj;
  941.     local;
  942.     externalprefix = objM_;
  943.     majorversion = 1;
  944.     minorversion = 2;
  945.     filestem = wpobject;
  946.     callstyle = oidl;
  947.     dllname = "pmwp.dll";             /* sahsom2 */
  948.  
  949.  
  950.     //# Method Modifiers
  951.     somUninit: override;
  952.     somInitClass: override;
  953.     somNew: override;
  954.     somRenew: override;
  955.  
  956.     //# Data Modifiers
  957.  
  958.  
  959.   };
  960. #endif /* __SOMIDL__ */
  961. };
  962.  
  963. #endif  /* wpobject_idl */
  964.