summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse
diff options
context:
space:
mode:
authorCarolyn MacLeod <carolyn>2010-03-03 16:04:21 +0000
committerCarolyn MacLeod <carolyn>2010-03-03 16:04:21 +0000
commit9118b17649921c279dca57761fa1804da2d059b8 (patch)
treed18659a4f23ec908891b221171fc8bcb69ba0bbe /bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse
parent91cbac665e00ff8279ee6aa81d7b2e19f5a40d94 (diff)
downloadeclipse.platform.swt-9118b17649921c279dca57761fa1804da2d059b8.tar.gz
eclipse.platform.swt-9118b17649921c279dca57761fa1804da2d059b8.tar.xz
eclipse.platform.swt-9118b17649921c279dca57761fa1804da2d059b8.zip
adding getAppVersion() API
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java35
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;