home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xceptn.zip / CCLS32.H < prev    next >
Text File  |  1994-08-23  |  13KB  |  284 lines

  1.  
  2. /* ccls32.h       Created:    1990-10-30  Revised:    1993-11-30    */
  3.  
  4. /* Prominare Designer Custom Control Library Specification (CCLS32)    */
  5. /* Version 2.1c                                */
  6. /* Definitions Header                            */
  7.  
  8. /* Consult Section 2 within the    Prominare Development System        */
  9. /* Programming Guide for complete description of Custom    Control        */
  10. /* Library Specification                        */
  11.  
  12. /* Changes are denoted by a 2.1     in comments beside the    changes        */
  13. /* Changes are denoted by a 2.1c in comments beside the    changes        */
  14.  
  15. /* Copyright ╕ 1989-1994  Prominare Inc.  All Rights Reserved.        */
  16.  
  17. /* --------------------------------------------------------------------    */
  18.  
  19. /* Function Prototypes (16-bit definition)                */
  20. /* -------------------                            */
  21. /*                                    */
  22. /*     Control Initialization:                        */
  23. /*                                    */
  24. /*       BOOL    EXPENTRY XxxxInit(HAB hAB, HMODULE hmodDLL);        */
  25. /*                                    */
  26. /*     Styles Dialog Procedures:                    */
  27. /*                                    */
  28. /*       MRESULT EXPENTRY XxxxDlgProc(HWND hWnd, ULONG msg,        */
  29. /*                    MPARAM mp1, MPARAM mp2);    */
  30. /*       MRESULT EXPENTRY XxxxAnalystDlgProc(HWND hWnd, ULONG    msg,    */
  31. /*                           MPARAM mp1, MPARAM mp2);    */
  32. /*                                    */
  33. /*     Window Procedure:                        */
  34. /*                                    */
  35. /*       MRESULT EXPENTRY XxxxWndProc(HWND hWnd, ULONG msg,        */
  36. /*                    MPARAM mp1, MPARAM mp2);    */
  37. /*                                    */
  38. /*     Control Information Procedure:                    */
  39. /*                                    */
  40. /*       BOOL    EXPENTRY XxxxQueryInfo(PUSERINFO pUserInfo);        */
  41. /*                                    */
  42. /* Function Prototypes (32-bit definition)                */ /* 2.1c */
  43. /* -------------------                            */ /* 2.1c */
  44. /*                                    */ /* 2.1c */
  45. /*     Control Initialization:                        */ /* 2.1c */
  46. /*                                    */ /* 2.1c */
  47. /*       BOOL    EXPENTRY XxxxRegister(HAB hAB);                */ /* 2.1c */
  48. /*                                    */ /* 2.1c */
  49. /*     Styles Dialog Procedures:                    */ /* 2.1c */
  50. /*                                    */ /* 2.1c */
  51. /*       MRESULT EXPENTRY XxxxStyles(HWND hWnd, ULONG    msg,        */ /* 2.1c */
  52. /*                       MPARAM mp1, MPARAM mp2);        */ /* 2.1c */
  53. /*       MRESULT EXPENTRY XxxxAnalystStyles(HWND hWnd, ULONG msg,    */ /* 2.1c */
  54. /*                          MPARAM mp1, MPARAM mp2);    */ /* 2.1c */
  55. /*                                    */ /* 2.1c */
  56. /*     Window Procedure:                        */ /* 2.1c */
  57. /*                                    */ /* 2.1c */
  58. /*       MRESULT EXPENTRY XxxxWndProc(HWND hWnd, ULONG msg,        */ /* 2.1c */
  59. /*                    MPARAM mp1, MPARAM mp2);    */ /* 2.1c */
  60. /*                                    */ /* 2.1c */
  61. /*     Control Information Procedure:                    */ /* 2.1c */
  62. /*                                    */ /* 2.1c */
  63. /*       BOOL    EXPENTRY XxxxQuery(PUSERINFO32 pUserInfo);        */ /* 2.1c */
  64.  
  65. /* --- Constant    Definitions -------------------------------------------    */
  66.  
  67. #define    USERTYPES       32       /* Maximum Number of    User Types    */
  68. #define    CTYPES            1       /* Maximum Number of    User Types    */ /* 2.1c */
  69. #define    CCHCLASS       32       /* Maximum Classname    Length        */
  70. #define    CCHNAME           32       /* Maximum Name Length        */
  71. #define    CCHAUTHOR       64       /* Maximum Author Name Length    */
  72. #define    CCHDESC           32       /* Maximum Type Description Length    */
  73. #define    CCHID           32       /* Maximum ID Symbol    Length        */
  74. #define    CCHTEXT          128       /* Maximum Control Text Length    */
  75. #define    CCHTEXTMAX      512       /* Maximum Control Text Length    */ /* 2.1c */
  76.  
  77. #define    UTYPE_PRIVATE  0x0002       /* Type:  Private            */
  78. #define    UTYPE_PUBLIC   0x0004       /* Type:  Public            */
  79.  
  80. #define    USER_RESERVED       16       /* Control Reserved Memory Size    */
  81. #define    USER_CWINDOWWORDS   8UL       /* Control Reserved Memory Size    */ /* 2.1c */
  82.  
  83. #define    QUCWP_STYLE (QWL_USER +     4)/* Pointer to Styles    Flag        */
  84. #define    QUCWP_HEAP  (QWL_USER +     8)/* Pointer to Heap Handle        */
  85. #define    QUCWP_WNDP  (QWL_USER +    12)/* Pointer to Heap Pointer        */
  86.  
  87. #define    QWW_USER  (QWL_USER + 0UL) /* Pointer to User Data        */ /* 2.1c */
  88. #define    QWW_CDATA (QWL_USER + 4UL) /* Pointer to Private Data Pointer    */ /* 2.1c */
  89.  
  90. #define    SAACHK_MNEMONIC       0       /* SAA Check:  Mnemonic        */
  91. #define    SAACHK_CAPS       1       /* SAA Check:  Capitalization    */
  92. #define    SAACHK_ELLIPSIS       2       /* SAA Check:  Ellipsis        */
  93.  
  94. #define    STYLETYPE_BITFLAGS 0x0001  /* Style Type:  Bit Flags        */
  95. #define    STYLETYPE_SEQUENCE 0x0002  /* Style Type:  Sequential        */
  96.  
  97. #define    CCLSOPT_NONE      0x00000000UL                       /* 2.1 */
  98. #define    CCLSOPT_REFRESH      0x00000001UL                       /* 2.1 */
  99. #define    CCLSOPT_VARICDATA 0x00000002UL                       /* 2.1 */
  100. #define    CCLSOPT_STYLECHG  0x00000004UL                       /* 2.1c */
  101. #define    CCLSOPT_TABABLE      0x00000008UL                       /* 2.1c */
  102. #define    CCLSOPT_HELP      0x00000010UL                       /* 2.1c */
  103.  
  104. /************************************************************************/
  105. /************************************************************************/
  106. /*                                    */
  107. /*     CCLS 32-Bit Structure Definitions                */
  108. /*                                    */
  109. /************************************************************************/
  110. /************************************************************************/
  111.  
  112. /* --- User Control Styles Structure ----------------------------------    */ /* 2.1c */
  113.                                        /* 2.1c */
  114. typedef    struct _STYLE32           /* st32 */                   /* 2.1c */
  115.    {                   /* Size:    8 bytes            */ /* 2.1c */
  116.    ULONG    flStyleMask;       /* Style Flag Mask            */ /* 2.1c */
  117.    ULONG    idStyle;           /* Resource String ID        */ /* 2.1c */
  118.    } STYLE32 ;                                   /* 2.1c */
  119.                                        /* 2.1c */
  120. /* --- User Control Type Structure ------------------------------------    */ /* 2.1c */
  121.                                        /* 2.1c */
  122. typedef    struct _USERTYPE32       /* ut32 */                   /* 2.1c */
  123.    {                   /* Size:  348 bytes            */ /* 2.1c */
  124.    LONG        cx;               /* Suggested    Width of Control    */ /* 2.1c */
  125.    LONG        cy;               /* Suggested    Height of Control    */ /* 2.1c */
  126.    ULONG    flStyle;           /* Initial Style Flags        */ /* 2.1c */
  127.    ULONG    flOptions;           /* Options Flag            */ /* 2.1c */
  128.    ULONG    cMaxText;           /* Maximum Text Required        */ /* 2.1c */
  129.    ULONG    idDlg;           /* Dialog ID                */ /* 2.1c */
  130.    ULONG    idDlgAnalyst;       /* Dialog ID    (Analyst Version)    */ /* 2.1c */
  131.    ULONG    flStyleType;       /* Style Type            */ /* 2.1c */
  132.    ULONG    cCtlData;           /* Control Data Count        */ /* 2.1c */
  133.    ULONG    ulType;           /* Control Type            */ /* 2.1c */
  134.    ULONG    cMasks;           /* Style Masks Count            */ /* 2.1c */
  135.    CHAR        szDescription[CCHDESC];/* Control Name            */ /* 2.1c */
  136.    STYLE32  stMasks[32];       /* Style Masks Array            */ /* 2.1c */
  137.    ULONG    aulReserved[4];       /* Reserved                */ /* 2.1c */
  138.    } USERTYPE32    ;                               /* 2.1c */
  139.                                        /* 2.1c */
  140. /* --- User Control Information    Structure -----------------------------    */ /* 2.1c */
  141.                                        /* 2.1c */
  142. typedef    struct _USERINFO32       /* ui32 */                   /* 2.1c */
  143.    {                   /* Size:  512 bytes            */ /* 2.1c */
  144.    ULONG      ulMajor;           /* Control Version Number:  Major    */ /* 2.1c */
  145.    ULONG      ulMinor;           /* Control Version Number:  Minor    */ /* 2.1c */
  146.    CHAR          szAuthor[CCHAUTHOR]; /* Control Author            */ /* 2.1c */
  147.    CHAR          szClassname[CCHCLASS];   /* Classname            */ /* 2.1c */
  148.    CHAR          szName[CCHNAME];       /* Library Name            */ /* 2.1c */
  149.    ULONG      aulReserved[6];       /* Reserved                */ /* 2.1c */
  150.    ULONG      cTypes;           /* Number of    Control    Types Supported    */ /* 2.1c */
  151.    USERTYPE32 utDefined[CTYPES];   /* Define User Types    Array        */ /* 2.1c */
  152.    } USERINFO32    ;                               /* 2.1c */
  153.                                        /* 2.1c */
  154. typedef    USERINFO32 *PUSERINFO32;                       /* 2.1c */
  155.                                        /* 2.1c */
  156. /* --- User Control Style Structure -----------------------------------    */ /* 2.1c */
  157.                                        /* 2.1c */
  158. typedef    struct _USERSTYLE32       /* ust32 */                   /* 2.1c */
  159.    {                   /* Size:  112 bytes            */ /* 2.1c */
  160.    PFN        pfnLookupSymbol;       /* Lookup Symbol Function Address    */ /* 2.1c */
  161.    PFN        pfnValidateSymbol;       /* Validate Symbol Function Address    */ /* 2.1c */
  162.    PFN        pfnGetPresParams;       /* Pres Params Function Address    */ /* 2.1c */
  163.    PFN        pfnSAACheck;       /* SAA Compliance Function Address    */ /* 2.1c */
  164.    PFN        pfnRealloc;           /* Reallocation Function Address    */ /* 2.1c */
  165.    ULONG    flStyle;           /* Style                */ /* 2.1c */
  166.    ULONG    id;               /* ID Value                */ /* 2.1c */
  167.    CHAR        szid[CCHID];       /* ID Symbol                */ /* 2.1c */
  168.    PSZ        pszText;           /* Text Pointer            */ /* 2.1c */
  169.    ULONG    cText;           /* Text Count (Including NULL)    */ /* 2.1c */
  170.    ULONG    aulReserved[9];       /* Reserved                */ /* 2.1c */
  171.    PBYTE    pbCtlData;           /* Variable Control Data Pointer    */ /* 2.1c */
  172.    ULONG    cbCtlData;           /* Control Data Size            */ /* 2.1c */
  173.    BYTE        abCtlData[1];       /* Control Data            */ /* 2.1c */
  174.    } USERSTYLE32 ;                               /* 2.1c */
  175.                                        /* 2.1c */
  176. typedef    USERSTYLE32 *PUSERSTYLE32;                       /* 2.1c */
  177.  
  178. #define    IDBM_SETIDSYMBOLVALUE        0x019bUL
  179.  
  180. /* ====================================================================    */
  181. /* === CCLS 16-Bit Structure Definitions ==============================    */
  182. /* ====================================================================    */
  183.  
  184. #pragma    pack(1)
  185.  
  186. /* --- User Control Styles Structure ----------------------------------    */
  187.  
  188. typedef    struct _STYLE           /* st */
  189.    {
  190.    ULONG    flStyleMask;       /* Style Flag Mask            */
  191.    SHORT    idStyle;           /* Resource String ID        */
  192.    } STYLE ;
  193.  
  194. /* --- User Control Type Structure ------------------------------------    */
  195.  
  196. typedef    struct _USERTYPE       /* ut */
  197.    {
  198.    SHORT    cx;               /* Suggested    Width of Control    */
  199.    SHORT    cy;               /* Suggested    Height of Control    */
  200.    ULONG    flStyle;           /* Initial Style Flags        */
  201.    SHORT    idDlg;           /* Dialog ID                */
  202.    CHAR        szDescription[CCHDESC];/* Control Name            */
  203.    ULONG    aulReserved[2];       /* Reserved                */ /* 2.1 */
  204.    ULONG    flOptions;           /* Options Flag            */ /* 2.1 */
  205.    USHORT   cMaxText;           /* Maximum Text Required        */
  206.    SHORT    idDlgAnalyst;       /* Dialog ID    (Analyst Version)    */
  207.    USHORT   fsStyleType;       /* Style Type            */
  208.    USHORT   usReserved;           /* Reserved                */
  209.    SHORT    cCtlData;           /* Control Data Count        */
  210.    USHORT   usType;           /* Control Type            */
  211.    USHORT   cMasks;           /* Style Masks Count            */
  212.    STYLE    stMasks[32];       /* Style Masks Array            */
  213.    } USERTYPE ;
  214.  
  215. /* --- User Control Information    Structure -----------------------------    */
  216.  
  217. typedef    struct _USERINFO       /* ui */
  218.    {
  219.    BYTE        bMajor;           /* Control Version Number:  Major    */
  220.    BYTE        bMinor;           /* Control Version Number:  Minor    */
  221.    CHAR        szAuthor[CCHAUTHOR];   /* Control Author            */
  222.    CHAR        szClassname[CCHCLASS]; /* Classname                */
  223.    CHAR        szName[CCHNAME];       /* Library Name            */
  224.    ULONG    aulReserved[4];       /* Reserved                */
  225.    USHORT   cTypes;           /* Number of    Control    Types Supported    */
  226.    USERTYPE utDefined[USERTYPES];  /* Define User Types    Array        */
  227.    } USERINFO ;
  228.  
  229. typedef    USERINFO *PUSERINFO;
  230.  
  231. /* --- User Control Style Structure -----------------------------------    */
  232.  
  233. typedef    struct _USERSTYLE       /* ust */
  234.    {
  235.    PFN        pfnLookupSymbol;       /* Lookup Symbol Function Address    */
  236.    PFN        pfnValidateSymbol;       /* Validate Symbol Function Address    */
  237.    PFN        pfnGetPresParams;       /* Pres Params Function Address    */
  238.    PFN        pfnSAACheck;       /* SAA Compliance Function Address    */
  239.    PFN        pfnRealloc;           /* Reallocation Function Address    */ /* 2.1 */
  240.    ULONG    aulReserved1[3];       /* Reserved                */ /* 2.1 */
  241.    ULONG    flStyle;           /* Style                */
  242.    SHORT    id;               /* ID Value                */
  243.    CHAR        szid[CCHID];       /* ID Symbol                */
  244.    PSZ        pszText;           /* Text Pointer            */
  245.    USHORT   cText;           /* Text Count (Including NULL)    */
  246.    ULONG    aulReserved2[8];       /* Reserved                */ /* 2.1 */
  247.    PBYTE    pbCtlData;           /* Variable Control Data Pointer    */ /* 2.1 */
  248.    ULONG    cbCtlData;           /* Control Data Size            */ /* 2.1 */
  249.    BYTE        abCtlData[1];       /* Control Data            */
  250.    } USERSTYLE ;
  251.  
  252. typedef    USERSTYLE *PUSERSTYLE;
  253.  
  254. #pragma    pack( )
  255.  
  256. /* --- Macro Helpers for Setting or Retrieving User Style Pointer ------ */
  257.  
  258. #define    PDATATODLG(hwndClient) ((WinSetWindowPtr(hwndClient, QWL_USER,\
  259.     (PVOID)mp2)))
  260.  
  261. #define    PDATAFROMDLG(hwndClient) (((PUSERSTYLE)WinQueryWindowPtr(hwndClient,\
  262.     QWL_USER)))
  263.  
  264. #define    PDATA32FROMDLG(hwndClient) (((PUSERSTYLE32)WinQueryWindowPtr(hwndClient,\
  265.     QWL_USER)))
  266.  
  267. #ifdef __IBMC__
  268.  
  269. typedef    VOID  (* EXPENTRY PFNLOOKUPSYMBOL)(HWND, SHORT,    SHORT);
  270. typedef    BOOL  (* EXPENTRY PFNVALIDATESYMBOL)(HWND, SHORT, SHORT);
  271. typedef    VOID  (* EXPENTRY PFNGETPRESPARAMS)(HWND);
  272. typedef    BOOL  (* EXPENTRY PFNSAACHECK)(HWND, SHORT, INT);
  273. typedef    PVOID (* EXPENTRY PFNREALLOC)(PVOID, INT);
  274.  
  275. #else
  276.  
  277. typedef    VOID  (EXPENTRY    *PFNLOOKUPSYMBOL)(HWND,    SHORT, SHORT);
  278. typedef    BOOL  (EXPENTRY    *PFNVALIDATESYMBOL)(HWND, SHORT, SHORT);
  279. typedef    VOID  (EXPENTRY    *PFNGETPRESPARAMS)(HWND);
  280. typedef    BOOL  (EXPENTRY    *PFNSAACHECK)(HWND, SHORT, INT);
  281. typedef    PVOID (EXPENTRY    *PFNREALLOC)(PVOID, INT);
  282.  
  283. #endif
  284.