home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 7.ddi / INC11 / PMSHL.H$ / PMSHL.bin
Encoding:
Text File  |  1990-01-09  |  9.2 KB  |  278 lines

  1. /************************************************************************\
  2. *
  3. * Module Name: PMSHL.H
  4. *
  5. * OS/2 Presentation Manager Shell constants, types, messages and
  6. * function declarations
  7. *
  8. * Copyright (c) 1989-1990, Microsoft Corporation. All rights reserved.
  9. *
  10. * =======================================================================
  11. *
  12. * The following symbols are used in this file for conditional sections.
  13. *
  14. *   INCL_WINSHELLDATA    Include Presentation Manager profile calls
  15. *   INCL_SHLERRORS       defined if INCL_ERRORS is defined
  16. *   INCL_WINSWITCHLIST   Include Switch List Calls
  17. *
  18. \************************************************************************/
  19.  
  20. /* common types, constants and function declarations */
  21.  
  22. /* maximum file name length */
  23. #define MAXNAMEL 60
  24.  
  25. /* window size structure */
  26. typedef struct _XYWINSIZE {     /* xywin */
  27.     SHORT x;
  28.     SHORT y;
  29.     SHORT cx;
  30.     SHORT cy;
  31.     USHORT fsWindow;
  32. } XYWINSIZE;
  33. typedef XYWINSIZE FAR *PXYWINSIZE;
  34.  
  35. /* Definitions for fsWindow */
  36. #define XYF_NOAUTOCLOSE  0x0008
  37. #define XYF_MINIMIZED    0x0004
  38. #define XYF_MAXIMIZED    0x0002
  39. #define XYF_INVISIBLE    0x0001
  40. #define XYF_NORMAL       0X0000
  41.  
  42. /* program handle */
  43. typedef LHANDLE HPROGRAM;       /* hprog */
  44. typedef HPROGRAM FAR * PHPROGRAM;
  45.  
  46. #ifdef INCL_WINPROGRAMLIST
  47.  
  48. /* maximum path length */
  49. #define MAXPATHL 128
  50.  
  51. /* root group handle */
  52. #define SGH_ROOT      (HPROGRAM)-1L
  53.  
  54. typedef struct _HPROGARRAY {    /* hpga */
  55.     HPROGRAM ahprog[1];
  56. } HPROGARRAY;
  57. typedef HPROGARRAY FAR *PHPROGARRAY;
  58.  
  59. typedef CHAR PROGCATEGORY;      /* progc */
  60.  
  61. /* values acceptable for PROGCATEGORY for PM groups */
  62. #define PROG_DEFAULT         (PROGCATEGORY)0
  63. #define PROG_FULLSCREEN      (PROGCATEGORY)1
  64. #define PROG_WINDOWABLEVIO   (PROGCATEGORY)2
  65. #define PROG_PM              (PROGCATEGORY)3
  66. #define PROG_GROUP           (PROGCATEGORY)5
  67. #define PROG_REAL            (PROGCATEGORY)7
  68.  
  69. /* visibility flag for PROGTYPE structure */
  70. #define SHE_VISIBLE   (BYTE)0x00
  71. #define SHE_INVISIBLE (BYTE)0x01
  72.  
  73. typedef struct _PROGTYPE {      /* progt */
  74.     PROGCATEGORY progc;
  75.     UCHAR        fbVisible;
  76. } PROGTYPE;
  77. typedef PROGTYPE FAR *PPROGTYPE;
  78.  
  79. typedef struct _PROGRAMENTRY {  /* proge */
  80.     HPROGRAM hprog;
  81.     PROGTYPE progt;
  82.     CHAR     szTitle[MAXNAMEL+1];
  83. } PROGRAMENTRY;
  84. typedef PROGRAMENTRY FAR *PPROGRAMENTRY;
  85.  
  86. typedef struct _PIBSTRUCT {     /* pib */
  87.     PROGTYPE  progt;
  88.     CHAR      szTitle[MAXNAMEL+1];
  89.     CHAR      szIconFileName[MAXPATHL+1];
  90.     CHAR      szExecutable[MAXPATHL+1];
  91.     CHAR      szStartupDir[MAXPATHL+1];
  92.     XYWINSIZE xywinInitial;
  93.     USHORT    res1;
  94.     LHANDLE   res2;
  95.     USHORT    cchEnvironmentVars;
  96.     PCH       pchEnvironmentVars;
  97.     USHORT    cchProgramParameter;
  98.     PCH       pchProgramParameter;
  99. } PIBSTRUCT;
  100. typedef  PIBSTRUCT FAR *PPIBSTRUCT;
  101.  
  102. /***  Program Use */
  103. USHORT APIENTRY WinQueryProgramTitles(HAB, HPROGRAM, PPROGRAMENTRY,
  104.                                       USHORT, PUSHORT);
  105.  
  106. /***  Single Program Manipulation */
  107. HPROGRAM APIENTRY WinAddProgram(HAB, PPIBSTRUCT, HPROGRAM);
  108. USHORT   APIENTRY WinQueryDefinition(HAB, HPROGRAM, PPIBSTRUCT, USHORT);
  109.  
  110. /***  Group Manipulation */
  111. HPROGRAM APIENTRY WinCreateGroup(HAB, PSZ , BYTE, ULONG, ULONG);
  112.  
  113. typedef struct _PIBBUFFER {     /* pibuf */
  114.     PROGTYPE  progt;
  115.     CHAR      szTitle[MAXNAMEL+1];
  116.     CHAR      szIconFileName[MAXPATHL+1];
  117.     CHAR      szExecutable[MAXPATHL+1];
  118.     CHAR      szStartupDir[MAXPATHL+1];
  119.     XYWINSIZE xywinInitial;
  120.     USHORT    res1;
  121.     LHANDLE   res2;
  122.     USHORT    cchEnvironmentVars;
  123.     PCH       pchEnvironmentVars;
  124.     USHORT    cchProgramParameter;
  125.     PCH       pchProgramParameter;
  126.     CHAR      HEPstrings[1024];
  127. } PIBBUFFER;
  128. typedef  PIBBUFFER far *PPIBBUFFER;
  129.  
  130. #endif /* INCL_WINPROGRAMLIST */
  131.  
  132. #if (defined(INCL_WINSWITCHLIST) || !defined(INCL_NOCOMMON))
  133.  
  134. typedef LHANDLE HSWITCH;        /* hsw */
  135. typedef HSWITCH FAR *PHSWITCH;
  136.  
  137. /* visibility flag for SWCNTRL structure */
  138. #define SWL_VISIBLE   (BYTE)0x04
  139. #define SWL_INVISIBLE (BYTE)0x01
  140. #define SWL_GRAYED    (BYTE)0x02
  141.  
  142. /* visibility flag for SWCNTRL structure */
  143. #define SWL_JUMPABLE    (BYTE)0x02
  144. #define SWL_NOTJUMPABLE (BYTE)0x01
  145.  
  146. typedef struct _SWCNTRL {       /* swctl */
  147.     HWND     hwnd;
  148.     HWND     hwndIcon;
  149.     HPROGRAM hprog;
  150.     USHORT   idProcess;
  151.     USHORT   idSession;
  152.     UCHAR    uchVisibility;
  153.     UCHAR    fbJump;
  154.     CHAR     szSwtitle[MAXNAMEL+1];
  155.     BYTE     fReserved;        /* To align on word boundary */
  156. } SWCNTRL;
  157. typedef SWCNTRL FAR *PSWCNTRL;
  158.  
  159. /*** Switching Program functions */
  160. HSWITCH APIENTRY WinAddSwitchEntry(PSWCNTRL);
  161. USHORT  APIENTRY WinRemoveSwitchEntry(HSWITCH);
  162.  
  163. #endif  /* not INCL_NOCOMMON */
  164.  
  165. #ifdef INCL_WINSWITCHLIST
  166.  
  167. USHORT APIENTRY WinChangeSwitchEntry(HSWITCH, PSWCNTRL);
  168. USHORT APIENTRY WinQueryTaskTitle(USHORT, PSZ , USHORT);
  169.  
  170. #endif
  171.  
  172. /* if error definitions are required then allow Shell errors */
  173. #ifdef INCL_ERRORS
  174.     #define INCL_SHLERRORS
  175. #endif /* INCL_ERRORS */
  176.  
  177. #ifdef INCL_WINSHELLDATA
  178.  
  179. /*** OS2.INI Access functions */
  180.  
  181. USHORT APIENTRY WinQueryProfileSize(HAB, PSZ, PSZ, PUSHORT);
  182. BOOL   APIENTRY WinQueryProfileData(HAB, PSZ, PSZ, PVOID, PUSHORT);
  183. BOOL   APIENTRY WinWriteProfileData(HAB, PSZ, PSZ, PVOID, USHORT);
  184. SHORT  APIENTRY WinQueryProfileInt(HAB, PSZ, PSZ, SHORT);
  185. USHORT APIENTRY WinQueryProfileString(HAB, PSZ, PSZ, PSZ , PSZ, USHORT);
  186. BOOL   APIENTRY WinWriteProfileString(HAB, PSZ, PSZ, PSZ);
  187.  
  188. #endif /* INCL_WINSHELLDATA */
  189.  
  190. #ifdef INCL_SHLERRORS
  191.  
  192. #define PMERR_INVALID_PIB                0x1101
  193. #define PMERR_INSUFF_SPACE_TO_ADD        0x1102
  194. #define PMERR_INVALID_GROUP_HANDLE       0x1103
  195. #define PMERR_DUPLICATE_TITLE            0x1104
  196. #define PMERR_INVALID_TITLE              0x1105
  197. #define PMERR_HANDLE_NOT_IN_GROUP        0x1107
  198. #define PMERR_INVALID_TARGET_HANDLE      0x1106
  199. #define PMERR_INVALID_PATH_STATEMENT     0x1108
  200. #define PMERR_NO_PROGRAM_FOUND           0x1109
  201. #define PMERR_INVALID_BUFFER_SIZE        0x110A
  202. #define PMERR_BUFFER_TOO_SMALL           0x110B
  203. #define PMERR_PL_INITIALISATION_FAIL     0x110C
  204. #define PMERR_CANT_DESTROY_SYS_GROUP     0x110D
  205. #define PMERR_INVALID_TYPE_CHANGE        0x110E
  206. #define PMERR_INVALID_PROGRAM_HANDLE     0x110F
  207.  
  208. #define PMERR_NOT_CURRENT_PL_VERSION     0x1110
  209. #define PMERR_INVALID_CIRCULAR_REF       0x1111
  210. #define PMERR_MEMORY_ALLOCATION_ERR      0x1112
  211. #define PMERR_MEMORY_DEALLOCATION_ERR    0x1113
  212. #define PMERR_TASK_HEADER_TOO_BIG        0x1114
  213.  
  214. #define PMERR_DOS_ERROR                  0x1200
  215.  
  216. #define PMERR_NO_SPACE                   0x1201
  217. #define PMERR_INVALID_SWITCH_HANDLE      0x1202
  218. #define PMERR_NO_HANDLE                  0x1203
  219. #define PMERR_INVALID_PROCESS_ID         0x1204
  220. #define PMERR_NOT_SHELL                  0x1205
  221. #define PMERR_INVALID_WINDOW             0x1206
  222. #define PMERR_INVALID_POST_MSG           0x1207
  223. #define PMERR_INVALID_PARAMETERS         0x1208
  224. #define PMERR_INVALID_PROGRAM_TYPE       0x1209
  225. #define PMERR_NOT_EXTENDED_FOCUS         0x120A
  226. #define PMERR_INVALID_SESSION_ID         0x120B
  227. #define PMERR_SMG_INVALID_ICON_FILE      0x120C
  228. #define PMERR_SMG_ICON_NOT_CREATED       0x120D
  229. #define PMERR_SHL_DEBUG                  0x120E
  230.  
  231. #define PMERR_OPENING_INI_FILE           0x1301
  232. #define PMERR_INI_FILE_CORRUPT           0x1302
  233. #define PMERR_INVALID_PARM               0x1303
  234. #define PMERR_NOT_IN_IDX                 0x1304
  235.  
  236. #define PMERR_INI_WRITE_FAIL             0x1306
  237. #define PMERR_IDX_FULL                   0x1307
  238. #define PMERR_INI_PROTECTED              0x1308
  239. #define PMERR_MEMORY_ALLOC               0x1309
  240. #define PMERR_INI_INIT_ALREADY_DONE      0x130A
  241. #define PMERR_INVALID_INTEGER            0x130B
  242. #define PMERR_INVALID_ASCIIZ             0x130C
  243. #define PMERR_CAN_NOT_CALL_SPOOLER       0x130D
  244. #define PMERR_VALIDATION_REJECTED        PMERR_CAN_NOT_CALL_SPOOLER
  245.  
  246. #define PMERR_WARNING_WINDOW_NOT_KILLED  0x1401
  247. #define PMERR_ERROR_INVALID_WINDOW       0x1402
  248. #define PMERR_ALREADY_INITIALIZED        0x1403
  249. #define PMERR_MSG_PROG_NO_MOU            0x1405
  250. #define PMERR_MSG_PROG_NON_RECOV         0x1406
  251. #define PMERR_WINCONV_INVALID_PATH       0x1407
  252. #define PMERR_PI_NOT_INITIALISED         0x1408
  253. #define PMERR_PL_NOT_INITIALISED         0x1409
  254. #define PMERR_NO_TASK_MANAGER            0x140A
  255. #define PMERR_SAVE_NOT_IN_PROGRESS       0x140B
  256. #define PMERR_NO_STACK_SPACE             0x140C
  257. #define PMERR_INVALID_COLR_FIELD         0x140d
  258. #define PMERR_INVALID_COLR_VALUE         0x140e
  259. #define PMERR_COLR_WRITE                 0x140f
  260.  
  261. #define PMERR_TARGET_FILE_EXISTS         0x1501
  262. #define PMERR_SOURCE_SAME_AS_TARGET      0x1502
  263. #define PMERR_SOURCE_FILE_NOT_FOUND      0x1503
  264. #define PMERR_INVALID_NEW_PATH           0x1504
  265. #define PMERR_TARGET_FILE_NOT_FOUND      0x1505
  266. #define PMERR_INVALID_DRIVE_NUMBER       0x1506
  267. #define PMERR_NAME_TOO_LONG              0x1507
  268. #define PMERR_NOT_ENOUGH_ROOM_ON_DISK    0x1508
  269. #define PMERR_NOT_ENOUGH_MEM             0x1509
  270.  
  271. #define PMERR_LOG_DRV_DOES_NOT_EXIST     0x150B
  272. #define PMERR_INVALID_DRIVE              0x150C
  273. #define PMERR_ACCESS_DENIED              0x150D
  274. #define PMERR_NO_FIRST_SLASH             0x150E
  275. #define PMERR_READ_ONLY_FILE             0x150F
  276.  
  277. #endif /* INCL_SHLERRORS */
  278.