home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************\
- *
- * Module Name: PMSHL.H
- *
- * OS/2 Presentation Manager Shell constants, types, messages and
- * function declarations
- *
- * Copyright (c) 1989-1990, Microsoft Corporation. All rights reserved.
- *
- * =======================================================================
- *
- * The following symbols are used in this file for conditional sections.
- *
- * INCL_WINSHELLDATA Include Presentation Manager profile calls
- * INCL_SHLERRORS defined if INCL_ERRORS is defined
- * INCL_WINSWITCHLIST Include Switch List Calls
- *
- \************************************************************************/
-
- /* common types, constants and function declarations */
-
- /* maximum file name length */
- #define MAXNAMEL 60
-
- /* window size structure */
- typedef struct _XYWINSIZE { /* xywin */
- SHORT x;
- SHORT y;
- SHORT cx;
- SHORT cy;
- USHORT fsWindow;
- } XYWINSIZE;
- typedef XYWINSIZE FAR *PXYWINSIZE;
-
- /* Definitions for fsWindow */
- #define XYF_NOAUTOCLOSE 0x0008
- #define XYF_MINIMIZED 0x0004
- #define XYF_MAXIMIZED 0x0002
- #define XYF_INVISIBLE 0x0001
- #define XYF_NORMAL 0X0000
-
- /* program handle */
- typedef LHANDLE HPROGRAM; /* hprog */
- typedef HPROGRAM FAR * PHPROGRAM;
-
- #ifdef INCL_WINPROGRAMLIST
-
- /* maximum path length */
- #define MAXPATHL 128
-
- /* root group handle */
- #define SGH_ROOT (HPROGRAM)-1L
-
- typedef struct _HPROGARRAY { /* hpga */
- HPROGRAM ahprog[1];
- } HPROGARRAY;
- typedef HPROGARRAY FAR *PHPROGARRAY;
-
- typedef CHAR PROGCATEGORY; /* progc */
-
- /* values acceptable for PROGCATEGORY for PM groups */
- #define PROG_DEFAULT (PROGCATEGORY)0
- #define PROG_FULLSCREEN (PROGCATEGORY)1
- #define PROG_WINDOWABLEVIO (PROGCATEGORY)2
- #define PROG_PM (PROGCATEGORY)3
- #define PROG_GROUP (PROGCATEGORY)5
- #define PROG_REAL (PROGCATEGORY)7
-
- /* visibility flag for PROGTYPE structure */
- #define SHE_VISIBLE (BYTE)0x00
- #define SHE_INVISIBLE (BYTE)0x01
-
- typedef struct _PROGTYPE { /* progt */
- PROGCATEGORY progc;
- UCHAR fbVisible;
- } PROGTYPE;
- typedef PROGTYPE FAR *PPROGTYPE;
-
- typedef struct _PROGRAMENTRY { /* proge */
- HPROGRAM hprog;
- PROGTYPE progt;
- CHAR szTitle[MAXNAMEL+1];
- } PROGRAMENTRY;
- typedef PROGRAMENTRY FAR *PPROGRAMENTRY;
-
- typedef struct _PIBSTRUCT { /* pib */
- PROGTYPE progt;
- CHAR szTitle[MAXNAMEL+1];
- CHAR szIconFileName[MAXPATHL+1];
- CHAR szExecutable[MAXPATHL+1];
- CHAR szStartupDir[MAXPATHL+1];
- XYWINSIZE xywinInitial;
- USHORT res1;
- LHANDLE res2;
- USHORT cchEnvironmentVars;
- PCH pchEnvironmentVars;
- USHORT cchProgramParameter;
- PCH pchProgramParameter;
- } PIBSTRUCT;
- typedef PIBSTRUCT FAR *PPIBSTRUCT;
-
- /*** Program Use */
- USHORT APIENTRY WinQueryProgramTitles(HAB, HPROGRAM, PPROGRAMENTRY,
- USHORT, PUSHORT);
-
- /*** Single Program Manipulation */
- HPROGRAM APIENTRY WinAddProgram(HAB, PPIBSTRUCT, HPROGRAM);
- USHORT APIENTRY WinQueryDefinition(HAB, HPROGRAM, PPIBSTRUCT, USHORT);
-
- /*** Group Manipulation */
- HPROGRAM APIENTRY WinCreateGroup(HAB, PSZ , BYTE, ULONG, ULONG);
-
- typedef struct _PIBBUFFER { /* pibuf */
- PROGTYPE progt;
- CHAR szTitle[MAXNAMEL+1];
- CHAR szIconFileName[MAXPATHL+1];
- CHAR szExecutable[MAXPATHL+1];
- CHAR szStartupDir[MAXPATHL+1];
- XYWINSIZE xywinInitial;
- USHORT res1;
- LHANDLE res2;
- USHORT cchEnvironmentVars;
- PCH pchEnvironmentVars;
- USHORT cchProgramParameter;
- PCH pchProgramParameter;
- CHAR HEPstrings[1024];
- } PIBBUFFER;
- typedef PIBBUFFER far *PPIBBUFFER;
-
- #endif /* INCL_WINPROGRAMLIST */
-
- #if (defined(INCL_WINSWITCHLIST) || !defined(INCL_NOCOMMON))
-
- typedef LHANDLE HSWITCH; /* hsw */
- typedef HSWITCH FAR *PHSWITCH;
-
- /* visibility flag for SWCNTRL structure */
- #define SWL_VISIBLE (BYTE)0x04
- #define SWL_INVISIBLE (BYTE)0x01
- #define SWL_GRAYED (BYTE)0x02
-
- /* visibility flag for SWCNTRL structure */
- #define SWL_JUMPABLE (BYTE)0x02
- #define SWL_NOTJUMPABLE (BYTE)0x01
-
- typedef struct _SWCNTRL { /* swctl */
- HWND hwnd;
- HWND hwndIcon;
- HPROGRAM hprog;
- USHORT idProcess;
- USHORT idSession;
- UCHAR uchVisibility;
- UCHAR fbJump;
- CHAR szSwtitle[MAXNAMEL+1];
- BYTE fReserved; /* To align on word boundary */
- } SWCNTRL;
- typedef SWCNTRL FAR *PSWCNTRL;
-
- /*** Switching Program functions */
- HSWITCH APIENTRY WinAddSwitchEntry(PSWCNTRL);
- USHORT APIENTRY WinRemoveSwitchEntry(HSWITCH);
-
- #endif /* not INCL_NOCOMMON */
-
- #ifdef INCL_WINSWITCHLIST
-
- USHORT APIENTRY WinChangeSwitchEntry(HSWITCH, PSWCNTRL);
- USHORT APIENTRY WinQueryTaskTitle(USHORT, PSZ , USHORT);
-
- #endif
-
- /* if error definitions are required then allow Shell errors */
- #ifdef INCL_ERRORS
- #define INCL_SHLERRORS
- #endif /* INCL_ERRORS */
-
- #ifdef INCL_WINSHELLDATA
-
- /*** OS2.INI Access functions */
-
- USHORT APIENTRY WinQueryProfileSize(HAB, PSZ, PSZ, PUSHORT);
- BOOL APIENTRY WinQueryProfileData(HAB, PSZ, PSZ, PVOID, PUSHORT);
- BOOL APIENTRY WinWriteProfileData(HAB, PSZ, PSZ, PVOID, USHORT);
- SHORT APIENTRY WinQueryProfileInt(HAB, PSZ, PSZ, SHORT);
- USHORT APIENTRY WinQueryProfileString(HAB, PSZ, PSZ, PSZ , PSZ, USHORT);
- BOOL APIENTRY WinWriteProfileString(HAB, PSZ, PSZ, PSZ);
-
- #endif /* INCL_WINSHELLDATA */
-
- #ifdef INCL_SHLERRORS
-
- #define PMERR_INVALID_PIB 0x1101
- #define PMERR_INSUFF_SPACE_TO_ADD 0x1102
- #define PMERR_INVALID_GROUP_HANDLE 0x1103
- #define PMERR_DUPLICATE_TITLE 0x1104
- #define PMERR_INVALID_TITLE 0x1105
- #define PMERR_HANDLE_NOT_IN_GROUP 0x1107
- #define PMERR_INVALID_TARGET_HANDLE 0x1106
- #define PMERR_INVALID_PATH_STATEMENT 0x1108
- #define PMERR_NO_PROGRAM_FOUND 0x1109
- #define PMERR_INVALID_BUFFER_SIZE 0x110A
- #define PMERR_BUFFER_TOO_SMALL 0x110B
- #define PMERR_PL_INITIALISATION_FAIL 0x110C
- #define PMERR_CANT_DESTROY_SYS_GROUP 0x110D
- #define PMERR_INVALID_TYPE_CHANGE 0x110E
- #define PMERR_INVALID_PROGRAM_HANDLE 0x110F
-
- #define PMERR_NOT_CURRENT_PL_VERSION 0x1110
- #define PMERR_INVALID_CIRCULAR_REF 0x1111
- #define PMERR_MEMORY_ALLOCATION_ERR 0x1112
- #define PMERR_MEMORY_DEALLOCATION_ERR 0x1113
- #define PMERR_TASK_HEADER_TOO_BIG 0x1114
-
- #define PMERR_DOS_ERROR 0x1200
-
- #define PMERR_NO_SPACE 0x1201
- #define PMERR_INVALID_SWITCH_HANDLE 0x1202
- #define PMERR_NO_HANDLE 0x1203
- #define PMERR_INVALID_PROCESS_ID 0x1204
- #define PMERR_NOT_SHELL 0x1205
- #define PMERR_INVALID_WINDOW 0x1206
- #define PMERR_INVALID_POST_MSG 0x1207
- #define PMERR_INVALID_PARAMETERS 0x1208
- #define PMERR_INVALID_PROGRAM_TYPE 0x1209
- #define PMERR_NOT_EXTENDED_FOCUS 0x120A
- #define PMERR_INVALID_SESSION_ID 0x120B
- #define PMERR_SMG_INVALID_ICON_FILE 0x120C
- #define PMERR_SMG_ICON_NOT_CREATED 0x120D
- #define PMERR_SHL_DEBUG 0x120E
-
- #define PMERR_OPENING_INI_FILE 0x1301
- #define PMERR_INI_FILE_CORRUPT 0x1302
- #define PMERR_INVALID_PARM 0x1303
- #define PMERR_NOT_IN_IDX 0x1304
-
- #define PMERR_INI_WRITE_FAIL 0x1306
- #define PMERR_IDX_FULL 0x1307
- #define PMERR_INI_PROTECTED 0x1308
- #define PMERR_MEMORY_ALLOC 0x1309
- #define PMERR_INI_INIT_ALREADY_DONE 0x130A
- #define PMERR_INVALID_INTEGER 0x130B
- #define PMERR_INVALID_ASCIIZ 0x130C
- #define PMERR_CAN_NOT_CALL_SPOOLER 0x130D
- #define PMERR_VALIDATION_REJECTED PMERR_CAN_NOT_CALL_SPOOLER
-
- #define PMERR_WARNING_WINDOW_NOT_KILLED 0x1401
- #define PMERR_ERROR_INVALID_WINDOW 0x1402
- #define PMERR_ALREADY_INITIALIZED 0x1403
- #define PMERR_MSG_PROG_NO_MOU 0x1405
- #define PMERR_MSG_PROG_NON_RECOV 0x1406
- #define PMERR_WINCONV_INVALID_PATH 0x1407
- #define PMERR_PI_NOT_INITIALISED 0x1408
- #define PMERR_PL_NOT_INITIALISED 0x1409
- #define PMERR_NO_TASK_MANAGER 0x140A
- #define PMERR_SAVE_NOT_IN_PROGRESS 0x140B
- #define PMERR_NO_STACK_SPACE 0x140C
- #define PMERR_INVALID_COLR_FIELD 0x140d
- #define PMERR_INVALID_COLR_VALUE 0x140e
- #define PMERR_COLR_WRITE 0x140f
-
- #define PMERR_TARGET_FILE_EXISTS 0x1501
- #define PMERR_SOURCE_SAME_AS_TARGET 0x1502
- #define PMERR_SOURCE_FILE_NOT_FOUND 0x1503
- #define PMERR_INVALID_NEW_PATH 0x1504
- #define PMERR_TARGET_FILE_NOT_FOUND 0x1505
- #define PMERR_INVALID_DRIVE_NUMBER 0x1506
- #define PMERR_NAME_TOO_LONG 0x1507
- #define PMERR_NOT_ENOUGH_ROOM_ON_DISK 0x1508
- #define PMERR_NOT_ENOUGH_MEM 0x1509
-
- #define PMERR_LOG_DRV_DOES_NOT_EXIST 0x150B
- #define PMERR_INVALID_DRIVE 0x150C
- #define PMERR_ACCESS_DENIED 0x150D
- #define PMERR_NO_FIRST_SLASH 0x150E
- #define PMERR_READ_ONLY_FILE 0x150F
-
- #endif /* INCL_SHLERRORS */
-