home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / os2tk20 / sc / wpobject.sc_ / WPOBJECT.SC
Encoding:
Text File  |  1992-10-05  |  32.7 KB  |  932 lines

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