1 | /*
|
---|
2 | * Copyright (c) 2001, 2002 IBM Corp and others. All rights reserved.
|
---|
3 | * This file is made available under the terms of the Common Public License v1.0
|
---|
4 | * which accompanies this distribution, and is available at
|
---|
5 | * http://www.eclipse.org/legal/cpl-v10.html
|
---|
6 | *
|
---|
7 | * Contributors:
|
---|
8 | * Kevin Cornell (Rational Software Corporation)
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef ECLIPSE_OS_H
|
---|
12 | #define ECLIPSE_OS_H
|
---|
13 |
|
---|
14 | /* Operating System Dependent Information */
|
---|
15 |
|
---|
16 | /*** See eclipse.c for information on the launcher runtime architecture ***/
|
---|
17 |
|
---|
18 | /* Define the official name of the program. */
|
---|
19 | #define getOfficialName() PROGRAM_NAME
|
---|
20 |
|
---|
21 |
|
---|
22 | /* Global Variables */
|
---|
23 |
|
---|
24 | extern char dirSeparator; /* '/' or '\\' */
|
---|
25 | extern char pathSeparator; /* separator used in PATH variable */
|
---|
26 | extern char* consoleVM; /* name of VM to use for debugging */
|
---|
27 | extern char* defaultVM; /* name of VM to use normally */
|
---|
28 | extern char* shippedVMDir; /* VM bin directory with separator */
|
---|
29 | extern char* guiList[]; /* list of possible supported GUIs */
|
---|
30 |
|
---|
31 |
|
---|
32 | /* OS Specific Functions */
|
---|
33 |
|
---|
34 | /** Display a Message
|
---|
35 | *
|
---|
36 | * This method is called to display a message to the user.
|
---|
37 | * The method should not return until the user has acknowledged
|
---|
38 | * the message. This method will only be called after the window
|
---|
39 | * system has been initialized.
|
---|
40 | */
|
---|
41 | extern void displayMessage( char* message );
|
---|
42 |
|
---|
43 |
|
---|
44 | /** Initialize the Window System
|
---|
45 | *
|
---|
46 | * This method is called after the command line arguments have been
|
---|
47 | * parsed. Its purpose is to initialize the corresponding window system.
|
---|
48 | *
|
---|
49 | * The showSplash flag indicates the splash window will be displayed by
|
---|
50 | * this process (e.g., value will be zero for the main launcher).
|
---|
51 | */
|
---|
52 | extern void initWindowSystem( int* argc, char* argv[], int showSplash );
|
---|
53 |
|
---|
54 |
|
---|
55 | /** Show the Splash Window
|
---|
56 | *
|
---|
57 | * This method is called to display the actual splash window. It will only
|
---|
58 | * be called by the splash window process and not the main launcher process.
|
---|
59 | * The splash ID passed corresponds to the string returned from initWindowSystem().
|
---|
60 | * If possible, this ID should be used to communicate some piece of data back
|
---|
61 | * to the main launcher program for two reasons:
|
---|
62 | * 1) to detect when the splash window process terminates
|
---|
63 | * 2) to terminate the splash window process should the JVM terminate before it
|
---|
64 | * completes its initialization.
|
---|
65 | *
|
---|
66 | * Two parameters are passed: the install home directory and a specific bitmap image
|
---|
67 | * file for a feature. The feature's image file is tried first and if it cannot be
|
---|
68 | * displayed, the images from the install directory are used.
|
---|
69 | *
|
---|
70 | * Return (exit code):
|
---|
71 | * 0 - success
|
---|
72 | * non-zero - could not find a splash image to display
|
---|
73 | */
|
---|
74 | extern int showSplash( char* splashId, char* homeDir, char* featureImage );
|
---|
75 |
|
---|
76 |
|
---|
77 | /** Get List of Java VM Arguments
|
---|
78 | *
|
---|
79 | * A given Java VM might require a special set of arguments in order to
|
---|
80 | * optimize its performance. This method returns a NULL terminated array
|
---|
81 | * of strings, where each string is a separate VM argument.
|
---|
82 | */
|
---|
83 | extern char** getArgVM( char *vm );
|
---|
84 |
|
---|
85 |
|
---|
86 | /* Start the Java VM and Wait For It to Terminate
|
---|
87 | *
|
---|
88 | * This method is responsible for starting the Java VM and for
|
---|
89 | * detecting its termination. The resulting JVM exit code should
|
---|
90 | * be returned to the main launcher, which will display a message if
|
---|
91 | * the termination was not normal.
|
---|
92 | */
|
---|
93 | extern int startJavaVM( char* args[] );
|
---|
94 |
|
---|
95 | #endif /* ECLIPSE_OS_H */
|
---|
96 |
|
---|