blob: 415d2095d239e63e713b21de3548af306cf08ffc [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
p, table, td, th { font-family: verdana, arial, helvetica, geneva; font-size: 10pt}
pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
h2 { font-family: verdana, arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
code { font-family: "Courier New", Courier, mono; font-size: 10pt}
sup { font-family: verdana, arial, helvetica, geneva; font-size: 10px}
h3 { font-family: verdana, arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
li { font-family: verdana, arial, helvetica, geneva; font-size: 10pt}
h1 { font-family: verdana, arial, helvetica, geneva; font-size: 24pt; font-weight: bold}
body { font-family: verdana, arial, helvetica, geneva; font-size: 10pt; margin-top: 5mm; margin-left: 3mm}
.indextop { font-size: x-large; font-family: verdana, arial, helvetica, sans-serif; font-weight: bold}
.indexsub { font-size: xx-small; font-family: verdana, arial, helvetica, sans-serif; color: #8080FF}
a.bar:link { text-decoration: none; color: #FFFFFF}
a.bar:visited { color: #FFFFFF; text-decoration: none}
a.bar:hover { color: #FFFFFF; text-decoration: underline}
a.bar { color: #FFFFFF}
.section {font-size: 20px; font-weight: bold;}
table.news td {border-top: solid thin black;}
table.news tr {vertical-align: top;}
table.news tr td.title {vertical-align: top; width: 30%; font-weight: bold;}
table.news tr td.content {vertical-align: top; width: 70%;}
</style>
<title>Eclipse &quot;New and Noteworthy&quot; Template</title>
</head>
<body>
<h1><font face="Verdana">Eclipse 4.5 (Mars) - New and Noteworthy in SWT</font></h1>
<ul>
<li><a href="#m3">Milestone M3</a></li>
<li><a href="#m4">Milestone M4</a></li>
<li><a href="#m5">Milestone M5</a></li>
<li><a href="#m6">Milestone M6</a></li>
<li><a href="#m7">Milestone M7</a></li>
<li><a href="#rc1">Release Candidate 1</a></li>
</ul>
<table class="news" border="0" cellpadding="10" cellspacing="0" width="80%" summary="news entries">
<tr>
<td id="m3" class="section" colspan="2"><h2>Milestone M3</h2></td>
</tr>
<tr id="date-time-on-gtk-spin-button">
<td class="title">The DateTime widget now uses GtkSpinButton on UNIX/Linux platforms</td>
<td class="content">
The DateTime widget has been re-implemented to use the GtkSpinButton widget for
<code>SWT.DATE</code> and <code>SWT.TIME</code> styles. The new look and feel is as illustrated below:
<p><b>GTK+ 2:</b></p>
<p>
<img src="images/gtk2-date-time.png" alt="" />
</p>
<p><b>GTK+ 3:</b></p>
<p>
<img src="images/gtk3-date-time.png" alt="" />
</p>
</td>
</tr>
<tr id="sleep-wakeup-deprecated-replaced">
<td class="title">New monitoring events added in place of SWT.Sleep and SWT.Wakeup</td>
<td class="content">
The <code>SWT.Sleep</code> and <code>SWT.Wakeup</code> events have been deprecated
in favor of the more generic events <code>SWT.PreExternalEventDispatch</code> and
<code>SWT.PostExternalEventDispatch</code>, respectively. Clients that were written
using the old event names should be updated to refer to the new events.
</td>
</tr>
<tr id="gtk-supported-versions-update">
<td class="title">Dropped support for GTK+ 2 versions older than 2.18</td>
<td class="content">
GTK+ 2.18.0 or later (and its dependencies) will be the pre-requisites necessary to
run Eclipse successfully on all Linux/UNIX platforms as opposed to GTK+ 2.10.0 earlier.
Support for all versions older than 2.18 has been dropped effective Mars M3 milestone release.
<p>
Note: As of now, Eclipse logs a warning and continues to run when a GTK+ version older than 2.18.0
is detected, but that behavior will soon be changed to not run Eclipse with unsupported versions.
</p>
</td>
</tr>
<tr>
<td id="m4" class="section" colspan="2"><h2>Milestone M4</h2></td>
</tr>
<tr id="menuitem-tooltip">
<td class="title">Added API to set tooltip for MenuItem</td>
<td class="content">
SWT now supports setting a tooltip on menu items via <code>MenuItem.setToolTipText()</code>.
<p>
For an example, see the <b>Menu</b> tab in the <a href="https://www.eclipse.org/swt/examples.php">ControlExample</a>.</p>
<p>
<img src="images/tooltip.png" alt="" />
</p>
</td>
</tr>
<tr>
<td id="m5" class="section" colspan="2"><h2>Milestone M5</h2></td>
</tr>
<tr id="transparent-bg">
<td class="title">Transparent background for Control</td>
<td class="content">
<p>SWT has added support to set a <code>Control</code>'s background as transparent. The <code>Color</code> class now supports specifying a alpha value (integer: 0 to 255) for transparency.
Calling <code>Control#setBackground(Color color)</code> with a transparent color (color with alpha value '0'), sets the control's background as transparent.</p>
<p><b>List of New Classes and APIs:</b></p>
<ul>
<li>Class: <code>org.eclipse.swt.graphics.RGBA</code></li>
<li>Constant: <code>SWT.COLOR_TRANSPARENT</code> - This is a default transparent color</li>
<li>Methods added in <code>org.eclipse.swt.graphics.Color</code></li>
<ul>
<li><code>public Color (Device device, int red, int green, int blue, int alpha)</code></li>
<li><code>public Color (Device device, RGB rgb, int alpha)</code></li>
<li><code>public Color (Device device, RGBA rgba)</code></li>
<li><code>public RGBA getRGBA </code>()</li>
<li><code>public int getAlpha ()</code></li>
</ul>
</ul>
<p><b>Note:</b></p>
<ul>
<li>Currently, SWT honors only extreme values for alpha i.e, '0'(transparent) or '255'(opaque).</li>
<li>Setting transparent background color fails for some controls on all platforms, they show the default background color instead. For e.g. Text, Combo.</li>
<li>Setting transparent background color for some controls works on GTK3 only, it fails on other platforms. For e.g. Table, Tree.</li>
</ul>
For an example on using the new APIs, see <a href="http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet365.java">Snippet365</a>.
<p>
<b>Snippet365 in action</b> (Controls with <code>SWT.COLOR_TRANSPARENT</code> background and Shell with gradient background image)
</p>
<p>
<img src="images/transparent_control_background.png" alt="Transparent Background on Control widgets" />
</p>
</td>
</tr>
<tr id="swt-tools">
<td class="title">SWT Tools</td>
<td class="content">
<a href="https://www.eclipse.org/swt/tools.php">SWT Tools</a> are now available in the Eclipse Platform P2 repository.
SWT Tools provides tools for developing SWT itself (JNIGen) but also general purpose tools Sleak
(monitors the creation and disposal of SWT graphics resources) and SWT Spy (prints out information like style, layout and parent
about the widget under the cursor).
</td>
</tr>
<tr>
<td id="m6" class="section" colspan="2"><h2>Milestone M6</h2></td>
</tr>
<tr id="high-dpi">
<td class="title">APIs for high-DPI monitor support</td>
<td class="content">
New APIs have been added to provide support for rendering high-resolution images on high-DPI monitors.
<p>
Two constructors have been added to the <code>Image</code> class. They accept
image-provider callbacks that allow clients to supply resolution-dependent versions
of images:
</p>
<pre>public interface ImageDataProvider {
public ImageData getImageData (int zoom);
}
public interface ImageFileNameProvider {
public String getImagePath (int zoom);
}</pre>
<p>
Depending on the user's monitor configuration, SWT will request images with the
corresponding zoom level. Here's an example that displays 3 original images,
followed by variants whose resolution changes depending your monitor's resolution:
<a href="http://git.eclipse.org/c/platform/eclipse.platform.swt.git/plain/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet367.java">Snippet367.java</a>.
</p>
<p>
Note that this is just the first step to support high-resolution images in
SWT and Eclipse-based applications. Work is underway to adopt the new APIs in
the platform. Futhermore, more work in SWT is required to properly
support drawing into high-resolution images via <code>GC</code>.
</p>
</td>
</tr>
<tr id="evaluate">
<td class="title">API to choose security context in Browser#evaluate()</td>
<td class="content">
A new API <code>Browser#evaluate(String script, boolean trusted)</code> has been added that allows the client to run
Javascript code in the Chrome security context or in the normal security context for <code>SWT.MOZILLA</code>
style browsers.
</td>
</tr>
<tr>
<td id="m7" class="section" colspan="2"><h2>Milestone M7</h2></td>
</tr>
<tr id="xulr-31-support">
<td class="title">SWT Browser now supports XULRunner 31.x</td>
<td class="content">
An SWT Browser created with style <code>SWT.MOZILLA</code> can now be used with the XULRunner 31.x
runtime on Windows and Mac OSX.
<p>
Note: XULRunner 31 support is not available on Linux for Mars release.
For details, please see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=467646">Bug 467646</a>.
</p>
</td>
</tr>
<tr>
<td id="rc1" class="section" colspan="2"><h2>Release Candidate 1</h2></td>
</tr>
<tr id="auto-text-direction">
<td class="title">BIDI: SWT Controls now support AUTO text direction</td>
<td class="content">
The auto (a.k.a. "contextual") text direction implies that the base text direction is derived from the direction
of the first strong (either LTR or RTL) bidi character. Auto text direction is the most appropriate choice when
the text content is not known in advance and, hence, it is not yet possible to decide which base direction value,
LTR or RTL, would be most suitable at run time.
<br />
Support for auto text direction has been introduced at the SWT Control level. Auto text direction can be applied
through the existing <code>Control#setTextDirection</code> API. The new value for auto direction is expressed as
the bitwise disjunction of (<code>SWT#LEFT_TO_RIGHT</code> | <code>SWT#RIGHT_TO_LEFT</code>) bit fields. When
applied onto a Composite control, the auto base direction (similarly to LTR and RTL ones) is inherited by the
child components.
<br />
For example:
<ul>
<li><code>org.eclipse.swt.widgets.Table.setTextDirection(SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);</code></li>
</ul>
Result:
<p>
<img src="images/auto-text-direction.png" alt=""/>
</p>
<b>Note:</b> Auto text direction is not yet supported:
<ul>
<li>in StyledText</li>
<li>upon Control creation (but only through <code>Control#setTextDirection</code> call once the Control has been created)</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2"/>
</tr>
</table>
</body>
</html>