home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / PMFKA.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  6KB  |  159 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /*static char *SCCSID = "@(#)pmfka.h    6.2 91/02/12";*/
  14. /*** Public Module *****************************************************\
  15. *
  16. *
  17. * Function Key Areas
  18. * For OS/2 Presentation Manager 1.2
  19. *
  20. * This header contains public definitions of function key area related
  21. * data.
  22. *
  23. \***********************************************************************/
  24.  
  25. #if !(defined(INCL_32) || defined(INCL_16))
  26. #ifdef M_I386
  27.     #define INCL_32
  28. #else /* not M_I386 */
  29.     #define INCL_16
  30. #endif /* M_I386 */
  31. #endif /* INCL_32 || INCL_16 */
  32.  
  33. #ifdef INCL_FKA
  34.  
  35. /* FKA Frame control IDs                       */
  36. #define FID_FKA             0x8009
  37.  
  38. /* Frame create flags                          */
  39. /* Use with frame create flags                 */
  40. #define FCF_FKA          0x00800000L
  41.  
  42. /* Window class for FKA                        */
  43. #define WC_FKA          ((PSZ)0xffff000bL)
  44.  
  45. /* Use with fka style bits                     */
  46.  
  47. #define FKAS_SHORT       0x00010000L
  48. #define FKAS_OFF         0x00020000L
  49. #define FKAS_BORDER      0x00040000L
  50.  
  51. /* error returns from FKA control messages     */
  52.  
  53. #define FIT_NONE     -1
  54. #define FIT_ERROR    -2
  55. #define FIT_MEMERROR -3
  56. #define FIT_END      -4
  57.  
  58. /* FKA messages                                                                      */
  59. /* these messages range between FM_FKAFIRST and FM_FKALAST                           */
  60.  
  61. #define FM_FKAFIRST               0x0171
  62. #define FM_INSERTITEM             0x0171
  63. #define FM_DELETEITEM             0x0172
  64. #define FM_QUERYITEM              0x0173
  65. #define FM_SETITEM                0x0174
  66. #define FM_QUERYITEMCOUNT         0x0175
  67. #define FM_QUERYITEMTEXT          0x0176
  68. #define FM_QUERYITEMTEXTLENGTH    0x0177
  69. #define FM_SETITEMTEXT            0x0178
  70. #define FM_ITEMPOSITIONFROMID     0x0179
  71. #define FM_ITEMIDFROMPOSITION     0x017a
  72. #define FM_NEXTFORM               0x017b
  73. #define FM_FKALAST                0x017b
  74.  
  75. /* FKA button styles & attributes                                                    */
  76.  
  77. #define FIS_CURRENT         0x0000 /* specifies the currently active form of the FKA */
  78. #define FIS_SHORT           0x0100 /* specifies the short form of the FKA area       */
  79. #define FIS_LONG            0x0200 /* specifies the long form of the FKA area        */
  80. #define FIS_NEXT            0x0400 /* specifies the next FKA form in the cycle       */
  81. #define FIS_NONE            0x0800 /* specifies that the FKA should be turned off    */
  82.  
  83. #ifdef OLD_H2INC
  84. #define FIS_USERDRAW        MIS_OWNERDRAW
  85. #define FIS_SYSCOMMAND      MIS_SYSCOMMAND
  86. #define FIS_HELP            MIS_HELP
  87. #else
  88. /* new h2inc does not accept #define FOO BAR
  89.  * the following constants are the MIS_ equivalents
  90.  */
  91. #define FIS_USERDRAW        0x0008
  92. #define FIS_SYSCOMMAND      0x0040
  93. #define FIS_HELP            0x0080
  94. #endif
  95.  
  96. /* Flags for use with WinSetFKAForm and WinQueryFKAForm                              */
  97.  
  98. #define SFF_OFF             0x0001
  99. #define SFF_ON              0x0002
  100. #define SFF_SHORT           0x0004
  101. #define SFF_LONG            0x0008
  102. #define SFF_BORDER          0x0010
  103. #define SFF_NOBORDER        0x0020
  104. #define SFF_NEXT            0x0040
  105.  
  106. typedef struct _FKAITEM {  /* fki                                */
  107.     SHORT iPosition;       /* zero oriented column of button     */
  108.     SHORT iRow;            /* zero oriented row of button        */
  109.     USHORT afStyle;        /* style bits associated with button  */
  110.     USHORT id;             /* id of the button control           */
  111.     HWND  hwndSubMenu;     /* handle of the button               */
  112. } FKAITEM;
  113. typedef FKAITEM FAR * PFKAITEM;
  114.  
  115. #ifndef MTI_INCLUDED
  116.   #define MTI_INCLUDED
  117.  
  118. typedef struct _mti {      /* mti */
  119.         USHORT afStyle;    /* Style Flags      */
  120.         USHORT pad;        /* pad for template */
  121.         USHORT idItem;     /* Item ID          */
  122.         CHAR   c[2];       /*                  */
  123. } MTI;
  124.  
  125. typedef struct _mt {       /* mt */
  126.     ULONG  len;            /* Length of template in bytes */
  127.     USHORT codepage;       /* Codepage                    */
  128.     USHORT reserved;       /* Reserved.                   */
  129.     USHORT cMti;           /* Count of template items.    */
  130.     MTI    rgMti[1];       /* Array of template items.    */
  131. } MT;
  132. typedef MT FAR * LPMT;
  133.  
  134. #endif
  135.  
  136. /* declarations from fka.c */
  137. HWND    APIENTRY WinLoadFKA( HWND hFrame, HMODULE hModule, USHORT idMenu);
  138. HWND    APIENTRY WinCreateFKA( HWND hFrame, LPMT lpmt );
  139. HWND    APIENTRY WinGoToFKA( HWND hwnd );
  140. BOOL    APIENTRY WinGoFromFKA( HWND hFKA );
  141. BOOL    APIENTRY WinSetFKAForm( HWND hOwner, USHORT iStyle, BOOL bRedraw );
  142. USHORT  APIENTRY WinQueryFKAForm( HWND hOwner );
  143.  
  144.  
  145. HWND    APIENTRY TfLoadMenu( HWND hFrame, HMODULE hModule, USHORT idMenu );
  146.  
  147.  
  148. typedef struct _FKASIZE {  /* fks */
  149.        USHORT Form;        /* complete SFF form of the FKA */
  150.        SHORT  NumRows;     /* number of rows displayed     */
  151.        SHORT  Height;      /* height in pels               */
  152. } FKASIZE;
  153. typedef FKASIZE FAR *PFKASIZE;
  154.  
  155. #define FKA_LONG_ROW_HEIGHT 20
  156. #define FKA_SHORT_ROW_HEIGHT 25
  157.  
  158. #endif /* INCL_FKA */
  159.