home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / iwftech.zip / headers / WKFPRJ.H < prev   
Text File  |  1994-07-21  |  21KB  |  332 lines

  1. /****************************************************************************/
  2. /* Integration Kit for IBM* WorkFrame/2* Version 2.1                        */
  3. /*                                                                          */
  4. /* The integration kit contains an information reference and sample         */
  5. /* programs illustrating application programming interfaces to              */
  6. /* provide assistance with product integration into IBM's                   */
  7. /* WorkFrame/2 Version 2.1.                                                 */
  8. /*                                                                          */
  9. /* The information and sample programs are intended only for                */
  10. /* Version 2.1, and are not applicable to any other IBM product or          */
  11. /* product release.                                                         */
  12. /*                                                                          */
  13. /* The integration kit is provided as is, without any warranty of           */
  14. /* merchantibility of fitness for any particular purpose. The kit           */
  15. /* includes sample code. This code has not been tested, and IBM             */
  16. /* makes no representation of its workability or fitness on any             */
  17. /* system.                                                                  */
  18. /*                                                                          */
  19. /* You are permitted to make copies of the whole of this kit,               */
  20. /* including this notice screen. You are also permitted to copy the         */
  21. /* sample programs, and their source, contained in the kit for the          */
  22. /* purpose of running those programs on your system.                        */
  23. /*                                                                          */
  24. /* You may distribute copies of the whole of this kit, or only of the       */
  25. /* sample programs, in any country recognising the copyright of U.S.        */
  26. /* nationals. Any copies distributed by you must include a copy of          */
  27. /* this notice screen.                                                      */
  28. /*                                                                          */
  29. /* IBM will attempt to make future releases of the WorkFrame/2              */
  30. /* product compatible, but cannot guarantee upward compatibility.           */
  31. /*                                                                          */
  32. /* COPYRIGHT: IBM WorkFrame/2 Version 2.1                                   */
  33. /*            (C) COPYRIGHT IBM CORP 1990, 1991, 1992, 1993, 1994           */
  34. /*            LICENSED MATERIALS - PROPERTY OF IBM                          */
  35. /*            REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083         */
  36. /*                                                                          */
  37. /* ------------------------------------------------------------------------ */
  38. /*                                                                          */
  39. /* MODULE:    WKFPRJ.H - Base/Composite project interfaces                  */
  40. /*                                                                          */
  41. /****************************************************************************/
  42.  
  43. #ifndef _WKFPRJ_H_
  44.    #define _WKFPRJ_H_
  45.  
  46.    /* ---------------------------------------------------------------------- */
  47.    /*     Composite Project class name                                       */
  48.    /* ---------------------------------------------------------------------- */
  49.    #define WKF_COMPOSITECLASS  "DDE3Folder"
  50.  
  51.    /* ---------------------------------------------------------------------- */
  52.    /*     Base Project class name                                            */
  53.    /* ---------------------------------------------------------------------- */
  54.    #define WKF_BPROJECTCLASS   "DDE3Project"
  55.  
  56.  
  57.    /* ---------------------------------------------------------------------- */
  58.    /*     Base Project setup string keys                                     */
  59.    /* ---------------------------------------------------------------------- */
  60.    #define WKF_PJIOKEY_APPNAME          "DDE3PROJECT"
  61.    #define WKF_PJIOKEY_DIR              "DIR"
  62.    #define WKF_PJIOKEY_PAM              "PAM"
  63.    #define WKF_PJIOKEY_PROFILE          "PROFILE"
  64.    #define WKF_PJIOKEY_TARGETNAME       "TARGETNAME"
  65.    #define WKF_PJIOKEY_TARGETPATH       "TARGETPATH"
  66.    #define WKF_PJIOKEY_TARGETPARM       "TARGETPARM"
  67.    #define WKF_PJIOKEY_TARGETPROMPT     "TARGETPROMPT"
  68.    #define WKF_PJIOKEY_TARGETTYPE       "TARGETTYPE"
  69.    #define WKF_PJIOKEY_MAKEFILE         "MAKEFILE"
  70.    #define WKF_PJIOKEY_MASK             "MASK"
  71.    #define WKF_PJIOKEY_MONITOR          "MONITOR"
  72.    #define WKF_PJIOKEY_FILEMENU         "FILEMENU"
  73.    #define WKF_PJIOKEY_PROJECTMENU      "PROJECTMENU"
  74.    #define WKF_PJIOKEY_OPENACTION       "OPENACTION"
  75.    #define WKF_PJIOKEY_EXECACTION       "EXECACTION"
  76.    #define WKF_PJIOKEY_PATHNAME_ADDR    "PATHNAME_ADDR"
  77.  
  78.  
  79.    /* ---------------------------------------------------------------------- */
  80.    /* AF  04/13/94 - Added these                                             */
  81.    /*     Composite Project setup string keys                                */
  82.    /* ---------------------------------------------------------------------- */
  83.    #define WKF_PJRF_SEQUENCE            "SEQUENCE"
  84.    #define WKF_PRJF_TARGET              "TARGET"
  85.  
  86.  
  87.    /* ---------------------------------------------------------------------- */
  88.    /*    Target program types.                                               */
  89.    /* ---------------------------------------------------------------------- */
  90.    #define WKF_PJIOPROG_FULLSCREEN      "FULLSCREEN"
  91.    #define WKF_PJIOPROG_WINDOW          "WINDOW"
  92.    #define WKF_PJIOPROG_MONITOR         "MONITOR"
  93.  
  94.  
  95.    /* ---------------------------------------------------------------------- */
  96.    /*    Monitor option keywords.                                            */
  97.    /* ---------------------------------------------------------------------- */
  98.    #define WKF_PJIOMON_AUTOCLOSE        "AUTOCLOSE"
  99.    #define WKF_PJIOMON_MINIMIZE         "MINIMIZE"
  100.    #define WKF_PJIOMON_NOMULTIPLE       "NOMULTIPLE"
  101.  
  102.  
  103.    /* ---------------------------------------------------------------------- */
  104.    /*    Menu type keywords.                                                 */
  105.    /* ---------------------------------------------------------------------- */
  106.    #define WKF_PJIOMENU_SHORT           "REGULAR"
  107.    #define WKF_PJIOMENU_DETAILED        "EXTENDED"
  108.  
  109.  
  110.    /* ---------------------------------------------------------------------- */
  111.    /*    Boolean argument values.                                            */
  112.    /* ---------------------------------------------------------------------- */
  113.    #define WKF_PJIOVALUE_TRUE           "YES"
  114.    #define WKF_PJIOVALUE_FALSE          "NO"
  115.  
  116.  
  117.    /* ---------------------------------------------------------------------- */
  118.    /*    Library module name.                                                */
  119.    /* ---------------------------------------------------------------------- */
  120.    #define WKF_PJIO_MODULE       "DDE3PJIO"
  121.  
  122.  
  123.    /* ---------------------------------------------------------------------- */
  124.    /*    Project file "TYPE" attribute.                                      */
  125.    /* ---------------------------------------------------------------------- */
  126.    #define WKF_PROJECT_TYPE      "WorkFrame/2 Project"
  127.  
  128.  
  129.    /* ---------------------------------------------------------------------- */
  130.    /*     Base Project Data Structure                                        */
  131.    /* ---------------------------------------------------------------------- */
  132.    typedef _Packed struct _WKFBASEPROJECT
  133.            {
  134.            ULONG cb;                           /* structure size             */
  135.            CHAR szPAM[CCHMAXPATH];             /* access method module       */
  136.            CHAR szDirectory[WKF_MAX_PATHLIST]; /* project directory list     */
  137.            CHAR szMask[WKF_MAX_MASKLIST];      /* file mask list             */
  138.            CHAR szTargetName[CCHMAXPATH];      /* target program file name   */
  139.            CHAR szTargetParm[WKF_MAX_PARMLIST];/* target program parameters  */
  140.            BOOL fTargetPrompt;                 /* target prompt required     */
  141.            ULONG ulTargetType;                 /* target program type        */
  142.            ULONG flMonitorFlags;               /* monitor option flags       */
  143.            CHAR szTargetPath[CCHMAXPATH];      /* target path name           */
  144.            CHAR szMakeFile[CCHMAXPATH];        /* make file name             */
  145.            CHAR szProfile[CCHMAXPATH];         /* action profile file name   */
  146.            BOOL fFileDetailMenu;               /* file-scope menu flag       */
  147.            BOOL fProjDetailMenu;               /* project-scope menu flag    */
  148.            CHAR szOpenAction[WKF_MAX_CLASSLEN];/* default open action class  */
  149.            CHAR szExecAction[WKF_MAX_CLASSLEN];/* default exec action class  */
  150.            } WKFBASEPROJECT, *PWKFBASEPROJECT;
  151.  
  152.  
  153.    /*----------------------------------------------------------------------*/
  154.    /* WkfReadProject()                                                     */
  155.    /*                                                                      */
  156.    /* DESCRIPTION:                                                         */
  157.    /*    Read a WorkFrame/2 project file.                                  */
  158.    /*                                                                      */
  159.    /* PARAMETERS:                                                          */
  160.    /*    hAB               Anchor block handle (input).                    */
  161.    /*    pszFileName       Project file name (input).                      */
  162.    /*    pPrjInfo          Pointer to project information data             */
  163.    /*                      structure (input/output).                       */
  164.    /*                                                                      */
  165.    /* RETURN VALUE:                                                        */
  166.    /*    0                 Successful completion.                          */
  167.    /*    Other             Error occurred.                                 */
  168.    /*                                                                      */
  169.    /*----------------------------------------------------------------------*/
  170.    #define WKFREADPROJECT_NAME "WkfReadProject"
  171.  
  172.    typedef APIRET (APIENTRY WKFREADPROJECT) ( PSZ pszFileName,
  173.                                               PWKFBASEPROJECT pPrjInfo );
  174.    typedef WKFREADPROJECT * PWKFREADPROJECT;
  175.  
  176.    WKFREADPROJECT WkfReadProject;
  177.  
  178.    /*----------------------------------------------------------------------*/
  179.    /*                                                                      */
  180.    /* WkfOpenProjectFile()                                                 */
  181.    /* WkfWriteProjectData()                                                */
  182.    /* WkfQueryProjectData()                                                */
  183.    /* WkfCloseProjectFile()                                                */
  184.    /*                                                                      */
  185.    /*----------------------------------------------------------------------*/
  186.    /*                                                                      */
  187.    /* DESCRIPTION:                                                         */
  188.    /*    These functions facilitate the writing and reading of application */
  189.    /*    specific data to and from a project file.                         */
  190.    /*    The application and key names may be any string that the caller   */
  191.    /*    chooses within the following restrictions and guidelines:         */
  192.    /*                                                                      */
  193.    /*        1.  the application name cannot start with the prefix         */
  194.    /*            DDE3 or WKF                                               */
  195.    /*        2.  the key name cannot start with the prefix DDE3 or WKF     */
  196.    /*        3.  The application name should be carefully chosen to        */
  197.    /*            uniquely identify the product which owns the data.        */
  198.    /*            It should uniquely identify the company, and the product  */
  199.    /*            within the company and perhaps even the version number.   */
  200.    /*            For example, IBM_CSETPP_V2 would identify the IBM         */
  201.    /*            C Set++ Version 2 product.                                */
  202.    /*                                                                      */
  203.    /*----------------------------------------------------------------------*/
  204.  
  205.    /*----------------------------------------------------------------------*/
  206.    /* WkfOpenProjectFile()                                                 */
  207.    /*                                                                      */
  208.    /* PARAMETERS:                                                          */
  209.    /*                                                                      */
  210.    /*    HAB   hab         Caller's anchor block handle; if a NULLHANDLE is*/
  211.    /*                      passed then the desktop's anchor block is used  */
  212.    /*    PSZ   pszFileName Project's fully qualified file name             */
  213.    /*    ULONG ulMode      This field is currently ignored in version 2.1  */
  214.    /*                      However, it is recommended that you set the     */
  215.    /*                      access and share modes properly for future      */
  216.    /*                      compatibility.                                  */
  217.    /*                                                                      */
  218.    /*                     WKF_ACCESS_READ     - open project for reading   */
  219.    /*                     WKF_ACCESS_ALL      - open project for read/write*/
  220.    /*                     WKF_SHARE_DENYNONE  - share with all others      */
  221.    /*                     WKF_SHARE_DENYWRITE - allow read access to other */
  222.    /*                     WKF_SHARE_DENYALL   - require exclusive access   */
  223.    /*                                                                      */
  224.    /* RETURN VALUE:  LHANDLE                                               */
  225.    /*                                                                      */
  226.    /*    NULLHANDLE  unable to open project file                           */
  227.    /*    other       project successfully opened                           */
  228.    /*                                                                      */
  229.    /*----------------------------------------------------------------------*/
  230.    #define WKF_ACCESS_READ                0x0000
  231.    #define WKF_ACCESS_ALL                 0x0002
  232.  
  233.    #define WKF_SHARE_DENYNONE             0x0010
  234.    #define WKF_SHARE_DENYWRITE            0x0020
  235.    #define WKF_SHARE_DENYALL              0x0030
  236.  
  237.    #define WKFOPENPROJECTFILE_NAME "WkfOpenProjectFile"
  238.  
  239.    typedef LHANDLE (APIENTRY WKFOPENPROJECTFILE)( HAB   hab,
  240.                                                   PSZ   pszFileName,
  241.                                                   ULONG ulMode );
  242.    typedef WKFOPENPROJECTFILE * PWKFOPENPROJECTFILE;
  243.  
  244.    WKFOPENPROJECTFILE WkfOpenProjectFile;
  245.  
  246.  
  247.    /*----------------------------------------------------------------------*/
  248.    /* WkfWriteProjectData()                                                */
  249.    /*                                                                      */
  250.    /* PARAMETERS:                                                          */
  251.    /*                                                                      */
  252.    /*    LHANDLE hProject   project handle                                 */
  253.    /*    PSZ     pszApp     application name                               */
  254.    /*    PSZ     pszKey     data key                                       */
  255.    /*    PVOID   pBuffer    pointer to data                                */
  256.    /*    ULONG   ulBufLen   size of data block to write                    */
  257.    /*                                                                      */
  258.    /* RETURN VALUE:   BOOL                                                 */
  259.    /*                                                                      */
  260.    /*    TRUE         data written successfully                            */
  261.    /*    FALSE        unable to write data                                 */
  262.    /*                                                                      */
  263.    /*----------------------------------------------------------------------*/
  264.    #define WKFWRITEPROJECTDATA_NAME "WkfWriteProjectData"
  265.  
  266.    typedef BOOL (APIENTRY WKFWRITEPROJECTDATA)( LHANDLE hProject,
  267.                                                 PSZ     pszApp,
  268.                                                 PSZ     pszKey,
  269.                                                 PVOID   pBuffer,
  270.                                                 ULONG   ulBufLen);
  271.    typedef WKFWRITEPROJECTDATA * PWKFWRITEPROJECTDATA;
  272.  
  273.    WKFWRITEPROJECTDATA WkfWriteProjectData;
  274.  
  275.  
  276.    /*----------------------------------------------------------------------*/
  277.    /* WkfQueryProjectData()                                                */
  278.    /*                                                                      */
  279.    /* PARAMETERS:                                                          */
  280.    /*                                                                      */
  281.    /*    LHANDLE hProject     project handle                               */
  282.    /*    PSZ     pszApp       application name                             */
  283.    /*    PSZ     pszKey       data key                                     */
  284.    /*    PVOID   pBuffer      pointer to buffer to return value            */
  285.    /*    PULONG  pulBufLen    pointer to a ulong field; on entry, this     */
  286.    /*                         field should contain the size of the buffer; */
  287.    /*                         on exit, the number of bytes read is         */
  288.    /*                         returned.                                    */
  289.    /*                                                                      */
  290.    /* RETURN VALUE:   BOOL                                                 */
  291.    /*                                                                      */
  292.    /*    TRUE         data read successfully                               */
  293.    /*    FALSE        unable to read requested data                        */
  294.    /*                                                                      */
  295.    /*----------------------------------------------------------------------*/
  296.    #define WKFQUERYPROJECTDATA_NAME "WkfQueryProjectData"
  297.  
  298.    typedef BOOL (APIENTRY WKFQUERYPROJECTDATA)( LHANDLE hProject,
  299.                                                 PSZ     pszApp,
  300.                                                 PSZ     pszKey,
  301.                                                 PVOID   pBuffer,
  302.                                                 PULONG  pulBufLen );
  303.    typedef WKFQUERYPROJECTDATA * PWKFQUERYPROJECTDATA;
  304.  
  305.    WKFQUERYPROJECTDATA WkfQueryProjectData;
  306.  
  307.  
  308.    /*----------------------------------------------------------------------*/
  309.    /* WkfCloseProjectFile()                                                */
  310.    /*                                                                      */
  311.    /*   Close file and release any locks.                                  */
  312.    /*                                                                      */
  313.    /* PARAMETERS:                                                          */
  314.    /*                                                                      */
  315.    /*   LHANDLE hProject   - project handle                                */
  316.    /*                                                                      */
  317.    /* RETURN VALUE:   BOOL                                                 */
  318.    /*                                                                      */
  319.    /*    TRUE         file closed successfully                             */
  320.    /*    FALSE        unable to close file                                 */
  321.    /*                                                                      */
  322.    /*----------------------------------------------------------------------*/
  323.    #define WKFCLOSEPROJECTFILE_NAME "WkfCloseProjectFile"
  324.  
  325.    typedef BOOL (APIENTRY WKFCLOSEPROJECTFILE)( LHANDLE hProject );
  326.    typedef WKFCLOSEPROJECTFILE * PWKFCLOSEPROJECTFILE;
  327.  
  328.    WKFCLOSEPROJECTFILE WkfCloseProjectFile;
  329.  
  330.  
  331. #endif
  332.