Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-09-18 10:02:13 +0000
committerAlexander Kurtakov2018-09-18 10:02:13 +0000
commit5aaa769fe2c861fdfc99b68ccae80e1d5de8da65 (patch)
tree9aae9649b816cf377e830f7f6fee6ef2b60a8421 /bundles
parent5fb9cdd4804ec8972f3244aaf56ef78ce9e41520 (diff)
downloadeclipse.platform.swt-5aaa769fe2c861fdfc99b68ccae80e1d5de8da65.tar.gz
eclipse.platform.swt-5aaa769fe2c861fdfc99b68ccae80e1d5de8da65.tar.xz
eclipse.platform.swt-5aaa769fe2c861fdfc99b68ccae80e1d5de8da65.zip
Rename Color.handleRGBA to handle.
Now that there is only GdkRGBA based implementation it's better to use the standard naming. Change-Id: I76ce31d7571e8462b44998ec7b86d81529ca23f7 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java10
19 files changed, 83 insertions, 83 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
index 2fc7b2e951..f0c77b70e5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
@@ -3023,7 +3023,7 @@ class AccessibleObject {
if (color != null && !color.isDisposed()) {
long /*int*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
attr.name = OS.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_FG_COLOR));
- attr.value = getStringPtr ((color.handleRGBA.red * 255) + "," + (color.handleRGBA.green * 255) + "," + (color.handleRGBA.blue * 255)); //$NON-NLS-1$ //$NON-NLS-2$
+ attr.value = getStringPtr ((color.handle.red * 255) + "," + (color.handle.green * 255) + "," + (color.handle.blue * 255)); //$NON-NLS-1$ //$NON-NLS-2$
ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
result = OS.g_slist_append(result, attrPtr);
}
@@ -3031,7 +3031,7 @@ class AccessibleObject {
if (color != null && !color.isDisposed()) {
long /*int*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
attr.name = OS.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_BG_COLOR));
- attr.value = getStringPtr ((color.handleRGBA.red * 255) + "," + (color.handleRGBA.green * 255) + "," + (color.handleRGBA.blue * 255)); //$NON-NLS-1$ //$NON-NLS-2$
+ attr.value = getStringPtr ((color.handle.red * 255) + "," + (color.handle.green * 255) + "," + (color.handle.blue * 255)); //$NON-NLS-1$ //$NON-NLS-2$
ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
result = OS.g_slist_append(result, attrPtr);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
index fb2ca6a97a..d868f900b5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -403,8 +403,8 @@ public long /*int*/ internal_new_GC(GCData data) {
}
data.device = this;
data.drawable = drawable;
- data.backgroundRGBA = getSystemColor (SWT.COLOR_WHITE).handleRGBA;
- data.foregroundRGBA = getSystemColor (SWT.COLOR_BLACK).handleRGBA;
+ data.backgroundRGBA = getSystemColor (SWT.COLOR_WHITE).handle;
+ data.foregroundRGBA = getSystemColor (SWT.COLOR_BLACK).handle;
data.font = getSystemFont ();
Point dpi = getDPI(), screenDPI = getIndependentDPI();
data.width = (int)(GTK.gtk_page_setup_get_paper_width (pageSetup, GTK.GTK_UNIT_POINTS) * dpi.x / screenDPI.x);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java
index 84e562a651..a31abb1d3c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java
@@ -48,7 +48,7 @@ public final class Color extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public GdkRGBA handleRGBA;
+ public GdkRGBA handle;
int alpha = 0;
Color(Device device) {
@@ -210,7 +210,7 @@ public Color(Device device, RGB rgb, int alpha) {
@Override
void destroy() {
- handleRGBA = null;
+ handle = null;
}
/**
@@ -228,11 +228,11 @@ public boolean equals(Object object) {
if (object == this) return true;
if (!(object instanceof Color)) return false;
Color color = (Color)object;
- GdkRGBA gdkRGBA = color.handleRGBA;
- if (handleRGBA == gdkRGBA) return true;
- return device == color.device && Double.compare(handleRGBA.red, gdkRGBA.red) == 0 &&
- Double.compare(handleRGBA.green, gdkRGBA.green) == 0 && Double.compare(handleRGBA.blue, gdkRGBA.blue) == 0 &&
- Double.compare(handleRGBA.alpha, gdkRGBA.alpha) == 0;
+ GdkRGBA gdkRGBA = color.handle;
+ if (handle == gdkRGBA) return true;
+ return device == color.device && Double.compare(handle.red, gdkRGBA.red) == 0 &&
+ Double.compare(handle.green, gdkRGBA.green) == 0 && Double.compare(handle.blue, gdkRGBA.blue) == 0 &&
+ Double.compare(handle.alpha, gdkRGBA.alpha) == 0;
}
/**
@@ -261,7 +261,7 @@ public int getAlpha() {
*/
public int getBlue() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- return (int) (handleRGBA.blue * 255) & 0xFF;
+ return (int) (handle.blue * 255) & 0xFF;
}
/**
@@ -275,7 +275,7 @@ public int getBlue() {
*/
public int getGreen() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- return (int) (handleRGBA.green * 255) & 0xFF;
+ return (int) (handle.green * 255) & 0xFF;
}
/**
@@ -289,7 +289,7 @@ public int getGreen() {
*/
public int getRed() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- return (int) (handleRGBA.red * 255) & 0xFF;
+ return (int) (handle.red * 255) & 0xFF;
}
/**
@@ -305,8 +305,8 @@ public int getRed() {
@Override
public int hashCode() {
if (isDisposed()) return 0;
- return Double.hashCode(handleRGBA.red) ^ Double.hashCode(handleRGBA.green) ^ Double.hashCode(handleRGBA.blue)
- ^ Double.hashCode(handleRGBA.alpha);
+ return Double.hashCode(handle.red) ^ Double.hashCode(handle.green) ^ Double.hashCode(handle.blue)
+ ^ Double.hashCode(handle.alpha);
}
/**
@@ -355,7 +355,7 @@ public RGBA getRGBA () {
*/
public static Color gtk_new(Device device, GdkRGBA gdkRGBA) {
Color color = new Color(device);
- color.handleRGBA = gdkRGBA;
+ color.handle = gdkRGBA;
color.alpha = (int) (gdkRGBA.alpha * 255);
return color;
}
@@ -378,7 +378,7 @@ public static Color gtk_new(Device device, GdkRGBA gdkRGBA) {
*/
public static Color gtk_new(Device device, GdkRGBA gdkRGBA, int alpha) {
Color color = new Color(device);
- color.handleRGBA = gdkRGBA;
+ color.handle = gdkRGBA;
color.alpha = alpha;
return color;
}
@@ -412,7 +412,7 @@ void init(int red, int green, int blue, int alpha) {
rgba.blue = (double) blue / 255;
rgba.alpha = (double) alpha / 255;
this.alpha = alpha;
- handleRGBA = rgba;
+ handle = rgba;
}
/**
@@ -427,7 +427,7 @@ void init(int red, int green, int blue, int alpha) {
*/
@Override
public boolean isDisposed() {
- return handleRGBA == null;
+ return handle == null;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index 980d7a3290..aefa8a32e1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -2800,7 +2800,7 @@ public void setBackground(Color color) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (color == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- data.backgroundRGBA = color.handleRGBA;
+ data.backgroundRGBA = color.handle;
data.backgroundPattern = null;
data.state &= ~(BACKGROUND | BACKGROUND_BG);
}
@@ -2867,7 +2867,7 @@ static void setCairoRegion(long /*int*/ cairo, long /*int*/ rgn) {
}
static void setCairoPatternColor(long /*int*/ pattern, int offset, Color c, int alpha) {
- GdkRGBA rgba = c.handleRGBA;
+ GdkRGBA rgba = c.handle;
Cairo.cairo_pattern_add_color_stop_rgba(pattern, offset, rgba.red, rgba.green, rgba.blue, alpha / 255f);
}
@@ -3197,7 +3197,7 @@ public void setForeground(Color color) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (color == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- data.foregroundRGBA = color.handleRGBA;
+ data.foregroundRGBA = color.handle;
data.foregroundPattern = null;
data.state &= ~FOREGROUND;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
index 8f914b3f37..614fc6a1e5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
@@ -1459,8 +1459,8 @@ public long /*int*/ internal_new_GC (GCData data) {
}
data.device = device;
data.drawable = pixmap;
- data.foregroundRGBA = device.COLOR_BLACK.handleRGBA;
- data.backgroundRGBA = device.COLOR_WHITE.handleRGBA;
+ data.foregroundRGBA = device.COLOR_BLACK.handle;
+ data.backgroundRGBA = device.COLOR_WHITE.handle;
data.font = device.systemFont;
data.image = this;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
index 6750fde25b..03c0026096 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
@@ -221,7 +221,7 @@ void computeRuns () {
if (style.foreground == null) {
// Bug 497071: use COLOR_LINK_FOREGROUND for StyledText links
long /*int*/ attr;
- GdkRGBA linkRGBA = device.getSystemColor(SWT.COLOR_LINK_FOREGROUND).handleRGBA;
+ GdkRGBA linkRGBA = device.getSystemColor(SWT.COLOR_LINK_FOREGROUND).handle;
// Manual conversion since PangoAttrColor is a special case.
// It uses GdkColor style colors but is supported on GTK3.
attr = OS.pango_attr_foreground_new((short)(linkRGBA.red * 0xFFFF),
@@ -244,7 +244,7 @@ void computeRuns () {
OS.pango_attr_list_insert(attrList, attr);
OS.pango_attr_list_insert(selAttrList, OS.pango_attribute_copy(attr));
if (style.underlineColor != null) {
- GdkRGBA rgba = style.underlineColor.handleRGBA;
+ GdkRGBA rgba = style.underlineColor.handle;
attr = OS.pango_attr_underline_color_new((short)(rgba.red * 0xFFFF),
(short)(rgba.green * 0xFFFF), (short)(rgba.blue * 0xFFFF));
if (attr != 0) {
@@ -266,7 +266,7 @@ void computeRuns () {
OS.pango_attr_list_insert(attrList, attr);
OS.pango_attr_list_insert(selAttrList, OS.pango_attribute_copy(attr));
if (style.strikeoutColor != null) {
- GdkRGBA rgba = style.strikeoutColor.handleRGBA;
+ GdkRGBA rgba = style.strikeoutColor.handle;
attr = OS.pango_attr_strikethrough_color_new((short)(rgba.red * 0xFFFF),
(short)(rgba.green * 0xFFFF), (short)(rgba.blue * 0xFFFF));
if (attr != 0) {
@@ -282,7 +282,7 @@ void computeRuns () {
Color foreground = style.foreground;
if (foreground != null && !foreground.isDisposed()) {
long /*int*/ attr;
- GdkRGBA rgba = foreground.handleRGBA;
+ GdkRGBA rgba = foreground.handle;
attr = OS.pango_attr_foreground_new((short)(rgba.red * 0xFFFF),
(short)(rgba.green * 0xFFFF), (short)(rgba.blue * 0xFFFF));
OS.memmove (attribute, attr, PangoAttribute.sizeof);
@@ -294,7 +294,7 @@ void computeRuns () {
Color background = style.background;
if (background != null && !background.isDisposed()) {
long /*int*/ attr;
- GdkRGBA rgba = background.handleRGBA;
+ GdkRGBA rgba = background.handle;
attr = OS.pango_attr_background_new((short)(rgba.red * 0xFFFF),
(short)(rgba.green * 0xFFFF), (short)(rgba.blue * 0xFFFF));
OS.memmove (attribute, attr, PangoAttribute.sizeof);
@@ -478,7 +478,7 @@ void drawInPixels(GC gc, int x, int y, int selectionStart, int selectionEnd, Col
long /*int*/ iter = OS.pango_layout_get_iter(layout);
if (selectionBackground == null) selectionBackground = device.getSystemColor(SWT.COLOR_LIST_SELECTION);
Cairo.cairo_save(cairo);
- GdkRGBA rgba = selectionBackground.handleRGBA;
+ GdkRGBA rgba = selectionBackground.handle;
Cairo.cairo_set_source_rgba(cairo, rgba.red, rgba.green, rgba.blue, rgba.alpha);
int lineIndex = 0;
do {
@@ -591,11 +591,11 @@ void drawWithCairo(GC gc, int x, int y, int start, int end, boolean fullSelectio
if (rgn != 0) {
GDK.gdk_cairo_region(cairo, rgn);
Cairo.cairo_clip(cairo);
- Cairo.cairo_set_source_rgba(cairo, bg.handleRGBA.red, bg.handleRGBA.green, bg.handleRGBA.blue, bg.handleRGBA.alpha);
+ Cairo.cairo_set_source_rgba(cairo, bg.handle.red, bg.handle.green, bg.handle.blue, bg.handle.alpha);
Cairo.cairo_paint(cairo);
GDK.gdk_region_destroy(rgn);
}
- Cairo.cairo_set_source_rgba(cairo, fg.handleRGBA.red, fg.handleRGBA.green, fg.handleRGBA.blue, fg.handleRGBA.alpha);
+ Cairo.cairo_set_source_rgba(cairo, fg.handle.red, fg.handle.green, fg.handle.blue, fg.handle.alpha);
Cairo.cairo_move_to(cairo, x, y);
OS.pango_layout_set_attributes(layout, selAttrList);
OS.pango_cairo_show_layout(cairo, layout);
@@ -633,9 +633,9 @@ void drawBorder(GC gc, int x, int y, Color selectionColor) {
Region.gdk_region_get_rectangles(rgn, rects, nRects);
GdkRectangle rect = new GdkRectangle();
GdkRGBA colorRGBA = null;
- if (colorRGBA == null && style.borderColor != null) colorRGBA = style.borderColor.handleRGBA;
- if (colorRGBA == null && selectionColor != null) colorRGBA = selectionColor.handleRGBA;
- if (colorRGBA == null && style.foreground != null) colorRGBA = style.foreground.handleRGBA;
+ if (colorRGBA == null && style.borderColor != null) colorRGBA = style.borderColor.handle;
+ if (colorRGBA == null && selectionColor != null) colorRGBA = selectionColor.handle;
+ if (colorRGBA == null && style.foreground != null) colorRGBA = style.foreground.handle;
if (colorRGBA == null) colorRGBA = data.foregroundRGBA;
int width = 1;
float[] dashes = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index 03c26c5437..6bd2c943e9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -565,11 +565,11 @@ public void cut () {
@Override
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
GdkRGBA defaultButtonBackground () {
- return display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).handle;
}
@Override
@@ -2036,8 +2036,8 @@ void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rg
css += "background: " + color + ";}\n";
// Set the selected background color
- GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handleRGBA;
- GdkRGBA selectedForeground = display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT).handleRGBA;
+ GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
+ GdkRGBA selectedForeground = display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT).handle;
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "entry" : "GtkEntry";
String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? " selection" : ":selected";
css += name + selection + " {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n";
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 62148817bf..bb6a577a09 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -168,7 +168,7 @@ Font defaultFont () {
}
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).handle;
}
@Override
@@ -3452,7 +3452,7 @@ void cairoClipRegion (long /*int*/ cairo) {
Shell shell = getShell();
Color shellBg = shell.getBackground();
if (shellBg != this.getBackground()) {
- GdkRGBA rgba = shellBg.handleRGBA;
+ GdkRGBA rgba = shellBg.handle;
Cairo.cairo_set_source_rgba (cairo, rgba.red, rgba.green, rgba.blue, rgba.alpha);
} else {
Cairo.cairo_set_source_rgba (cairo, 0.0, 0.0, 0.0, 0.0);
@@ -4501,7 +4501,7 @@ private void _setBackground (Color color) {
boolean set = false;
GdkRGBA rgba = null;
if (color != null) {
- rgba = color.handleRGBA;
+ rgba = color.handle;
backgroundAlpha = color.getAlpha();
}
set = true;
@@ -4517,7 +4517,7 @@ private void _setBackground (Color color) {
}
void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rgba) {
- GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handleRGBA;
+ GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
// Form background string
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
@@ -4940,7 +4940,7 @@ public void setForeground (Color color) {
} else {
state |= FOREGROUND;
}
- GdkRGBA rgba = color == null ? null : color.handleRGBA;
+ GdkRGBA rgba = color == null ? null : color.handle;
setForegroundGdkRGBA (rgba);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
index 89f69dbf21..f87355b086 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
@@ -1839,7 +1839,7 @@ void register () {
@Override
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index c4340189b2..782537482b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -3782,8 +3782,8 @@ public long /*int*/ internal_new_GC (GCData data) {
}
data.device = this;
data.drawable = root;
- data.backgroundRGBA = getSystemColor (SWT.COLOR_WHITE).handleRGBA;
- data.foregroundRGBA = getSystemColor (SWT.COLOR_BLACK).handleRGBA;
+ data.backgroundRGBA = getSystemColor (SWT.COLOR_WHITE).handle;
+ data.foregroundRGBA = getSystemColor (SWT.COLOR_BLACK).handle;
data.font = getSystemFont ();
}
return gc;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
index 268fb68d32..6f3ae35f9c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -285,7 +285,7 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
@Override
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
index 20a13b07fd..3d54b5a4bc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
@@ -346,7 +346,7 @@ public void cut () {
@Override
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index f0c2b00ac3..181c8c15b0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -850,7 +850,7 @@ int applyThemeBackground () {
@Override
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
@Override
@@ -2940,7 +2940,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
Cairo.cairo_restore (cr);
} else {
if (wasSelected) {
- drawForegroundRGBA = gc.getForeground ().handleRGBA;
+ drawForegroundRGBA = gc.getForeground ().handle;
}
}
gc.dispose();
@@ -3247,7 +3247,7 @@ void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rg
} else {
background = rgba;
}
- GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handleRGBA;
+ GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "treeview" : "GtkTreeView";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
@@ -3387,7 +3387,7 @@ public void setHeaderBackground(Color color) {
headerBackground = color;
GdkRGBA background;
if (headerBackground != null) {
- background = headerBackground.handleRGBA;
+ background = headerBackground.handle;
} else {
background = defaultBackground();
}
@@ -3440,7 +3440,7 @@ public void setHeaderForeground (Color color) {
headerForeground = color;
GdkRGBA foreground;
if (headerForeground != null) {
- foreground = headerForeground.handleRGBA;
+ foreground = headerForeground.handle;
} else {
foreground = display.COLOR_LIST_FOREGROUND_RGBA;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index 7f67760647..f5af2b0ea9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -826,7 +826,7 @@ public void setBackground (Color color) {
error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getBackground ().equals (color)) return;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_list_store_set (parent.modelHandle, handle, Table.BACKGROUND_COLUMN, gdkRGBA, -1);
cached = true;
}
@@ -858,7 +858,7 @@ public void setBackground (int index, Color color) {
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_BACKGROUND, gdkRGBA, -1);
cached = true;
@@ -1033,7 +1033,7 @@ public void setForeground (Color color){
error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getForeground ().equals (color)) return;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_list_store_set (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, gdkRGBA, -1);
cached = true;
}
@@ -1065,7 +1065,7 @@ public void setForeground (int index, Color color){
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_FOREGROUND, gdkRGBA, -1);
cached = true;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index be377b99f7..7ed48789b5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -739,7 +739,7 @@ char [] deprocessText (char [] text, int start, int end) {
@Override
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
@Override
@@ -2193,8 +2193,8 @@ void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rg
} else {
background = rgba;
}
- GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handleRGBA;
- GdkRGBA selectedForeground = display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT).handleRGBA;
+ GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
+ GdkRGBA selectedForeground = display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT).handle;
String css;
String properties;
String name;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 9e32e90650..4eb52ce7e0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -609,7 +609,7 @@ void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rg
@Override
void setParentBackground () {
- setBackgroundGdkRGBA (handle, display.getSystemColor(SWT.COLOR_TRANSPARENT).handleRGBA);
+ setBackgroundGdkRGBA (handle, display.getSystemColor(SWT.COLOR_TRANSPARENT).handle);
super.setParentBackground();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index 048e500063..36709938ec 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
@@ -274,7 +274,7 @@ void createHandle (int index) {
handle = GTK.gtk_window_new (GTK.GTK_WINDOW_POPUP);
Color background = display.getSystemColor (SWT.COLOR_INFO_BACKGROUND);
long /*int*/ context = GTK.gtk_widget_get_style_context (handle);
- GdkRGBA bgRGBA = background.handleRGBA;
+ GdkRGBA bgRGBA = background.handle;
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "window" : "GtkWindow";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(bgRGBA) + ";}";
gtk_css_provider_load_from_css (context, css);
@@ -503,7 +503,7 @@ void drawTooltip (long /*int*/ cr) {
x += INSET;
int [] w = new int [1], h = new int [1];
Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND);
- GDK.gdk_cairo_set_source_rgba(cairo,foreground.handleRGBA);
+ GDK.gdk_cairo_set_source_rgba(cairo,foreground.handle);
Cairo.cairo_move_to(cairo, x,y );
OS.pango_cairo_show_layout(cairo, layoutText);
OS.pango_layout_get_pixel_size (layoutText, w, h);
@@ -512,7 +512,7 @@ void drawTooltip (long /*int*/ cr) {
if (layoutMessage != 0) {
x = BORDER + PADDING + INSET;
Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND);
- GDK.gdk_cairo_set_source_rgba(cairo,foreground.handleRGBA);
+ GDK.gdk_cairo_set_source_rgba(cairo,foreground.handle);
Cairo.cairo_move_to(cairo, x, y);
OS.pango_cairo_show_layout(cairo, layoutMessage);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 33d6a30dde..2e53ab8a48 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -993,7 +993,7 @@ void createWidget (int index) {
@Override
GdkRGBA defaultBackground () {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handleRGBA;
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
@Override
@@ -3014,7 +3014,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
if ((drawState & SWT.SELECTED) != 0) {
} else {
if (wasSelected) {
- drawForegroundRGBA = gc.getForeground ().handleRGBA;
+ drawForegroundRGBA = gc.getForeground ().handle;
}
}
gc.dispose();
@@ -3313,7 +3313,7 @@ void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rg
} else {
background = rgba;
}
- GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handleRGBA;
+ GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "treeview" : "GtkTreeView";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
@@ -3454,7 +3454,7 @@ public void setHeaderBackground (Color color) {
headerBackground = color;
GdkRGBA background;
if (headerBackground != null) {
- background = headerBackground.handleRGBA;
+ background = headerBackground.handle;
} else {
background = defaultBackground();
}
@@ -3507,7 +3507,7 @@ public void setHeaderForeground (Color color) {
headerForeground = color;
GdkRGBA foreground;
if (headerForeground != null) {
- foreground = headerForeground.handleRGBA;
+ foreground = headerForeground.handle;
} else {
foreground = display.COLOR_LIST_FOREGROUND_RGBA;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index 991186b21a..cdc66eae45 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -1141,7 +1141,7 @@ public void setBackground (Color color) {
error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getBackground ().equals (color)) return;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_tree_store_set (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, gdkRGBA, -1);
cached = true;
}
@@ -1174,7 +1174,7 @@ public void setBackground (int index, Color color) {
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_tree_store_set (parent.modelHandle, handle, modelIndex + Tree.CELL_BACKGROUND, gdkRGBA, -1);
cached = true;
updated = true;
@@ -1382,7 +1382,7 @@ public void setForeground (Color color){
error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getForeground ().equals (color)) return;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_tree_store_set (parent.modelHandle, handle, Tree.FOREGROUND_COLUMN, gdkRGBA, -1);
cached = true;
}
@@ -1415,7 +1415,7 @@ public void setForeground (int index, Color color){
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
- GdkRGBA gdkRGBA = color != null ? color.handleRGBA : null;
+ GdkRGBA gdkRGBA = color != null ? color.handle : null;
GTK.gtk_tree_store_set (parent.modelHandle, handle, modelIndex + Tree.CELL_FOREGROUND, gdkRGBA, -1);
cached = true;
updated = true;

Back to the top