home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / thread2.zip / APP.H < prev    next >
Text File  |  1993-06-28  |  1KB  |  43 lines

  1. // start of file app.h -------------------------------------------------------
  2.  
  3. // strings
  4. #define APP_TITLE               "Object Window Application"
  5. #define APP_CLASS_CLIENT        "APPClient"
  6. #define APP_CLASS_OBJECT        "APPObject"
  7.  
  8. // identifiers
  9. #define ID_APP             3
  10. #define IDM_SLEEP         303
  11. #define IDM_ACTIONS       304
  12.  
  13. // lengths
  14. #define LEN_WORKSTRING              256
  15. #define LEN_STACK                 18000
  16.  
  17. // structure to hold globals variables common to both threads
  18. struct _globals {
  19.   BOOL           fBusy;
  20.   HAB            hab;
  21.   HWND           hwndClient;
  22.   HWND           hwndFrame;
  23.   HWND           hwndTitlebar;
  24.   HWND           hwndMenubar;
  25.   HWND           hwndObject;
  26.   TID            tidObject;
  27. };
  28. typedef struct _globals GLOBALS, *PGLOBALS;
  29.  
  30. // user-defined messages for work items and acknowlegements
  31. #define WM_USER_ACK                      (WM_USER+0)
  32. #define WM_USER_SLEEP                    (WM_USER+1)
  33. #define WM_USER_ENABLE                   (WM_USER+2)
  34. #define WM_USER_DISABLE                  (WM_USER+3)
  35.  
  36. // function prototypes -- _Optlink is a IBM C SET/2 modifier
  37. void _Optlink threadmain( void *  );
  38. PGLOBALS Create( HWND hwnd );
  39. MRESULT EXPENTRY ObjectWinProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
  40. MRESULT EXPENTRY ClientWinProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
  41.  
  42. // end of file app.h ----------------------------------------------------------
  43.