1 |
|
---|
2 | /*
|
---|
3 | *@@sourcefile apps.h:
|
---|
4 | * header file for apps.c. See remarks there.
|
---|
5 | *
|
---|
6 | * Note: Version numbering in this file relates to XWorkplace version
|
---|
7 | * numbering.
|
---|
8 | *
|
---|
9 | *@@include #define INCL_WINPROGRAMLIST
|
---|
10 | *@@include #include <os2.h>
|
---|
11 | *@@include #include "helpers\apps.h"
|
---|
12 | */
|
---|
13 |
|
---|
14 | /* This file Copyright (C) 1997-2001 Ulrich Mller.
|
---|
15 | * This file is part of the "XWorkplace helpers" source package.
|
---|
16 | * This is free software; you can redistribute it and/or modify
|
---|
17 | * it under the terms of the GNU General Public License as published
|
---|
18 | * by the Free Software Foundation, in version 2 as it comes in the
|
---|
19 | * "COPYING" file of the XWorkplace main distribution.
|
---|
20 | * This program is distributed in the hope that it will be useful,
|
---|
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
23 | * GNU General Public License for more details.
|
---|
24 | */
|
---|
25 |
|
---|
26 | #if __cplusplus
|
---|
27 | extern "C" {
|
---|
28 | #endif
|
---|
29 |
|
---|
30 | #ifndef APPS_HEADER_INCLUDED
|
---|
31 | #define APPS_HEADER_INCLUDED
|
---|
32 |
|
---|
33 | /* ******************************************************************
|
---|
34 | *
|
---|
35 | * Environment helpers
|
---|
36 | *
|
---|
37 | ********************************************************************/
|
---|
38 |
|
---|
39 | ULONG appQueryEnvironmentLen(PCSZ pcszEnvironment);
|
---|
40 |
|
---|
41 | /*
|
---|
42 | *@@ DOSENVIRONMENT:
|
---|
43 | * structure holding an array of environment
|
---|
44 | * variables (papszVars). This is initialized
|
---|
45 | * appGetEnvironment,
|
---|
46 | *
|
---|
47 | *@@added V0.9.4 (2000-07-19) [umoeller]
|
---|
48 | */
|
---|
49 |
|
---|
50 | typedef struct _DOSENVIRONMENT
|
---|
51 | {
|
---|
52 | ULONG cVars; // count of vars in papzVars
|
---|
53 | PSZ *papszVars; // array of PSZ's to environment strings (VAR=VALUE)
|
---|
54 | } DOSENVIRONMENT, *PDOSENVIRONMENT;
|
---|
55 |
|
---|
56 | APIRET appParseEnvironment(const char *pcszEnv,
|
---|
57 | PDOSENVIRONMENT pEnv);
|
---|
58 |
|
---|
59 | APIRET appGetEnvironment(PDOSENVIRONMENT pEnv);
|
---|
60 |
|
---|
61 | PSZ* appFindEnvironmentVar(PDOSENVIRONMENT pEnv,
|
---|
62 | PSZ pszVarName);
|
---|
63 |
|
---|
64 | APIRET appSetEnvironmentVar(PDOSENVIRONMENT pEnv,
|
---|
65 | PSZ pszNewEnv,
|
---|
66 | BOOL fAddFirst);
|
---|
67 |
|
---|
68 | APIRET appConvertEnvironment(PDOSENVIRONMENT pEnv,
|
---|
69 | PSZ *ppszEnv,
|
---|
70 | PULONG pulSize);
|
---|
71 |
|
---|
72 | APIRET appFreeEnvironment(PDOSENVIRONMENT pEnv);
|
---|
73 |
|
---|
74 | #ifdef INCL_WINPROGRAMLIST
|
---|
75 | // additional PROG_* flags for appQueryAppType
|
---|
76 | // #define PROG_XWP_DLL 998 // dynamic link library
|
---|
77 | // removed, PROG_DLL exists already
|
---|
78 | // V0.9.16 (2001-10-06)
|
---|
79 |
|
---|
80 | #define PROG_WIN32 990 // added V0.9.16 (2001-12-08) [umoeller]
|
---|
81 |
|
---|
82 | APIRET appQueryAppType(const char *pcszExecutable,
|
---|
83 | PULONG pulDosAppType,
|
---|
84 | PULONG pulWinAppType);
|
---|
85 |
|
---|
86 | PCSZ appDescribeAppType(PROGCATEGORY progc);
|
---|
87 |
|
---|
88 | ULONG appIsWindowsApp(ULONG ulProgCategory);
|
---|
89 |
|
---|
90 | /* ******************************************************************
|
---|
91 | *
|
---|
92 | * Application start
|
---|
93 | *
|
---|
94 | ********************************************************************/
|
---|
95 |
|
---|
96 |
|
---|
97 | PSZ appQueryDefaultWin31Environment(VOID);
|
---|
98 |
|
---|
99 | #define APP_RUN_FULLSCREEN 0x0001
|
---|
100 | #define APP_RUN_ENHANCED 0x0002
|
---|
101 | #define APP_RUN_STANDARD 0x0004
|
---|
102 | #define APP_RUN_SEPARATE 0x0008
|
---|
103 |
|
---|
104 | APIRET XWPENTRY appStartApp(HWND hwndNotify,
|
---|
105 | const PROGDETAILS *pcProgDetails,
|
---|
106 | ULONG ulFlags,
|
---|
107 | HAPP *phapp,
|
---|
108 | ULONG cbFailingName,
|
---|
109 | PSZ pszFailingName);
|
---|
110 |
|
---|
111 | BOOL XWPENTRY appWaitForApp(HWND hwndNotify,
|
---|
112 | HAPP happ,
|
---|
113 | PULONG pulExitCode);
|
---|
114 |
|
---|
115 | HAPP XWPENTRY appQuickStartApp(const char *pcszFile,
|
---|
116 | ULONG ulProgType,
|
---|
117 | const char *pcszArgs,
|
---|
118 | PULONG pulExitCode);
|
---|
119 |
|
---|
120 | #endif
|
---|
121 |
|
---|
122 | #endif
|
---|
123 |
|
---|
124 | #if __cplusplus
|
---|
125 | }
|
---|
126 | #endif
|
---|
127 |
|
---|