Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2012-02-24 19:20:44 +0000
committerFelipe Heidrich2012-02-24 19:20:44 +0000
commit07a88eddb83fb8bfd5273d2c8ffd9b59cdb7b4a0 (patch)
tree70b9ab617360d3f0bfd590ed61113bdee3c92fd2 /bundles
parentbaeb2750ab3cd98721ca3f9c69fc2805adaf6cf2 (diff)
parente048abbf58389e1cccd6d9514c87591bba0083f6 (diff)
downloadeclipse.platform.swt-07a88eddb83fb8bfd5273d2c8ffd9b59cdb7b4a0.tar.gz
eclipse.platform.swt-07a88eddb83fb8bfd5273d2c8ffd9b59cdb7b4a0.tar.xz
eclipse.platform.swt-07a88eddb83fb8bfd5273d2c8ffd9b59cdb7b4a0.zip
Merge branch 'master' into bug230854
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/Platform.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java45
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/Platform.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/Platform.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/Platform.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java12
-rw-r--r--bundles/org.eclipse.swt/buildFragment.xml21
19 files changed, 271 insertions, 30 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
index 0dec3ceb7b..d9e7156556 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
@@ -2384,7 +2384,8 @@ public class Accessible {
}
}
if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
- if (accessibleListeners.size() == 0) {
+ /* Process Text even if there are no apps listening. */
+ if (accessibleListeners.size() == 0 && !(control instanceof Text)) {
if (DEBUG) print(this + ".IAccessible::get_accName(" + v.lVal + ") returning name=" + osName + " from super" + hresult(code));
return code;
}
@@ -2393,6 +2394,15 @@ public class Accessible {
AccessibleEvent event = new AccessibleEvent(this);
event.childID = osToChildID(v.lVal);
event.result = osName;
+ /*
+ * Bug in Windows: A Text with SWT.SEARCH style uses EM_SETCUEBANNER
+ * to set the message text. This text should be used as the control's
+ * accessible name, however it is not. The fix is to return the message
+ * text here as the accName (unless there is a preceding label).
+ */
+ if (control instanceof Text && (control.getStyle() & SWT.SEARCH) != 0 && osName == null) {
+ event.result = ((Text) control).getMessage();
+ }
for (int i = 0; i < accessibleListeners.size(); i++) {
AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
listener.getName(event);
@@ -2594,7 +2604,8 @@ public class Accessible {
}
}
if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
- if (accessibleControlListeners.size() == 0) {
+ /* Process Text even if there are no apps listening. */
+ if (accessibleControlListeners.size() == 0 && !(control instanceof Text)) {
if (DEBUG) print(this + ".IAccessible::get_accValue(" + v.lVal + ") returning value=" + osValue + " from super" + hresult(code));
return code;
}
@@ -2603,6 +2614,15 @@ public class Accessible {
AccessibleControlEvent event = new AccessibleControlEvent(this);
event.childID = osToChildID(v.lVal);
event.result = osValue;
+ /*
+ * Bug in Windows: A Text with SWT.SEARCH style uses EM_SETCUEBANNER
+ * to set the message text. This text should be used as the control's
+ * accessible value when the control does not have focus, however it
+ * is not. The fix is to return the message text here as the accValue.
+ */
+ if (control instanceof Text && (control.getStyle() & SWT.SEARCH) != 0 && !control.isFocusControl()) {
+ event.result = ((Text) control).getMessage();
+ }
for (int i = 0; i < accessibleControlListeners.size(); i++) {
AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
listener.getValue(event);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/Platform.java
index e8a829be18..622e50c89b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/Platform.java
@@ -10,9 +10,13 @@
*******************************************************************************/
package org.eclipse.swt.internal;
+
public class Platform {
-
-public static final String PLATFORM = "carbon"; //$NON-NLS-1$
-public static final Lock lock = new Lock ();
+ public static final String PLATFORM = "carbon"; //$NON-NLS-1$
+ public static final Lock lock = new Lock ();
+
+public static boolean isLoadable () {
+ return Library.isLoadable ();
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java
index ef6bfb1040..e4e0cef19f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java
@@ -10,8 +10,13 @@
*******************************************************************************/
package org.eclipse.swt.internal;
+
public class Platform {
-
-public static final String PLATFORM = "cocoa"; //$NON-NLS-1$
-public static final Lock lock = new Lock ();
+ public static final String PLATFORM = "cocoa"; //$NON-NLS-1$
+ public static final Lock lock = new Lock ();
+
+public static boolean isLoadable () {
+ return Library.isLoadable ();
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index 39fc577bf4..010fe3c766 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -148,7 +148,9 @@ public class OS extends C {
public static final int /*long*/ sel_isCompatibleWithOverlayScrollers = sel_registerName("isCompatibleWithOverlayScrollers");
public static final int /*long*/ sel_flashScrollers = sel_registerName("flashScrollers");
public static final int /*long*/ sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_ = sel_registerName("frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:");
+ public static final int /*long*/ sel_scrollerStyle = sel_registerName("scrollerStyle");
public static final int NSScrollerStyleLegacy = 0;
+ public static final int NSScrollerStyleOverlay = 1;
/* AWT application delegate. Remove these when JavaRuntimeSupport.framework has bridgesupport generated for it. */
public static final int /*long*/ class_JRSAppKitAWT = objc_getClass("JRSAppKitAWT");
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
index 024b0e304c..f46ad3d27d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
@@ -11,6 +11,8 @@
package org.eclipse.swt.internal;
import java.io.*;
+import java.net.*;
+import java.util.jar.*;
public class Library {
@@ -162,6 +164,49 @@ static boolean extract (String fileName, String mappedName, StringBuffer message
return false;
}
+static boolean isLoadable () {
+ URL url = Platform.class.getClassLoader ().getResource ("org/eclipse/swt/internal/Library.class"); //$NON-NLS-1$
+ if (!url.getProtocol ().equals ("jar")) { //$NON-NLS-1$
+ /* SWT is presumably running in a development environment */
+ return true;
+ }
+
+ try {
+ url = new URL (url.getPath ());
+ } catch (MalformedURLException e) {
+ /* should never happen since url's initial path value must be valid */
+ }
+ String path = url.getPath ();
+ int index = path.indexOf ('!');
+ File file = new File (path.substring (0, index));
+
+ Attributes attributes = null;
+ try {
+ JarFile jar = new JarFile (file);
+ attributes = jar.getManifest ().getMainAttributes ();
+ } catch (IOException e) {
+ /* should never happen for a valid SWT jar with the expected manifest values */
+ return false;
+ }
+
+ String libraryOS = os ();
+ String libraryArch = arch ();
+ String manifestOS = attributes.getValue ("SWT-OS"); //$NON-NLS-1$
+ String manifestArch = attributes.getValue ("SWT-Arch"); //$NON-NLS-1$
+ if (libraryArch.equals (manifestArch) && libraryOS.equals (manifestOS)) {
+ return true;
+ }
+
+ /*
+ * Mac has a special case since SWT's 32-bit libraries on Mac contain natives
+ * for both the x86 and PPC architectures.
+ */
+ if (libraryOS.equals ("macosx") && libraryOS.equals (manifestOS)) {
+ return manifestArch.equals ("x86") && libraryArch.equals ("ppc"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return false;
+}
+
static boolean load (String libName, StringBuffer message) {
try {
if (libName.indexOf (SEPARATOR) != -1) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java
index 7881f7080a..13a7402492 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java
@@ -14,7 +14,13 @@
*******************************************************************************/
package org.eclipse.swt.internal;
+
public class Platform {
public static final String PLATFORM = "gtk"; //$NON-NLS-1$
- public static final Lock lock = new Lock();
+ public static final Lock lock = new Lock ();
+
+public static boolean isLoadable () {
+ return Library.isLoadable ();
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 62c283bcab..12857a1e6a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -14,7 +14,7 @@
*******************************************************************************/
package org.eclipse.swt.internal.gtk;
-
+
import org.eclipse.swt.internal.*;
public class OS extends C {
@@ -577,7 +577,7 @@ public class OS extends C {
public static final boolean USE_CAIRO, INIT_CAIRO;
static {
boolean useCairo = false;
- if ("true".equals(System.getProperty("org.eclipse.swt.internal.gtk.cairoGraphics"))) {
+ if (!"false".equals(System.getProperty("org.eclipse.swt.internal.gtk.cairoGraphics"))) {
useCairo = GTK_VERSION >= VERSION(2, 24, 0);
}
USE_CAIRO = useCairo;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/Platform.java
index f49818aa28..deb3f482c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/Platform.java
@@ -10,7 +10,13 @@
*******************************************************************************/
package org.eclipse.swt.internal;
+
public class Platform {
public static final String PLATFORM = "motif"; //$NON-NLS-1$
- public static final Lock lock = new Lock();
+ public static final Lock lock = new Lock ();
+
+public static boolean isLoadable () {
+ return Library.isLoadable ();
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/Platform.java
index 574ac5a1b4..6ebf9202d5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/Platform.java
@@ -10,8 +10,12 @@
*******************************************************************************/
package org.eclipse.swt.internal;
+
public class Platform {
-
-public static final String PLATFORM = "photon"; //$NON-NLS-1$
+ public static final String PLATFORM = "photon"; //$NON-NLS-1$
+
+public static boolean isLoadable () {
+ return Library.isLoadable ();
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java
index 9fae8d8b3b..14d93f4c4e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java
@@ -10,8 +10,13 @@
*******************************************************************************/
package org.eclipse.swt.internal;
+
public class Platform {
-
-public static final String PLATFORM = "win32"; //$NON-NLS-1$
-public static final Lock lock = new Lock ();
+ public static final String PLATFORM = "win32"; //$NON-NLS-1$
+ public static final Lock lock = new Lock ();
+
+public static boolean isLoadable () {
+ return Library.isLoadable ();
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/Platform.java
index af0286f6b3..7607ac95a3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/Platform.java
@@ -12,6 +12,10 @@ package org.eclipse.swt.internal;
public class Platform {
-public static final String PLATFORM = "wpf";
+ public static final String PLATFORM = "wpf";
+
+public static boolean isLoadable () {
+ return Library.isLoadable ();
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
index 770be6ba9d..6ba655788f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
@@ -220,6 +220,38 @@ public ScrollBar getHorizontalBar () {
}
/**
+ * Returns the mode of the receiver's scrollbars. This will be
+ * <em>bitwise</em> OR of one or more of the constants defined in class
+ * <code>SWT</code>.<br>
+ * <li><code>SWT.SCROLLBAR_OVERLAY</code> - if receiver
+ * uses overlay scrollbars</li>
+ * <li><code>SWT.NONE</code> - otherwise</li>
+ *
+ * @return the mode of scrollbars
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been
+ * disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
+ * thread that created the receiver</li>
+ * </ul>
+ *
+ * @see SWT#SCROLLBAR_OVERLAY
+ *
+ * @since 3.8
+ */
+public int getScrollbarsMode () {
+ checkWidget();
+ int style = SWT.NONE;
+ if (scrollView != null && OS.VERSION >= 0x1070) {
+ if (OS.objc_msgSend (scrollView.id, OS.sel_scrollerStyle) == OS.NSScrollerStyleOverlay) {
+ style = SWT.SCROLLBAR_OVERLAY;
+ }
+ }
+ return style;
+}
+
+/**
* Returns the receiver's vertical scroll bar if it has
* one, and null if it does not.
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
index b842321ae6..c6f423843a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
@@ -156,11 +156,6 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
return super.computeTrim (x, y, width, height);
}
-NSAttributedString createString(String text) {
- NSAttributedString attribStr = createString(text, null, foreground, 0, false, true, true);
- return attribStr;
-}
-
void createHandle () {
NSTabView widget = (NSTabView)new SWTTabView().alloc();
widget.init ();
@@ -501,15 +496,17 @@ void reskinChildren (int flags) {
void setFont (NSFont font) {
((NSTabView)view).setFont(font);
+ int index = getSelectionIndex();
for (int i = 0; i < itemCount; i++) {
- items[i].updateText();
+ items[i].updateText(i == index);
}
}
void setForeground (float /*double*/ [] color) {
super.setForeground(color);
+ int index = getSelectionIndex();
for (int i = 0; i < itemCount; i++) {
- items[i].updateText();
+ items[i].updateText(i == index);
}
}
@@ -644,6 +641,7 @@ void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long
if (currentIndex != -1) {
TabItem selected = items [currentIndex];
if (selected != null) {
+ if (OS.VERSION >= 0x1070) selected.updateText(false);
Control control = selected.control;
if (control != null && !control.isDisposed ()) {
control.setVisible (false);
@@ -654,6 +652,7 @@ void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long
if (control != null && !control.isDisposed ()) {
control.setVisible (true);
}
+ if (OS.VERSION >= 0x1070) item.updateText(true);
break;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
index 481c041fb7..697dd89337 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
@@ -433,10 +433,19 @@ String tooltipText () {
}
void updateText () {
+ NSTabViewItem selected = ((NSTabView)parent.view).selectedTabViewItem();
+ updateText(selected != null && selected.id == nsItem.id);
+}
+
+void updateText (boolean selected) {
if (attriStr != null) {
attriStr.release();
}
- attriStr = parent.createString(getText());
+ float /*double*/ [] foreground = parent.foreground;
+ if (foreground == null && selected && OS.VERSION >= 0x1070) {
+ foreground = display.getNSColorRGB(NSColor.alternateSelectedControlTextColor());
+ }
+ attriStr = parent.createString(text, null, foreground, 0, false, true, true);
//force parent to resize
nsItem.setLabel(NSString.string());
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
index ca2a46a3fd..4158e426fc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
@@ -4086,8 +4086,30 @@ public class SWT {
* @since 3.6
*/
public static final String SKIN_ID = "org.eclipse.swt.skin.id";
-
+ /**
+ * The <code>Scrollable</code> constant to indicate that
+ * the receiver is using overlay scrollbars. (value is 1)
+ *
+ * @since 3.8
+ */
+ public static final int SCROLLBAR_OVERLAY = 1 << 1;
+
+
+/**
+ * Returns a boolean indicating whether this SWT implementation can
+ * be loaded. Examples of criteria that may be used to determine this
+ * include the OS and architecture of the JRE that is being used.
+ *
+ * @return <code>true</code> if this SWT implementation can be loaded
+ * and <code>false</code> otherwise
+ *
+ * @since 3.8
+ */
+public static boolean isLoadable () {
+ return Platform.isLoadable ();
+}
+
/**
* Answers a concise, human readable description of the error code.
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
index 8c94163ffd..5eaf82f087 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
@@ -218,6 +218,31 @@ public ScrollBar getHorizontalBar () {
return horizontalBar;
}
/**
+ * Returns the mode of the receiver's scrollbars. This will be
+ * <em>bitwise</em> OR of one or more of the constants defined in class
+ * <code>SWT</code>.<br>
+ * <li><code>SWT.SCROLLBAR_OVERLAY</code> - if receiver
+ * uses overlay scrollbars</li>
+ * <li><code>SWT.NONE</code> - otherwise</li>
+ *
+ * @return the mode of scrollbars
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been
+ * disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
+ * thread that created the receiver</li>
+ * </ul>
+ *
+ * @see SWT#SCROLLBAR_OVERLAY
+ *
+ * @since 3.8
+ */
+public int getScrollbarsMode () {
+ checkWidget();
+ return SWT.NONE;
+}
+/**
* Returns the receiver's vertical scroll bar if it has
* one, and null if it does not.
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
index 73bfc18af0..82a8b138a8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
@@ -199,6 +199,32 @@ public ScrollBar getHorizontalBar () {
}
/**
+ * Returns the mode of the receiver's scrollbars. This will be
+ * <em>bitwise</em> OR of one or more of the constants defined in class
+ * <code>SWT</code>.<br>
+ * <li><code>SWT.SCROLLBAR_OVERLAY</code> - if receiver
+ * uses overlay scrollbars</li>
+ * <li><code>SWT.NONE</code> - otherwise</li>
+ *
+ * @return the mode of scrollbars
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been
+ * disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
+ * thread that created the receiver</li>
+ * </ul>
+ *
+ * @see SWT#SCROLLBAR_OVERLAY
+ *
+ * @since 3.8
+ */
+public int getScrollbarsMode () {
+ checkWidget();
+ return SWT.NONE;
+}
+
+/**
* Returns the receiver's vertical scroll bar if it has
* one, and null if it does not.
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 78b6b271a5..a641f0b630 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -2703,6 +2703,18 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
+LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+ /*
+ * Ensure that there is an accessible object created for this
+ * control because support for search text accessibility is
+ * implemented in the accessibility package.
+ */
+ if ((style & SWT.SEARCH) != 0) {
+ if (accessible == null) accessible = new_Accessible (this);
+ }
+ return super.WM_GETOBJECT (wParam, lParam);
+}
+
LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
/* Process a DBCS character */
diff --git a/bundles/org.eclipse.swt/buildFragment.xml b/bundles/org.eclipse.swt/buildFragment.xml
index a983168835..6363a9c71b 100644
--- a/bundles/org.eclipse.swt/buildFragment.xml
+++ b/bundles/org.eclipse.swt/buildFragment.xml
@@ -491,14 +491,24 @@
<param name="debug" value="true" />
<param name="jar.filename" value="swt-debug.jar" />
</antcall>
- <jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${fragmentdir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
+ <jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${fragmentdir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2">
+ <manifest>
+ <attribute name="SWT-OS" value="${swt.os}"/>
+ <attribute name="SWT-Arch" value="${swt.arch}"/>
+ </manifest>
+ </jar>
<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
<delete dir="${build.result.folder}/@dot" />
<antcall target="build.jars">
<param name="debug" value="false" />
<param name="jar.filename" value="swt.jar" />
</antcall>
- <jar jarfile="${build.result.folder}/swt.jar" basedir="${fragmentdir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
+ <jar jarfile="${build.result.folder}/swt.jar" basedir="${fragmentdir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2">
+ <manifest>
+ <attribute name="SWT-OS" value="${swt.os}"/>
+ <attribute name="SWT-Arch" value="${swt.arch}"/>
+ </manifest>
+ </jar>
<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
<antcall target="build.sources" />
<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
@@ -553,7 +563,12 @@
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/" />
</antcall>
- <jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${fragmentdir}/META-INF/MANIFEST.MF"/>
+ <jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${fragmentdir}/META-INF/MANIFEST.MF">
+ <manifest>
+ <attribute name="SWT-OS" value="${swt.os}"/>
+ <attribute name="SWT-Arch" value="${swt.arch}"/>
+ </manifest>
+ </jar>
<delete dir="${temp.folder}" />
</target>

Back to the top