diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java index dd3a01d1d4..5ccc4bf06b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java @@ -104,6 +104,7 @@ public class Display extends Device { Callback windowCallback; int windowProc, shellHandle; static String APP_NAME = "SWT"; //$NON-NLS-1$ + static String APP_VERSION = ""; //$NON-NLS-1$ static final String SHELL_HANDLE_KEY = "org.eclipse.swt.internal.motif.shellHandle"; //$NON-NLS-1$ byte [] displayName, appName, appClass; Event [] eventQueue; @@ -3375,16 +3376,42 @@ public static String getAppName () { return APP_NAME; } /** - * On platforms which support it, sets the application name - * to be the argument. On Motif, for example, this can be used - * to set the name used for resource lookup. Specifying - * <code>null</code> for the name clears it. + * Returns the application version. + * + * @return the application version + * + * @see #setAppVersion(String) + * + * @since 3.6 + */ +public static String getAppVersion () { + return APP_VERSION; +} +/** + * Sets the application name to the argument. + * <p> + * The application name can be used in several ways, + * depending on the platform and tools being used. + * On Motif, for example, this can be used to set + * the name used for resource lookup. Accessibility + * tools may also ask for the application name. + * </p><p> + * Specifying <code>null</code> for the name clears it. + * </p> * * @param name the new app name or <code>null</code> */ public static void setAppName (String name) { APP_NAME = name; } +/** + * Sets the application version to the argument. + * + * @param version the new app version + */ +public static void setAppVersion (String version) { + APP_VERSION = version; +} void setCurrentCaret (Caret caret) { if (caretID != 0) OS.XtRemoveTimeOut (caretID); caretID = 0; |