home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pmm100.zip / PMM.H < prev    next >
Text File  |  1999-03-30  |  7KB  |  155 lines

  1.  
  2. #ifndef PMM_INCLUDED
  3.    #define PMM_INCLUDED
  4.  
  5.    #ifdef __cplusplus
  6.       extern "C" {
  7.    #endif
  8.  
  9.    #define PMMENTRY             APIENTRY
  10.  
  11.    typedef ULONG                PMMRET;
  12.    typedef LHANDLE              HPMMSESSION;
  13.    typedef HPMMSESSION *        PHPMMSESSION;
  14.  
  15.    /* Errors Returned by Functions ********************************************/
  16.    #define PMMESuccess                          0
  17.    #define PMMECannotQueryOS2Version            1
  18.    #define PMMECannotRunInThisOS2Version        2
  19.    #define PMMEMultipleSessionsNotAllowed       3
  20.    #define PMMECannotQueryDesktopWindow         4
  21.    #define PMMECannotQueryObjectWindow          5
  22.    #define PMMENotEnoughMemory                  6
  23.    #define PMMECannotRegisterInternalClass      7
  24.    #define PMMECannotCreateInternalWindow       8
  25.    #define PMMECannotSetSendMsgHook             9
  26.    #define PMMECannotSetInputMsgHook            10
  27.    #define PMMECannotOpenTraceFile              11
  28.    #define PMMEWriteFailed                      12
  29.    #define PMMECannotCloseTraceFile             13
  30.    #define PMMETraceSessionNotCreated           14
  31.    #define PMMEInvalidHandle                    15
  32.    #define PMMEAlreadyTracing                   16
  33.    #define PMMENotTracingNow                    17
  34.    #define PMMECannotReleaseInputMsgHook        18
  35.    #define PMMECannotReleaseSendMsgHook         19
  36.    #define PMMECannotDestroyInternalWindow      20
  37.    #define PMMEKeyNotDefinable                  21
  38.    #define PMMEKeysCannotBeTheSame              22
  39.    #define PMMEKeyAlreadyDefined                23
  40.    #define PMMEInvalidPointer                   24
  41.  
  42.    /* Errors Occurring when Using PMM *****************************************/
  43.    #define PMMECritWriteFailed                  1001
  44.    #define PMMECritNotEnoughMemory              1002
  45.    #define PMMECritCannotSubclassWindow         1003
  46.    #define PMMECritTooManyNestedMsgCalls        1004
  47.  
  48.    /* Warnings Occurring when Using PMM ***************************************/
  49.    #define PMMWInvalidWindow                    5001
  50.    #define PMMWInvalidWindowProc                5002
  51.  
  52.    /* Message Groups to Trace *************************************************/
  53.    #define PMMTMG_MAX_GROUPS            18
  54.  
  55.    #define PMMTMG_WINDOW                0x00000001L
  56.    #define PMMTMG_CONTROLS              0x00000002L
  57.    #define PMMTMG_KEYBOARD              0x00000004L
  58.    #define PMMTMG_MOUSE                 0x00000008L
  59.    #define PMMTMG_CLIPBOARD             0x00000010L
  60.    #define PMMTMG_DDE                   0x00000020L
  61.    #define PMMTMG_HELP                  0x00000040L
  62.    #define PMMTMG_DIRECT_MANIP          0x00000080L
  63.    #define PMMTMG_DBCS                  0x00000100L
  64.    #define PMMTMG_PEN                   0x00000200L
  65.    #define PMMTMG_MULTIMEDIA            0x00000400L
  66.    #define PMMTMG_SYSTEM                0x00000800L
  67.    #define PMMTMG_OTHER                 0x00001000L
  68.    #define PMMTMG_FILE_DIALOG           0x00002000L
  69.    #define PMMTMG_FONT_DIALOG           0x00004000L
  70.    #define PMMTMG_RESERVED              0x01000000L
  71.    #define PMMTMG_UNDOCUMENTED          0x02000000L
  72.    #define PMMTMG_USER                  0x04000000L
  73.  
  74.    #define PMMTMG_ALL                   0xffffffffL
  75.  
  76.    /* Controls to Trace *******************************************************/
  77.    #define PMMTCO_MAX_CONTROLS          20
  78.  
  79.    #define PMMTCO_FRAME                 0x00000001L
  80.    #define PMMTCO_COMBOBOX              0x00000002L
  81.    #define PMMTCO_BUTTON                0x00000004L
  82.    #define PMMTCO_MENU                  0x00000008L
  83.    #define PMMTCO_STATIC                0x00000010L
  84.    #define PMMTCO_ENTRYFIELD            0x00000020L
  85.    #define PMMTCO_LISTBOX               0x00000040L
  86.    #define PMMTCO_SCROLLBAR             0x00000080L
  87.    #define PMMTCO_TITLEBAR              0x00000100L
  88.    #define PMMTCO_MLE                   0x00000200L
  89.    #define PMMTCO_APPSTAT               0x00000400L
  90.    #define PMMTCO_KBDSTAT               0x00000800L
  91.    #define PMMTCO_PECIC                 0x00001000L
  92.    #define PMMTCO_DBE_KKPOPUP           0x00002000L
  93.    #define PMMTCO_SPINBUTTON            0x00004000L
  94.    #define PMMTCO_CONTAINER             0x00008000L
  95.    #define PMMTCO_SLIDER                0x00010000L
  96.    #define PMMTCO_VALUESET              0x00020000L
  97.    #define PMMTCO_NOTEBOOK              0x00040000L
  98.    #define PMMTCO_OTHER                 0x80000000L
  99.  
  100.    #define PMMTCO_ALL                   0xffffffffL
  101.  
  102.    /***************************************************************************/
  103.    /* Avoid warning: "Macro name 'x' on #define is also an identifier." */
  104.    #pragma info( noppc )
  105.    #define WinSubclassWindow( hwnd, pfnwp )        \
  106.       PMMSubclassWindow( (hwnd), (pfnwp) )
  107.    #define WinSetWindowPtr( hwnd, index, p )       \
  108.       PMMSetWindowPtr( (hwnd), (index), (p) )
  109.    #define WinQueryWindowPtr( hwnd, index )        \
  110.       PMMQueryWindowPtr( (hwnd), (index) )
  111.    #pragma info( restore )
  112.  
  113.    /* Function Prototypes *****************************************************/
  114.    PMMRET PMMENTRY PMMCreateTraceSession(   PHPMMSESSION phpmms
  115.                                           , HAB hab
  116.                                           , PSZ pszTraceFileName );
  117.    PMMRET PMMENTRY PMMStartTracing( HPMMSESSION hpmms );
  118.    PMMRET PMMENTRY PMMStopTracing( HPMMSESSION hpmms );
  119.    PMMRET PMMENTRY PMMDestroyTraceSession( HPMMSESSION hpmms );
  120.    PMMRET PMMENTRY PMMQueryVersion( HPMMSESSION hpmms, PULONG pulVersion );
  121.    PMMRET PMMENTRY PMMQueryTraceFileHandle(   HPMMSESSION hpmms
  122.                                             , PHFILE TraceFileHandle );
  123.    PMMRET PMMENTRY PMMSetMsgGroupsToTrace(   HPMMSESSION hpmms
  124.                                            , ULONG ulMask
  125.                                            , ULONG ulFlags );
  126.    PMMRET PMMENTRY PMMSetControlsToTrace(   HPMMSESSION hpmms
  127.                                           , ULONG ulMask
  128.                                           , ULONG ulFlags );
  129.    PMMRET PMMENTRY PMMShowWindowText( HPMMSESSION hpmms, BOOL bShow );
  130.    PMMRET PMMENTRY PMMShowClassName( HPMMSESSION hpmms, BOOL bShow );
  131.    PMMRET PMMENTRY PMMShowWindowID( HPMMSESSION hpmms, BOOL bShow );
  132.    PMMRET PMMENTRY PMMShowPointers( HPMMSESSION hpmms, BOOL bShow );
  133.    PMMRET PMMENTRY PMMShowAllArrayItems( HPMMSESSION hpmms, BOOL bShow );
  134.    PMMRET PMMENTRY PMMShowAllLinkedListItems( HPMMSESSION hpmms, BOOL bShow );
  135.    PMMRET PMMENTRY PMMShowFullMsgInfo( HPMMSESSION hpmms, BOOL bShow );
  136.    PMMRET PMMENTRY PMMShowInternalMessages( HPMMSESSION hpmms, BOOL bShow );
  137.    PMMRET PMMENTRY PMMDefineStartStopTracingKeys(   HPMMSESSION hpmms
  138.                                                   , USHORT usStartKey
  139.                                                   , USHORT usStopKey );
  140.    PMMRET PMMENTRY PMMQueryIfIgnoreMsg( HPMMSESSION hpmms, PBOOL pbIgnore );
  141.    PMMRET PMMENTRY PMMSMHQueryMsg(   HPMMSESSION hpmms
  142.                                    , PBOOL pbChanged
  143.                                    , PSMHSTRUCT psmh );
  144.    PFNWP  APIENTRY PMMSubclassWindow( HWND hwnd, PFNWP pNewWindowProc );
  145.    BOOL   APIENTRY PMMSetWindowPtr( HWND hwnd, LONG lb, PVOID pp );
  146.    PVOID  APIENTRY PMMQueryWindowPtr( HWND hwnd, LONG index );
  147.  
  148.    #ifdef __cplusplus
  149.       }
  150.    #endif
  151.  
  152.    /* End #ifndef PMM_INCLUDED */
  153. #endif
  154.  
  155.