home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xwplascr.zip / XWPL0208.ZIP / idl / xtrash.idl < prev    next >
Text File  |  2002-07-15  |  7KB  |  243 lines

  1.  
  2. /*
  3.  * xtrash.idl:
  4.  *      SOM interface description file for the following
  5.  *      XWorkplace classes (in this order):
  6.  *
  7.  *      --  XWPTrashCan: a subclass of WPFolder, which implements
  8.  *                       the actual trash can folder.
  9.  *
  10.  *      See src\classes\xtrash.c for details.
  11.  *
  12.  *      Copyright (C) 1999-2002 Ulrich Möller.
  13.  *      This file is part of the XWorkplace source package.
  14.  *      XWorkplace is free software; you can redistribute it and/or modify
  15.  *      it under the terms of the GNU General Public License as published
  16.  *      by the Free Software Foundation, in version 2 as it comes in the
  17.  *      "COPYING" file of the XWorkplace main distribution.
  18.  *      This program is distributed in the hope that it will be useful,
  19.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  *      GNU General Public License for more details.
  22.  */
  23.  
  24. #include <wpfolder.idl>         // this is SOM for WPFolder
  25.  
  26. /*
  27.    CLASS: XWPTrashCan
  28.  
  29.    CLASS HIERARCHY:
  30.  
  31.        SOMObject
  32.          └── WPObject [ = XFldObject ]
  33.                └── WPFileSystem
  34.                      └── WPFolder [ = XFolder ]
  35.                            └── XWPTrashCan
  36. */
  37.  
  38. interface M_XWPTrashCan;            // forward reference to metaclass
  39.  
  40. interface XWPTrashCan : WPFolder
  41. {
  42.  
  43.     /*
  44.      * New instance methods for XWPTrashCan:
  45.      *
  46.      */
  47.  
  48.     BOOL xwpDeleteIntoTrashCan(in WPObject pObject);
  49.  
  50.     ULONG xwpAddTrashCanSettingsPage(in HWND hwndDlg);
  51.     ULONG xwpAddTrashCanDrivesPage(in HWND hwndDlg);
  52.     ULONG xwpAddTrashCanGeneralPage(in HWND hwndDlg);
  53.  
  54.     BOOL xwpTrashCanBusy(in LONG lBusy);
  55.     VOID xwpAddObjectSize(in ULONG ulNewSize);
  56.     ULONG xwpQueryTrashObjectsCount();
  57.  
  58.     BOOL xwpSetCorrectTrashIcon(in BOOL fForce);
  59.  
  60.     ULONG xwpEmptyTrashCan(in ULONG hab,
  61.                            in PULONG pulDeleted,
  62.                            in HWND hwndConfirmOwner);
  63.  
  64.     BOOL xwpProcessObjectCommand(in USHORT usCommand,
  65.                                  in HWND hwndCnr,
  66.                                  in WPObject pFirstObject,
  67.                                  in ULONG ulSelectionFlags);
  68.  
  69.     BOOL xwpUpdateStatusBar(in HWND hwndStatusBar, in HWND hwndCnr);
  70.  
  71. #ifdef __SOMIDL__
  72.   implementation {
  73.  
  74.     releaseorder:
  75.             xwpDeleteIntoTrashCan,
  76.             xwpAddTrashCanSettingsPage,
  77.             xwpAddTrashCanDrivesPage,
  78.             xwpAddTrashCanGeneralPage,
  79.             xwpTrashCanBusy,
  80.             xwpAddObjectSize,
  81.             xwpQueryTrashObjectsCount,
  82.             xwpSetCorrectTrashIcon,
  83.             xwpEmptyTrashCan,
  84.             xwpUpdateStatusBar,
  85.             xwpProcessObjectCommand;
  86.  
  87.     /*
  88.      * Class Modifiers:
  89.      *
  90.      */
  91.  
  92.     externalprefix = xtrc_;
  93.     externalstem = xtrc;
  94.     majorversion = 1;
  95.     minorversion = 1;
  96.     filestem = xtrash;           //# specifies the filestem for sc-generated files
  97.     metaclass = M_XWPTrashCan;
  98.     dllname = "xfldr.dll";
  99.     callstyle = oidl;           //# forget CORBA stuff (*ev and such)
  100.  
  101.     /*
  102.      * Internal instance variables for XWPTrashCan:
  103.      *
  104.      */
  105.  
  106.     BOOL    fAlreadyPopulated;      // TRUE after the first call to wpPopulate
  107.     BOOL    fFilledIconSet;         // TRUE if "filled" icon has been set already
  108.  
  109.     ULONG   ulTrashObjectCount;     // no. of trash objects in trash can;
  110.                                     // initialized to 0, updated by wpPopulate
  111.  
  112.     double  dSizeOfAllObjects;      // size of all objects in trash can
  113.  
  114.     CHAR    cDrivePopulating;       // if this is != 0, a drive is currently
  115.                                     // being populated; set by wpPopulate and
  116.                                     // used for the status bar
  117.  
  118.     ULONG   ulBusyCount;            // raised or lowered with every xwpTrashCanBusy call
  119.  
  120.     // HPOINTER    hptrEmpty;          // icon for empty trash can
  121.     // HPOINTER    hptrFull;           // icon for full trash can
  122.             // removed those V0.9.16 (2002-01-01) [umoeller]
  123.  
  124.     BOOL    fOpeningSettings;       // TRUE while in wpOpen for settings view
  125.  
  126.     /*
  127.      * WPFolder methods overridden by XWPTrashCan:
  128.      *
  129.      */
  130.  
  131.     wpInitData: override;
  132.     wpObjectReady: override;
  133.     wpUnInitData: override;
  134.  
  135.     wpSaveState: override;
  136.     wpRestoreState: override;
  137.  
  138.     wpSetup: override;
  139.  
  140.     wpFilterPopupMenu: override;
  141.     wpModifyPopupMenu: override;
  142.     wpMenuItemSelected: override;
  143.     wpMenuItemHelpSelected: override;
  144.  
  145. //#    wpQueryDefaultHelp: override;    replaced with class method V0.9.20 (2002-07-12) [umoeller]
  146.  
  147.     wpOpen: override;
  148.     wpPopulate: override;
  149.     wpRefresh: override;
  150.  
  151.     wpAddToContent: override;
  152.     wpDeleteFromContent: override;
  153.  
  154.     wpDeleteContents: override;
  155.  
  156.     wpDragOver: override;
  157.     wpDrop: override;
  158.  
  159.     wpAddObjectGeneralPage: override;
  160.     wpAddObjectGeneralPage2: override;
  161.     wpAddFolderIncludePage: override;
  162.     wpAddFolderSelfClosePage: override;
  163.     wpAddFolderView2Page: override;
  164.  
  165.     wpAddSettingsPages: override;
  166.  
  167.     wpSetIcon: override;
  168.  
  169. #ifdef __PRIVATE__
  170.  
  171. #endif
  172.  
  173.   }; // implementation
  174. #endif /* __SOMIDL__ */
  175. };
  176.  
  177. //#
  178. //#
  179. //# Now define Metaclass.
  180. //# ---------------------
  181. //#
  182.  
  183. interface M_XWPTrashCan : M_WPFolder
  184. {
  185.  
  186.     /*
  187.      * New class methods for M_XWPTrashCan:
  188.      *
  189.      */
  190.  
  191.     XWPTrashCan xwpclsQueryDefaultTrashCan();
  192.     BOOL xwpclsSetDrivesSupport(in PBYTE pabSupportedDrives);
  193.     BOOL xwpclsQueryDrivesSupport(in PBYTE pabSupportedDrives);
  194.  
  195. #ifdef __SOMIDL__
  196.   implementation {
  197.  
  198.     releaseorder: xwpclsQueryDefaultTrashCan,
  199.                   xwpclsSetDrivesSupport,
  200.                   xwpclsQueryDrivesSupport;
  201.  
  202.     /*
  203.      * Class Modifiers:
  204.      *
  205.      */
  206.  
  207.     externalprefix = xtrcM_;
  208.     externalstem = xtrcM;
  209.     functionprefix = xtrcM_;
  210.     majorversion = 1;
  211.     minorversion = 1;
  212.     filestem = xtrash;           //# specifies the filestem for sc-generated files
  213.     dllname = "xfldr.dll";
  214.     callstyle = oidl;
  215.  
  216.     /*
  217.      * Internal instance variables for M_XWPTrashCan:
  218.      *
  219.      */
  220.  
  221.     /*
  222.      * M_WPFolder methods overridden by M_XWPTrashCan:
  223.      *
  224.      */
  225.  
  226.     wpclsInitData: override;
  227.     wpclsUnInitData: override;
  228.  
  229.     wpclsCreateDefaultTemplates: override;
  230.  
  231.     wpclsQueryTitle: override;
  232.     wpclsQueryStyle: override;
  233.     wpclsQueryDefaultHelp: override;
  234.  
  235.     wpclsQueryIconData: override;
  236.     wpclsQueryIconDataN: override;
  237.  
  238.   };
  239. #endif /* __SOMIDL__ */
  240. };
  241.  
  242.  
  243.