home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / sysutils / mshell / source / mshell.h < prev    next >
Text File  |  1993-10-16  |  2KB  |  83 lines

  1. // mshell.h
  2.  
  3. #define LEN_MAXPATH               512
  4. #define LEN_WORKSTRING            256
  5. #define LEN_STACK               32768
  6. #define LEN_STARTLIST              50
  7. #define CLASSNAME              "MSHELL Client Class"
  8. #define OBJECTCLASSNAME        "MSHELL Object Class"
  9. #define CAPTION                "MiniShell"
  10. #define INI_APP                "MSHELL"
  11. #define INIKEY_PROFILE         "PROFILE"
  12.  
  13.  
  14. // user-defined messages
  15. #define WM_USER_ACK                     (WM_USER+0)
  16. #define WM_USER_START                   (WM_USER+1)
  17. #define WM_USER_ENABLE_CLIENT           (WM_USER+2)
  18. #define WM_USER_DISABLE_CLIENT          (WM_USER+3)
  19. #define WM_USER_CLOSE                   (WM_USER+4)
  20. #define WM_USER_ADD_PROGRAMS            (WM_USER+5)
  21. #define WM_USER_START_CMD               (WM_USER+6)
  22.  
  23. // user nacks
  24. #define WM_NACK_NO_INI                  (WM_USER+50)
  25. #define WM_NACK_SYNTAX_ERROR            (WM_USER+51)
  26. #define WM_NACK_NO_SPOOLER              (WM_USER+52)
  27.  
  28.  
  29.  
  30. struct _profile {
  31.   SWP     swp;
  32.   SWP     swpMinimized;
  33. };
  34. typedef struct _profile PROFILE, *PPROFILE;
  35.  
  36.  
  37. struct _startem {
  38.   BOOL bAutoStart;
  39.   PSZ  pszTitle;
  40.   PSZ  pszCMD;
  41. };
  42. typedef struct _startem STARTEM, *PSTARTEM;
  43.  
  44.  
  45. // globals structure
  46. struct _globals {
  47.   HAB            hab;
  48.   HMQ            hmq;
  49.   HWND           hwndClient;
  50.   HWND           hwndFrame;
  51.   HWND           hwndMenubar;
  52.   HWND           hwndObject;
  53.   HWND           hwndTitlebar;
  54.   HWND           hwndListbox;
  55.   HWND           hwndSpooler;
  56.   HDC            hdcScreen;
  57.   HPS            hpsScreen;
  58.   BOOL           fBusy;
  59.   BOOL           fSpooler;
  60.   BOOL           fShutdownCalled;
  61.   LONG           cStartem;
  62.   STARTEM        aStartem[ LEN_STARTLIST ];
  63.   HFILE          hfReadPipe;
  64.   HFILE          hfWritePipe;
  65.   PID            pidCMD;
  66.   RECTL          rectlDesktop;
  67.   PROFILE        profile;
  68. };
  69. typedef struct _globals GLOBALS, *PGLOBALS;
  70.  
  71.  
  72. // function prototypes
  73. MRESULT EXPENTRY ClientWinProc    ( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
  74. MRESULT EXPENTRY ObjectWinProc    ( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
  75. MRESULT EXPENTRY SpoolerDlgProc   ( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
  76. MRESULT Command( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
  77. PGLOBALS Create( HWND hwnd );
  78. char *trim( char * );
  79. char *ltrim( char * );
  80. void _Optlink threadmain( void * pv  );
  81.  
  82.  
  83.