home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pdd.zip / PMCX.H < prev    next >
Text File  |  1998-03-05  |  6KB  |  150 lines

  1.  
  2. /* pmcx.h       Created:    1993-12-14  Revised:    1994-09-18    */
  3.  
  4. /* PM Control Extensions (PMCX)                        */
  5. /* Definitions Header                            */
  6.  
  7. /* ConsultUser's Guide for complete description of PM Control           */
  8. /* Extensions                                */
  9.  
  10. /* Copyright ╕ 1989-1994  Prominare Inc.  All Rights Reserved.        */
  11.  
  12. /* --------------------------------------------------------------------    */
  13.  
  14. /* Function Prototypes (32-bit definition)                */
  15. /* -------------------                            */
  16. /*                                    */
  17. /*     Control Initialization:                        */
  18. /*                                    */
  19. /*       BOOL    EXPENTRY XxxxRegister(HAB hAB);                */
  20. /*                                    */
  21. /*     Styles Dialogue Procedures:                    */
  22. /*                                    */
  23. /*       MRESULT EXPENTRY XxxxStyles(HWND hWnd, ULONG    msg,        */
  24. /*                       MPARAM mp1, MPARAM mp2);        */
  25. /*                                    */
  26. /*     Window Procedure:                        */
  27. /*                                    */
  28. /*       MRESULT EXPENTRY XxxxWndProc(HWND hWnd, ULONG msg,        */
  29. /*                    MPARAM mp1, MPARAM mp2);    */
  30. /*                                    */
  31. /*     Control Information Procedure:                    */
  32. /*                                    */
  33. /*       BOOL    EXPENTRY XxxxQuery(PUSERINFO pUserInfo);        */
  34.  
  35. /* --- Constant    Definitions -------------------------------------------    */
  36.  
  37. #define    CTYPES            1       /* Maximum Number of    User Types    */
  38. #define    CCHCLASS       32       /* Maximum Classname    Length        */
  39. #define    CCHNAME           32       /* Maximum Name Length        */
  40. #define    CCHAUTHOR       64       /* Maximum Author Name Length    */
  41. #define    CCHDESC           32       /* Maximum Type Description Length    */
  42. #define    CCHID           32       /* Maximum ID Symbol    Length        */
  43. #define    CCHTEXTMAX      512       /* Maximum Control Text Length    */
  44.  
  45. #define    UTYPE_PRIVATE  0x0002       /* Type:  Private            */
  46. #define    UTYPE_PUBLIC   0x0004       /* Type:  Public            */
  47.  
  48. #define    USER_CWINDOWWORDS   8UL       /* Control Reserved Memory Size    */
  49.  
  50. #define    QWW_USER  (QWL_USER + 0UL) /* Pointer to User Data        */
  51. #define    QWW_CDATA (QWL_USER + 4UL) /* Pointer to Private Data Pointer    */
  52.  
  53. #define    CUACHK_MNEMONIC       0       /* CUA Check:  Mnemonic        */
  54. #define    CUACHK_CAPS       1       /* CUA Check:  Capitalization    */
  55. #define    CUACHK_ELLIPSIS       2       /* CUA Check:  Ellipsis        */
  56.  
  57. #define    STYLETYPE_BITFLAGS 0x0001  /* Style Type:  Bit Flags        */
  58. #define    STYLETYPE_SEQUENCE 0x0002  /* Style Type:  Sequential        */
  59.  
  60. #define    PMCXOPT_NONE      0x00000000UL
  61. #define    PMCXOPT_REFRESH      0x00000001UL
  62. #define    PMCXOPT_VARICDATA 0x00000002UL
  63. #define    PMCXOPT_STYLECHG  0x00000004UL
  64. #define    PMCXOPT_TABABLE      0x00000008UL
  65. #define    PMCXOPT_HELP      0x00000010UL
  66. #define    PMCXOPT_PAGE      0x00000020UL
  67.  
  68. /************************************************************************/
  69. /************************************************************************/
  70. /*                                    */
  71. /*     PMCX 32-Bit Structure Definitions                */
  72. /*                                    */
  73. /************************************************************************/
  74. /************************************************************************/
  75.  
  76. /* --- User Control Styles Structure ----------------------------------    */
  77.  
  78. typedef    struct _STYLE           /* st */
  79.    {                   /* Size:    8 bytes            */
  80.    ULONG    flStyleMask;       /* Style Flag Mask            */
  81.    ULONG    idStyle;           /* Resource String ID        */
  82.    } STYLE ;
  83.  
  84. /* --- User Control Type Structure ------------------------------------    */
  85.  
  86. typedef    struct _USERTYPE       /* ut */
  87.    {                   /* Size:  348 bytes            */
  88.    LONG        cx;               /* Suggested    Width of Control    */
  89.    LONG        cy;               /* Suggested    Height of Control    */
  90.    ULONG    flStyle;           /* Initial Style Flags        */
  91.    ULONG    flOptions;           /* Options Flag            */
  92.    ULONG    cMaxText;           /* Maximum Text Required        */
  93.    ULONG    idDlg;           /* Dialog ID                */
  94.    ULONG    idReserved;           /* Reserved                */
  95.    ULONG    flStyleType;       /* Style Type            */
  96.    ULONG    cCtlData;           /* Control Data Count        */
  97.    ULONG    ulType;           /* Control Type            */
  98.    ULONG    cMasks;           /* Style Masks Count            */
  99.    CHAR        szDescription[CCHDESC];/* Control Name            */
  100.    STYLE    stMasks[32];       /* Style Masks Array            */
  101.    ULONG    aulReserved[4];       /* Reserved                */
  102.    } USERTYPE ;
  103.  
  104. /* --- User Control Information    Structure -----------------------------    */
  105.  
  106. typedef    struct _USERINFO       /* ui */
  107.    {                   /* Size:  512 bytes            */
  108.    ULONG     ulMajor;           /* Control Version Number:  Major    */
  109.    ULONG     ulMinor;           /* Control Version Number:  Minor    */
  110.    CHAR         szAuthor[CCHAUTHOR];  /* Control Author            */
  111.    CHAR         szClassname[CCHCLASS];/* Classname                */
  112.    CHAR         szName[CCHNAME];       /* Library Name            */
  113.    ULONG     aulReserved[6];       /* Reserved                */
  114.    ULONG     cTypes;           /* Number of    Control    Types Supported    */
  115.    USERTYPE  utDefined[CTYPES];       /* Define User Types    Array        */
  116.    } USERINFO ;
  117.  
  118. typedef    USERINFO *PUSERINFO;
  119.  
  120. /* --- User Control Style Structure -----------------------------------    */
  121.  
  122. typedef    struct _USERSTYLE       /* ust */
  123.    {                   /* Size:  112 bytes            */
  124.    PFN        pfnSetSymbolID;       /* Symbol/ID    Set Function Address    */
  125.    PFN        pfnGetSymbolID;       /* Symbol/ID    Get Function Address    */
  126.    PFN        pfnGetFontClr;       /* Font/Colours Function Address    */
  127.    PFN        pfnCUACheck;       /* CUA Compliance Function Address    */
  128.    PFN        pfnRealloc;           /* Reallocation Function Address    */
  129.    ULONG    flStyle;           /* Style                */
  130.    ULONG    id;               /* ID Value                */
  131.    CHAR        szid[CCHID];       /* ID Symbol                */
  132.    PSZ        pszText;           /* Text Pointer            */
  133.    ULONG    cText;           /* Text Count (Including NULL)    */
  134.    PFN        pfnGetBidi;           /* Bidi Params Function Address    */
  135.    ULONG    aulReserved[8];       /* Reserved                */
  136.    PBYTE    pbCtlData;           /* Variable Control Data Pointer    */
  137.    ULONG    cbCtlData;           /* Control Data Size            */
  138.    BYTE        abCtlData[1];       /* Control Data            */
  139.    } USERSTYLE ;
  140.  
  141. typedef    USERSTYLE *PUSERSTYLE;
  142.  
  143. /* --- Macro Helpers for Setting or Retrieving User Style Pointer ------ */
  144.  
  145. #define    PDATATODLG(hwndClient) ((WinSetWindowPtr(hwndClient, QWL_USER,\
  146.     (PVOID)mp2)))
  147.  
  148. #define    PDATAFROMDLG(hwndClient) (((PUSERSTYLE)WinQueryWindowPtr(hwndClient,\
  149.     QWL_USER)))
  150.