View | Details | Raw Unified | Return to bug 152978
Collapse All | Expand All

(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java (+10 lines)
Lines 519-524 Link Here
519
	return display;
519
	return display;
520
}
520
}
521
521
522
public Monitor getMonitor() {
523
	int topHandle = topHandle();
524
	if (topHandle != 0) {
525
		int screen = OS.gtk_window_get_screen(topHandle);
526
		int number = OS.gdk_screen_get_monitor_at_window(screen, OS.GTK_WIDGET_WINDOW(topHandle));
527
		return display.gtk_monitor_get_monitor(screen, number);
528
	}
529
	return null;
530
}
531
522
String getName () {
532
String getName () {
523
//	String string = getClass ().getName ();
533
//	String string = getClass ().getName ();
524
//	int index = string.lastIndexOf ('.');
534
//	int index = string.lastIndexOf ('.');
(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java (-4 / +5 lines)
Lines 1808-1814 Link Here
1808
public Monitor getMonitor () {
1808
public Monitor getMonitor () {
1809
	checkWidget();
1809
	checkWidget();
1810
	Monitor monitor = null;
1810
	Monitor monitor = null;
1811
	int /*long*/ screen = OS.gdk_screen_get_default ();
1811
    int /* long */screen = OS.gtk_widget_get_screen(handle);
1812
	if (screen != 0) {
1812
	if (screen != 0) {
1813
		int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ());
1813
		int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ());
1814
		GdkRectangle dest = new GdkRectangle ();
1814
		GdkRectangle dest = new GdkRectangle ();
Lines 1819-1826 Link Here
1819
		monitor.y = dest.y;
1819
		monitor.y = dest.y;
1820
		monitor.width = dest.width;
1820
		monitor.width = dest.width;
1821
		monitor.height = dest.height;
1821
		monitor.height = dest.height;
1822
		monitor.screen = screen;
1822
		Rectangle workArea = null;
1823
		Rectangle workArea = null;
1823
		if (monitorNumber == 0) workArea = display.getWorkArea ();
1824
		if (monitorNumber == 0) workArea = display.getWorkArea (screen);
1824
		if (workArea != null) {
1825
		if (workArea != null) {
1825
			monitor.clientX = workArea.x;
1826
			monitor.clientX = workArea.x;
1826
			monitor.clientY = workArea.y;
1827
			monitor.clientY = workArea.y;
Lines 2932-2938 Link Here
2932
				int /*long*/ topWindow = OS.GTK_WIDGET_WINDOW (topHandle);			
2933
				int /*long*/ topWindow = OS.GTK_WIDGET_WINDOW (topHandle);			
2933
				int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (topWindow);
2934
				int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (topWindow);
2934
				int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (enableWindow);
2935
				int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (enableWindow);
2935
				int xScreen = OS.XDefaultScreen (xDisplay);
2936
				int xScreen = OS.gdk_screen_get_number(OS.gtk_widget_get_screen(handle));
2936
				int flags = OS.CWStackMode | OS.CWSibling;			
2937
				int flags = OS.CWStackMode | OS.CWSibling;			
2937
				XWindowChanges changes = new XWindowChanges ();
2938
				XWindowChanges changes = new XWindowChanges ();
2938
				changes.sibling = OS.gdk_x11_drawable_get_xid (topWindow);
2939
				changes.sibling = OS.gdk_x11_drawable_get_xid (topWindow);
Lines 3389-3395 Link Here
3389
			if (redrawWindow != 0 && siblingWindow == 0) changes.stack_mode = OS.Below;
3390
			if (redrawWindow != 0 && siblingWindow == 0) changes.stack_mode = OS.Below;
3390
			int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
3391
			int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
3391
			int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window);
3392
			int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window);
3392
			int xScreen = OS.XDefaultScreen (xDisplay);
3393
	        int xScreen = OS.gdk_screen_get_number(OS.gtk_widget_get_screen(handle));
3393
			int flags = OS.CWStackMode | OS.CWSibling;
3394
			int flags = OS.CWStackMode | OS.CWSibling;
3394
			/*
3395
			/*
3395
			* Feature in X. If the receiver is a top level, XConfigureWindow ()
3396
			* Feature in X. If the receiver is a top level, XConfigureWindow ()
(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java (-6 / +20 lines)
Lines 43-48 Link Here
43
	Rectangle bounds;
43
	Rectangle bounds;
44
	int cursorOrientation = SWT.NONE;
44
	int cursorOrientation = SWT.NONE;
45
	int oldX, oldY;
45
	int oldX, oldY;
46
	int /*long*/ screen;
46
47
47
	final static int STEPSIZE_SMALL = 1;
48
	final static int STEPSIZE_SMALL = 1;
48
	final static int STEPSIZE_LARGE = 9;
49
	final static int STEPSIZE_LARGE = 9;
Lines 188-194 Link Here
188
	int newY = bounds.y;
189
	int newY = bounds.y;
189
	
190
	
190
	Point point = display.map (parent, null, newX, newY);
191
	Point point = display.map (parent, null, newX, newY);
191
	display.setCursorLocation (point);
192
    display.setCursorLocation(getMonitor().screen, point);
192
	
193
	
193
	/*
194
	/*
194
	 * The call to XWarpPointer does not always place the pointer on the
195
	 * The call to XWarpPointer does not always place the pointer on the
Lines 221-227 Link Here
221
	}
222
	}
222
223
223
	Point point = display.map (parent, null, newX, newY);
224
	Point point = display.map (parent, null, newX, newY);
224
	display.setCursorLocation (point);
225
    display.setCursorLocation(getMonitor().screen, point);
225
	
226
	
226
	/*
227
	/*
227
	 * The call to XWarpPointer does not always place the pointer on the
228
	 * The call to XWarpPointer does not always place the pointer on the
Lines 299-305 Link Here
299
}
300
}
300
301
301
void drawRectangles (Rectangle [] rects) {
302
void drawRectangles (Rectangle [] rects) {
302
	int /*long*/ window = OS.GDK_ROOT_PARENT ();
303
	if (screen == 0) {
304
		int[] _screen = new int[1];
305
		int[] _x = new int[1];
306
		int[] _y = new int[1];
307
		int[] _mask = new int[1];
308
		OS.gdk_display_get_pointer(OS.gdk_display_get_default(), _screen, _x, _y, _mask);
309
		screen = _screen[0];
310
	}
311
	int /* long */window = OS.gdk_screen_get_root_window(screen);
303
	if (parent != null) {
312
	if (parent != null) {
304
		window = OS.GTK_WIDGET_WINDOW (parent.paintHandle());
313
		window = OS.GTK_WIDGET_WINDOW (parent.paintHandle());
305
	} 
314
	} 
Lines 646-662 Link Here
646
 */
655
 */
647
public boolean open () {
656
public boolean open () {
648
	checkWidget();
657
	checkWidget();
649
	window = OS.GDK_ROOT_PARENT ();
658
    int[] oldX = new int[1], oldY = new int[1], state = new int[1];
659
    int[] screen = new int[1];
660
    OS.gdk_display_get_pointer(OS.gdk_display_get_default(), screen, oldX, oldY, state);
661
    this.screen = screen[0];
662
    if (rectangles == null)
663
    	return false;
664
    window = OS.gdk_screen_get_root_window(this.screen);
650
	if (parent != null) {
665
	if (parent != null) {
651
		window = OS.GTK_WIDGET_WINDOW (parent.paintHandle());
666
		window = OS.GTK_WIDGET_WINDOW (parent.paintHandle());
652
	} 
667
	} 
668
653
	if (window == 0) return false;
669
	if (window == 0) return false;
654
	cancelled = false;
670
	cancelled = false;
655
	tracking = true;
671
	tracking = true;
656
	update ();
672
	update ();
657
	drawRectangles (rectangles);
673
	drawRectangles (rectangles);
658
	int [] oldX = new int [1], oldY = new int [1], state = new int [1];
659
	OS.gdk_window_get_pointer (window, oldX, oldY, state);
660
674
661
	/*
675
	/*
662
	* if exactly one of UP/DOWN is specified as a style then set the cursor
676
	* if exactly one of UP/DOWN is specified as a style then set the cursor
(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java (-1 / +1 lines)
Lines 683-689 Link Here
683
	if (reqy + requisition.height > screenHeight && reqy - requisition.height >= 0) {
683
	if (reqy + requisition.height > screenHeight && reqy - requisition.height >= 0) {
684
    	reqy -= requisition.height;
684
    	reqy -= requisition.height;
685
    }
685
    }
686
    int screenWidth = OS.gdk_screen_width ();
686
    int screenWidth = OS.gdk_screen_get_width (getMonitor().screen);
687
	int reqx = this.x;
687
	int reqx = this.x;
688
    if ((style & SWT.RIGHT_TO_LEFT) != 0) {
688
    if ((style & SWT.RIGHT_TO_LEFT) != 0) {
689
    	if (reqx - requisition.width >= 0) reqx -= requisition.width;
689
    	if (reqx - requisition.width >= 0) reqx -= requisition.width;
(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java (-1 / +2 lines)
Lines 96-102 Link Here
96
	color.red = (short) 0xffff;
96
	color.red = (short) 0xffff;
97
	color.green = (short) 0xffff;
97
	color.green = (short) 0xffff;
98
	color.blue = (short) 0xffff;
98
	color.blue = (short) 0xffff;
99
	int /*long*/ colormap = OS.gdk_colormap_get_system ();
99
	int /*long*/ screen = getMonitor().screen;
100
	int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
100
	OS.gdk_colormap_alloc_color (colormap, color, true, true);
101
	OS.gdk_colormap_alloc_color (colormap, color, true, true);
101
	OS.gdk_gc_set_foreground (gc, color);
102
	OS.gdk_gc_set_foreground (gc, color);
102
	OS.gdk_gc_set_function (gc, OS.GDK_XOR);
103
	OS.gdk_gc_set_function (gc, OS.GDK_XOR);
(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java (+20 lines)
Lines 1681-1684 Link Here
1681
		}
1681
		}
1682
	}
1682
	}
1683
}
1683
}
1684
1685
public void setMonitor(Monitor monitor) {
1686
    int width, height;
1687
    width = OS.GTK_WIDGET_WIDTH(shellHandle);
1688
    height = OS.GTK_WIDGET_HEIGHT(shellHandle);
1689
    
1690
    int toScreen;
1691
    if (monitor == null || monitor.screen == 0) {
1692
      toScreen = OS.gdk_screen_get_default();
1693
    } else {
1694
      toScreen = monitor.screen;
1695
    }
1696
    
1697
    OS.gtk_window_set_screen(OS.gtk_widget_get_toplevel(shellHandle), toScreen);
1698
    OS.gtk_window_move(handle, monitor.clientX, monitor.clientY);
1699
    OS.gtk_window_resize(shellHandle, width, height);
1700
    
1701
    layout();
1702
  }
1703
1684
}
1704
}
(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java (-73 / +127 lines)
Lines 11-20 Link Here
11
package org.eclipse.swt.widgets;
11
package org.eclipse.swt.widgets;
12
12
13
13
14
import org.eclipse.swt.*;
14
import java.util.Vector;
15
import org.eclipse.swt.internal.*;
15
16
import org.eclipse.swt.internal.gtk.*;
16
import org.eclipse.swt.SWT;
17
import org.eclipse.swt.graphics.*;
17
import org.eclipse.swt.SWTError;
18
import org.eclipse.swt.SWTException;
19
import org.eclipse.swt.graphics.Color;
20
import org.eclipse.swt.graphics.Cursor;
21
import org.eclipse.swt.graphics.Device;
22
import org.eclipse.swt.graphics.DeviceData;
23
import org.eclipse.swt.graphics.Font;
24
import org.eclipse.swt.graphics.GCData;
25
import org.eclipse.swt.graphics.Image;
26
import org.eclipse.swt.graphics.ImageData;
27
import org.eclipse.swt.graphics.PaletteData;
28
import org.eclipse.swt.graphics.Point;
29
import org.eclipse.swt.graphics.Rectangle;
30
import org.eclipse.swt.graphics.Resource;
31
import org.eclipse.swt.internal.Callback;
32
import org.eclipse.swt.internal.Compatibility;
33
import org.eclipse.swt.internal.Converter;
34
import org.eclipse.swt.internal.Lock;
35
import org.eclipse.swt.internal.gtk.GTypeInfo;
36
import org.eclipse.swt.internal.gtk.GdkColor;
37
import org.eclipse.swt.internal.gtk.GdkRectangle;
38
import org.eclipse.swt.internal.gtk.GdkVisual;
39
import org.eclipse.swt.internal.gtk.GtkCellRendererClass;
40
import org.eclipse.swt.internal.gtk.GtkRequisition;
41
import org.eclipse.swt.internal.gtk.GtkWidgetClass;
42
import org.eclipse.swt.internal.gtk.LONG;
43
import org.eclipse.swt.internal.gtk.OS;
44
import org.eclipse.swt.internal.gtk.XButtonEvent;
45
import org.eclipse.swt.internal.gtk.XEvent;
46
import org.eclipse.swt.internal.gtk.XExposeEvent;
47
import org.eclipse.swt.internal.gtk.XVisibilityEvent;
18
48
19
/**
49
/**
20
 * Instances of this class are responsible for managing the
50
 * Instances of this class are responsible for managing the
Lines 931-937 Link Here
931
static int /*long*/ createPixbuf(Image image) {
961
static int /*long*/ createPixbuf(Image image) {
932
	int [] w = new int [1], h = new int [1];
962
	int [] w = new int [1], h = new int [1];
933
 	OS.gdk_drawable_get_size (image.pixmap, w, h);
963
 	OS.gdk_drawable_get_size (image.pixmap, w, h);
934
	int /*long*/ colormap = OS.gdk_colormap_get_system ();
964
    int /*long*/ screen = OS.gdk_drawable_get_screen(image.pixmap);
965
    int /* long */colormap = OS.gdk_screen_get_system_colormap(screen);
935
	int /*long*/ pixbuf;
966
	int /*long*/ pixbuf;
936
	boolean hasMask = image.mask != 0 && OS.gdk_drawable_get_depth (image.mask) == 1;
967
	boolean hasMask = image.mask != 0 && OS.gdk_drawable_get_depth (image.mask) == 1;
937
	if (hasMask) {
968
	if (hasMask) {
Lines 1426-1432 Link Here
1426
public Point getCursorLocation () {
1457
public Point getCursorLocation () {
1427
	checkDevice ();
1458
	checkDevice ();
1428
	int [] x = new int [1], y = new int [1];
1459
	int [] x = new int [1], y = new int [1];
1429
	OS.gdk_window_get_pointer (0, x, y, null);
1460
    OS.gdk_display_get_pointer(OS.gdk_display_get_default(), null, x, y, null);
1430
	return new Point (x [0], y [0]);
1461
	return new Point (x [0], y [0]);
1431
}
1462
}
1432
1463
Lines 1719-1725 Link Here
1719
 * and position of the screen not covered by dock and panel
1750
 * and position of the screen not covered by dock and panel
1720
 * windows.  See http://freedesktop.org/Standards/wm-spec.
1751
 * windows.  See http://freedesktop.org/Standards/wm-spec.
1721
 */
1752
 */
1722
Rectangle getWorkArea() {
1753
Rectangle getWorkArea(int /*long*/ screen) {
1723
	byte[] name = Converter.wcsToMbcs (null, "_NET_WORKAREA", true);
1754
	byte[] name = Converter.wcsToMbcs (null, "_NET_WORKAREA", true);
1724
	int /*long*/ atom = OS.gdk_atom_intern (name, true);
1755
	int /*long*/ atom = OS.gdk_atom_intern (name, true);
1725
	if (atom == OS.GDK_NONE) return null;
1756
	if (atom == OS.GDK_NONE) return null;
Lines 1727-1734 Link Here
1727
	int[] actualFormat = new int[1];
1758
	int[] actualFormat = new int[1];
1728
	int[] actualLength = new int[1];
1759
	int[] actualLength = new int[1];
1729
	int /*long*/[] data = new int /*long*/[1];
1760
	int /*long*/[] data = new int /*long*/[1];
1730
	if (!OS.gdk_property_get (OS.GDK_ROOT_PARENT (), atom, OS.GDK_NONE, 0, 16, 0, actualType, actualFormat, actualLength, data)) {
1761
    if (!OS.gdk_property_get(OS.gdk_screen_get_root_window(screen), atom, OS.GDK_NONE, 0, 16, 0, actualType, actualFormat, actualLength, data)) {
1731
		return null;
1762
    	return null;
1732
	}
1763
	}
1733
	Rectangle result = null;
1764
	Rectangle result = null;
1734
	if (data [0] != 0) {
1765
	if (data [0] != 0) {
Lines 1754-1813 Link Here
1754
 * @since 3.0
1785
 * @since 3.0
1755
 */
1786
 */
1756
public Monitor [] getMonitors () {
1787
public Monitor [] getMonitors () {
1757
	checkDevice ();
1788
    checkDevice();
1758
	Monitor [] monitors = null;
1789
    Monitor[] monitors = null;
1759
	Rectangle workArea = getWorkArea();
1790
1760
	int /*long*/ screen = OS.gdk_screen_get_default ();
1791
    int display = OS.gdk_display_get_default();
1761
	if (screen != 0) {
1792
    int numScreens = OS.gdk_display_get_n_screens(display);
1762
		int monitorCount = OS.gdk_screen_get_n_monitors (screen);
1793
    if (numScreens > 0) {
1763
		if (monitorCount > 0) {
1794
      java.util.List monitorList = new Vector();
1764
			monitors = new Monitor [monitorCount];
1795
      for (int n = 0; n < numScreens; n++) {
1765
			GdkRectangle dest = new GdkRectangle ();
1796
        int screen = OS.gdk_display_get_screen(display, n);
1766
			for (int i = 0; i < monitorCount; i++) {
1797
        if (screen != 0) {
1767
				OS.gdk_screen_get_monitor_geometry (screen, i, dest);
1798
          int monitorCount = OS.gdk_screen_get_n_monitors(screen);
1768
				Monitor monitor = new Monitor ();
1799
          if (monitorCount > 0) {
1769
				monitor.handle = i;
1800
            for (int i = 0; i < monitorCount; i++) {
1770
				monitor.x = dest.x;
1801
              monitorList.add(gtk_monitor_get_monitor(screen, i));
1771
				monitor.y = dest.y;
1802
            }
1772
				monitor.width = dest.width;
1803
          }
1773
				monitor.height = dest.height;
1804
        }
1774
				if (i == 0 && workArea != null) {
1805
      }
1775
					monitor.clientX = workArea.x;
1806
      monitors = new Monitor[monitorList.size()];
1776
					monitor.clientY = workArea.y;
1807
      for (int i = 0; i < monitorList.size(); i++) {
1777
					monitor.clientWidth = workArea.width;
1808
        monitors[i] = (Monitor) monitorList.get(i);
1778
					monitor.clientHeight = workArea.height;
1809
      }
1779
				} else {
1810
    }
1780
					monitor.clientX = monitor.x;
1811
    if (monitors == null) {
1781
					monitor.clientY = monitor.y;
1812
      Rectangle workArea = getWorkArea(OS.gdk_screen_get_default());
1782
					monitor.clientWidth = monitor.width;
1813
      /* No multimonitor support detected, default to one monitor */
1783
					monitor.clientHeight = monitor.height;
1814
      Monitor monitor = new Monitor();
1784
				}
1815
      Rectangle bounds = getBounds();
1785
				monitors [i] = monitor;
1816
      monitor.x = bounds.x;
1786
			}
1817
      monitor.y = bounds.y;
1787
		}
1818
      monitor.width = bounds.width;
1788
	}
1819
      monitor.height = bounds.height;
1789
	if (monitors == null) {
1820
      monitor.screen = OS.gdk_screen_get_default();
1790
		/* No multimonitor support detected, default to one monitor */
1821
      if (workArea != null) {
1791
		Monitor monitor = new Monitor ();
1822
        monitor.clientX = workArea.x;
1792
		Rectangle bounds = getBounds ();
1823
        monitor.clientY = workArea.y;
1793
		monitor.x = bounds.x;
1824
        monitor.clientWidth = workArea.width;
1794
		monitor.y = bounds.y;
1825
        monitor.clientHeight = workArea.height;
1795
		monitor.width = bounds.width;
1826
      } else {
1796
		monitor.height = bounds.height;
1827
        monitor.clientX = monitor.x;
1797
		if (workArea != null) {
1828
        monitor.clientY = monitor.y;
1798
			monitor.clientX = workArea.x;
1829
        monitor.clientWidth = monitor.width;
1799
			monitor.clientY = workArea.y;
1830
        monitor.clientHeight = monitor.height;
1800
			monitor.clientWidth = workArea.width;
1831
      }
1801
			monitor.clientHeight = workArea.height;
1832
      monitors = new Monitor[] { monitor };
1802
		} else {
1833
    }
1803
			monitor.clientX = monitor.x;
1834
    return monitors;
1804
			monitor.clientY = monitor.y;
1835
}
1805
			monitor.clientWidth = monitor.width;
1836
1806
			monitor.clientHeight = monitor.height;
1837
Monitor gtk_monitor_get_monitor(int screen, int monitorNumber) {
1807
		}
1838
	GdkRectangle dest = new GdkRectangle();
1808
		monitors = new Monitor [] { monitor };			
1839
	OS.gdk_screen_get_monitor_geometry(screen, monitorNumber, dest);
1809
	}
1840
	Rectangle workArea = getWorkArea(screen);
1810
	return monitors;
1841
	Monitor result = new Monitor();
1842
	result.handle = monitorNumber;
1843
	result.x = dest.x;
1844
	result.y = dest.y;
1845
	result.width = dest.width;
1846
	result.height = dest.height;
1847
	result.screen = screen;
1848
	if (monitorNumber == 0 && workArea != null) {
1849
		result.clientX = workArea.x;
1850
		result.clientY = workArea.y;
1851
		result.clientWidth = workArea.width;
1852
		result.clientHeight = workArea.height;
1853
    } else {
1854
    	result.clientX = result.x;
1855
    	result.clientY = result.y;
1856
    	result.clientWidth = result.width;
1857
    	result.clientHeight = result.height;
1858
    }
1859
	return result;
1811
}
1860
}
1812
1861
1813
/**
1862
/**
Lines 3280-3291 Link Here
3280
 * @since 2.1
3329
 * @since 2.1
3281
 */
3330
 */
3282
public void setCursorLocation (int x, int y) {
3331
public void setCursorLocation (int x, int y) {
3283
	checkDevice ();
3332
    setCursorLocation(OS.gdk_screen_get_default(), x, y);
3284
	if (OS.GDK_WINDOWING_X11 ()) {
3333
}
3285
		int /*long*/ xDisplay = OS.GDK_DISPLAY ();
3334
3286
		int /*long*/ xWindow = OS.XDefaultRootWindow (xDisplay);
3335
public void setCursorLocation(int screen, int x, int y) {
3287
		OS.XWarpPointer (xDisplay, OS.None, xWindow, 0, 0, 0, 0, x, y);
3336
  checkDevice();
3288
	}
3337
  OS.gdk_display_warp_pointer(OS.gdk_display_get_default(), screen, x, y);
3289
}
3338
}
3290
3339
3291
/**
3340
/**
Lines 3303-3312 Link Here
3303
 * 
3352
 * 
3304
 * @since 2.0
3353
 * @since 2.0
3305
 */
3354
 */
3306
public void setCursorLocation (Point point) {
3355
public void setCursorLocation(Point point) {
3307
	checkDevice ();
3356
	checkDevice();
3308
	if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
3357
	if (point == null)
3309
	setCursorLocation (point.x, point.y);
3358
		error(SWT.ERROR_NULL_ARGUMENT);
3359
	setCursorLocation(point.x, point.y);
3360
}
3361
3362
public void setCursorLocation(int/* long */screen, Point point) {
3363
	setCursorLocation(screen, point.x, point.y);
3310
}
3364
}
3311
3365
3312
/**
3366
/**
(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java (-1 / +2 lines)
Lines 144-150 Link Here
144
	byte [] bits = {-86, 85, -86, 85, -86, 85, -86, 85};
144
	byte [] bits = {-86, 85, -86, 85, -86, 85, -86, 85};
145
	int /*long*/ stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8);
145
	int /*long*/ stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8);
146
	int /*long*/ gc = OS.gdk_gc_new (window);
146
	int /*long*/ gc = OS.gdk_gc_new (window);
147
	int /*long*/ colormap = OS.gdk_colormap_get_system();
147
	int /*long*/ screen = getMonitor().screen;
148
	int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
148
	GdkColor color = new GdkColor ();
149
	GdkColor color = new GdkColor ();
149
	OS.gdk_color_white (colormap, color);
150
	OS.gdk_color_white (colormap, color);
150
	OS.gdk_gc_set_foreground (gc, color);	
151
	OS.gdk_gc_set_foreground (gc, color);	
(-)Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java (-2 / +6 lines)
Lines 11-19 Link Here
11
package org.eclipse.swt.graphics;
11
package org.eclipse.swt.graphics;
12
12
13
13
14
import java.io.*;
14
import java.io.InputStream;
15
import org.eclipse.swt.*;
15
16
import org.eclipse.swt.SWT;
17
import org.eclipse.swt.SWTException;
16
import org.eclipse.swt.internal.CloneableCompatibility;
18
import org.eclipse.swt.internal.CloneableCompatibility;
19
import org.eclipse.swt.internal.gtk.OS;
17
20
18
/**
21
/**
19
 * Instances of this class are device-independent descriptions
22
 * Instances of this class are device-independent descriptions
Lines 3572-3577 Link Here
3572
	ImageData band = createGradientBand(width, height, vertical,
3575
	ImageData band = createGradientBand(width, height, vertical,
3573
		fromRGB, toRGB, redBits, greenBits, blueBits);
3576
		fromRGB, toRGB, redBits, greenBits, blueBits);
3574
	Image image = new Image(device, band);
3577
	Image image = new Image(device, band);
3578
	image.gtk_set_screen(OS.gdk_gc_get_screen(gc.handle));
3575
	if ((band.width == 1) || (band.height == 1)) {
3579
	if ((band.width == 1) || (band.height == 1)) {
3576
		gc.drawImage(image, 0, 0, band.width, band.height, x, y, width, height);
3580
		gc.drawImage(image, 0, 0, band.width, band.height, x, y, width, height);
3577
	} else {
3581
	} else {
(-)Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java (-2 / +2 lines)
Lines 106-114 Link Here
106
	}
106
	}
107
	glxAttrib [pos++] = 0;
107
	glxAttrib [pos++] = 0;
108
	OS.gtk_widget_realize (handle);
108
	OS.gtk_widget_realize (handle);
109
	int /*long*/ screen = OS.gtk_widget_get_screen(handle);
109
	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
110
	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
110
	int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
111
	int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
111
	int /*long*/ infoPtr = GLX.glXChooseVisual (xDisplay, OS.XDefaultScreen (xDisplay), glxAttrib);
112
	int /*long*/ infoPtr = GLX.glXChooseVisual (xDisplay, OS.gdk_screen_get_number(screen), glxAttrib);
112
	if (infoPtr == 0) {
113
	if (infoPtr == 0) {
113
		dispose ();
114
		dispose ();
114
		SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
115
		SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
Lines 116-122 Link Here
116
	vinfo = new XVisualInfo ();
117
	vinfo = new XVisualInfo ();
117
	GLX.memmove (vinfo, infoPtr, XVisualInfo.sizeof);
118
	GLX.memmove (vinfo, infoPtr, XVisualInfo.sizeof);
118
	OS.XFree (infoPtr);
119
	OS.XFree (infoPtr);
119
	int /*long*/ screen = OS.gdk_screen_get_default ();
120
	int /*long*/ gdkvisual = OS.gdk_x11_screen_lookup_visual (screen, vinfo.visualid);
120
	int /*long*/ gdkvisual = OS.gdk_x11_screen_lookup_visual (screen, vinfo.visualid);
121
	//FIXME- share lists
121
	//FIXME- share lists
122
	//context = GLX.glXCreateContext (xDisplay, info, share == null ? 0 : share.context, true);
122
	//context = GLX.glXCreateContext (xDisplay, info, share == null ? 0 : share.context, true);
(-)Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java (-16 / +30 lines)
Lines 257-263 Link Here
257
	}
257
	}
258
258
259
	/* Create the new pixmap */
259
	/* Create the new pixmap */
260
	int /*long*/ pixmap = OS.gdk_pixmap_new (OS.GDK_ROOT_PARENT(), width, height, -1);
260
	int/*long*/ screen = OS.gdk_drawable_get_screen(srcImage.pixmap);
261
	int /*long*/ pixmap = OS.gdk_pixmap_new (OS.gdk_screen_get_root_window(screen), width, height, -1);
261
	if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
262
	if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
262
	int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
263
	int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
263
	if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
264
	if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Lines 273-279 Link Here
273
	/* Retrieve the source pixmap data */
274
	/* Retrieve the source pixmap data */
274
	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height);
275
	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height);
275
	if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
276
	if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
276
	int /*long*/ colormap = OS.gdk_colormap_get_system();
277
	int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
277
	OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, 0, 0, 0, 0, width, height);
278
	OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, 0, 0, 0, 0, width, height);
278
	int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
279
	int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
279
	int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
280
	int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
Lines 406-412 Link Here
406
public Image(Device device, ImageData data) {
407
public Image(Device device, ImageData data) {
407
	if (device == null) device = Device.getDevice();
408
	if (device == null) device = Device.getDevice();
408
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
409
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
409
	init(device, data);
410
	init(device, data, 0);
410
	if (device.tracking) device.new_Object(this);
411
	if (device.tracking) device.new_Object(this);
411
}
412
}
412
413
Lines 447-453 Link Here
447
	ImageData image = new ImageData(source.width, source.height, source.depth, source.palette, source.scanlinePad, source.data);
448
	ImageData image = new ImageData(source.width, source.height, source.depth, source.palette, source.scanlinePad, source.data);
448
	image.maskPad = mask.scanlinePad;
449
	image.maskPad = mask.scanlinePad;
449
	image.maskData = mask.data;
450
	image.maskData = mask.data;
450
	init(device, image);
451
	init(device, image, 0);
451
	if (device.tracking) device.new_Object(this);
452
	if (device.tracking) device.new_Object(this);
452
}
453
}
453
454
Lines 502-508 Link Here
502
public Image(Device device, InputStream stream) {
503
public Image(Device device, InputStream stream) {
503
	if (device == null) device = Device.getDevice();
504
	if (device == null) device = Device.getDevice();
504
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
505
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
505
	init(device, new ImageData(stream));
506
	init(device, new ImageData(stream), 0);
506
	if (device.tracking) device.new_Object(this);
507
	if (device.tracking) device.new_Object(this);
507
}
508
}
508
509
Lines 590-596 Link Here
590
			return;
591
			return;
591
		}
592
		}
592
	} catch (SWTException e) {}
593
	} catch (SWTException e) {}
593
	init(device, new ImageData(filename));
594
	init(device, new ImageData(filename), 0);
594
	if (device.tracking) device.new_Object(this);
595
	if (device.tracking) device.new_Object(this);
595
}
596
}
596
597
Lines 599-609 Link Here
599
 */
600
 */
600
void createMask() {
601
void createMask() {
601
	if (mask != 0) return;
602
	if (mask != 0) return;
602
	mask = createMask(getImageData(), false);
603
	mask = createMask(getImageData(), false, 0);
603
	if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
604
	if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
604
}
605
}
605
606
606
int /*long*/ createMask(ImageData image, boolean copy) {
607
int /*long*/ createMask(ImageData image, boolean copy, int/*long*/ screen) {
608
	if (screen == 0) {
609
		screen = OS.gdk_screen_get_default();
610
	}
607
	ImageData mask = image.getTransparencyMask();
611
	ImageData mask = image.getTransparencyMask();
608
	byte[] data = mask.data;
612
	byte[] data = mask.data;
609
	byte[] maskData = copy ? new byte[data.length] : data;
613
	byte[] maskData = copy ? new byte[data.length] : data;
Lines 614-620 Link Here
614
			((s & 0x04) << 3) | ((s & 0x02) << 5) |	((s & 0x01) << 7));
618
			((s & 0x04) << 3) | ((s & 0x02) << 5) |	((s & 0x01) << 7));
615
	}
619
	}
616
	maskData = ImageData.convertPad(maskData, mask.width, mask.height, mask.depth, mask.scanlinePad, 1);
620
	maskData = ImageData.convertPad(maskData, mask.width, mask.height, mask.depth, mask.scanlinePad, 1);
617
	return OS.gdk_bitmap_create_from_data(0, maskData, mask.width, mask.height);
621
	return OS.gdk_bitmap_create_from_data(OS.gdk_screen_get_root_window(screen), maskData, mask.width, mask.height);
618
}
622
}
619
623
620
void createSurface() {
624
void createSurface() {
Lines 627-633 Link Here
627
	if (mask != 0 || alpha != -1 || alphaData != null) {
631
	if (mask != 0 || alpha != -1 || alphaData != null) {
628
	 	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height);
632
	 	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height);
629
		if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
633
		if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
630
		int /*long*/ colormap = OS.gdk_colormap_get_system();
634
	    int /*long*/ screen = OS.gdk_drawable_get_screen(pixmap);
635
		int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
631
		OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height);
636
		OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height);
632
		int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
637
		int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
633
		int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);		
638
		int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);		
Lines 839-845 Link Here
839
 	int width = w[0], height = h[0]; 	
844
 	int width = w[0], height = h[0]; 	
840
 	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height);
845
 	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height);
841
	if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
846
	if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
842
	int /*long*/ colormap = OS.gdk_colormap_get_system();
847
	int /*long*/ screen = OS.gdk_drawable_get_screen(pixmap);
848
	int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
843
	OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height);
849
	OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height);
844
	int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
850
	int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
845
	int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
851
	int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
Lines 945-951 Link Here
945
	white.red = (short)0xFFFF;
951
	white.red = (short)0xFFFF;
946
	white.green = (short)0xFFFF;
952
	white.green = (short)0xFFFF;
947
	white.blue = (short)0xFFFF;
953
	white.blue = (short)0xFFFF;
948
	int /*long*/ colormap = OS.gdk_colormap_get_system();
954
	int /*long*/ screen = OS.gdk_drawable_get_screen(pixmap);
955
	int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
949
	OS.gdk_colormap_alloc_color(colormap, white, true, true);
956
	OS.gdk_colormap_alloc_color(colormap, white, true, true);
950
	int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
957
	int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
951
	OS.gdk_gc_set_foreground(gdkGC, white);
958
	OS.gdk_gc_set_foreground(gdkGC, white);
Lines 954-962 Link Here
954
	OS.gdk_colormap_free_colors(colormap, white, 1);
961
	OS.gdk_colormap_free_colors(colormap, white, 1);
955
}
962
}
956
963
957
void init(Device device, ImageData image) {
964
void init(Device device, ImageData image, int/*long*/ screen) {
958
	if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
965
	if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
959
	this.device = device;
966
	this.device = device;
967
	if (screen == 0) {
968
		screen = OS.gdk_screen_get_default();
969
	}
960
	int width = image.width;
970
	int width = image.width;
961
	int height = image.height;
971
	int height = image.height;
962
	PaletteData palette = image.palette;
972
	PaletteData palette = image.palette;
Lines 997-1003 Link Here
997
		}
1007
		}
998
	}
1008
	}
999
	OS.memmove(data, buffer, stride * height);
1009
	OS.memmove(data, buffer, stride * height);
1000
	int /*long*/ pixmap = OS.gdk_pixmap_new (OS.GDK_ROOT_PARENT(), width, height, -1);
1010
	int /*long*/ pixmap = OS.gdk_pixmap_new (OS.gdk_screen_get_root_window(screen), width, height, -1);
1001
	if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1011
	if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1002
	int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
1012
	int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
1003
	if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1013
	if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Lines 1020-1026 Link Here
1020
				transparentPixel = rgb.red << 16 | rgb.green << 8 | rgb.blue;
1030
				transparentPixel = rgb.red << 16 | rgb.green << 8 | rgb.blue;
1021
			}
1031
			}
1022
		}
1032
		}
1023
		int /*long*/ mask = createMask(image, isIcon);
1033
		int /*long*/ mask = createMask(image, isIcon, screen);
1024
		if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1034
		if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1025
		this.mask = mask;
1035
		this.mask = mask;
1026
		if (isIcon) {
1036
		if (isIcon) {
Lines 1037-1043 Link Here
1037
			System.arraycopy(image.alphaData, 0, this.alphaData, 0, alphaData.length);
1047
			System.arraycopy(image.alphaData, 0, this.alphaData, 0, alphaData.length);
1038
		}
1048
		}
1039
		if (device.useXRender && (alpha != -1 || alphaData != null)) {
1049
		if (device.useXRender && (alpha != -1 || alphaData != null)) {
1040
			mask = OS.gdk_pixmap_new(0, alpha != -1 ? 1 : width, alpha != -1 ? 1 : height, 8);
1050
			mask = OS.gdk_pixmap_new(OS.gdk_screen_get_root_window(screen), alpha != -1 ? 1 : width, alpha != -1 ? 1 : height, 8);
1041
			if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1051
			if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1042
			int /*long*/ gc = OS.gdk_gc_new(mask);
1052
			int /*long*/ gc = OS.gdk_gc_new(mask);
1043
			if (alpha != -1) {
1053
			if (alpha != -1) {
Lines 1185-1188 Link Here
1185
	return "Image {" + pixmap + "}";
1195
	return "Image {" + pixmap + "}";
1186
}
1196
}
1187
1197
1198
public void gtk_set_screen(int screen) {
1199
	init(device, getImageData(), screen);
1200
}
1201
1188
}
1202
}
(-)Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java (-6 / +16 lines)
Lines 661-666 Link Here
661
	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
661
	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
662
	if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
662
	if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
663
	if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
663
	if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
664
	if (OS.gdk_drawable_get_screen(image.pixmap) != OS.gdk_gc_get_screen(handle)) {
665
		image.gtk_set_screen(OS.gdk_gc_get_screen(handle));
666
	}
664
	drawImage(image, 0, 0, -1, -1, x, y, -1, -1, true);
667
	drawImage(image, 0, 0, -1, -1, x, y, -1, -1, true);
665
}
668
}
666
669
Lines 704-709 Link Here
704
	}
707
	}
705
	if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
708
	if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
706
	if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
709
	if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
710
	if (OS.gdk_drawable_get_screen(image.pixmap) != OS.gdk_gc_get_screen(handle)) {
711
		image.gtk_set_screen(OS.gdk_gc_get_screen(handle));
712
	}
707
	drawImage(image, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, false);
713
	drawImage(image, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, false);
708
}
714
}
709
715
Lines 792-798 Link Here
792
	}
798
	}
793
	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight);
799
	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight);
794
	if (pixbuf == 0) return;
800
	if (pixbuf == 0) return;
795
	int /*long*/ colormap = OS.gdk_colormap_get_system();
801
	int /*long*/ screen = OS.gdk_gc_get_screen(handle);
802
	int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
796
	OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
803
	OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
797
	int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
804
	int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
798
	int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
805
	int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
Lines 830-835 Link Here
830
	/* Generate the mask if necessary. */
837
	/* Generate the mask if necessary. */
831
	if (srcImage.transparentPixel != -1) srcImage.createMask();
838
	if (srcImage.transparentPixel != -1) srcImage.createMask();
832
	int /*long*/ maskPixmap = srcImage.mask;
839
	int /*long*/ maskPixmap = srcImage.mask;
840
	int /*long*/ screen = OS.gdk_gc_get_screen(handle);
833
841
834
	if (device.useXRender) {
842
	if (device.useXRender) {
835
		drawImageXRender(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight, maskPixmap, OS.PictStandardA1);
843
		drawImageXRender(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight, maskPixmap, OS.PictStandardA1);
Lines 837-843 Link Here
837
		if (srcWidth != destWidth || srcHeight != destHeight) {
845
		if (srcWidth != destWidth || srcHeight != destHeight) {
838
			int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight);
846
			int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight);
839
			if (pixbuf != 0) {
847
			if (pixbuf != 0) {
840
				int /*long*/ colormap = OS.gdk_colormap_get_system();
848
				int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
841
				OS.gdk_pixbuf_get_from_drawable(pixbuf, colorPixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
849
				OS.gdk_pixbuf_get_from_drawable(pixbuf, colorPixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
842
				int /*long*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight);
850
				int /*long*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight);
843
				if (maskPixbuf != 0) {
851
				if (maskPixbuf != 0) {
Lines 885-891 Link Here
885
			int newHeight = srcY + srcHeight;
893
			int newHeight = srcY + srcHeight;
886
			int bytesPerLine = (newWidth + 7) / 8;
894
			int bytesPerLine = (newWidth + 7) / 8;
887
			byte[] maskData = new byte[bytesPerLine * newHeight];
895
			byte[] maskData = new byte[bytesPerLine * newHeight];
888
			int /*long*/ mask = OS.gdk_bitmap_create_from_data(0, maskData, newWidth, newHeight);
896
			int /*long*/ mask = OS.gdk_bitmap_create_from_data(OS.gdk_screen_get_root_window(screen), maskData, newWidth, newHeight);
889
			if (mask != 0) {
897
			if (mask != 0) {
890
				int /*long*/ gc = OS.gdk_gc_new(mask);
898
				int /*long*/ gc = OS.gdk_gc_new(mask);
891
				OS.gdk_region_offset(data.clipRgn, -destX + srcX, -destY + srcY);
899
				OS.gdk_region_offset(data.clipRgn, -destX + srcX, -destY + srcY);
Lines 922-927 Link Here
922
void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, int /*long*/ maskPixmap, int maskType) {
930
void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, int /*long*/ maskPixmap, int maskType) {
923
	int translateX = 0, translateY = 0;
931
	int translateX = 0, translateY = 0;
924
	int /*long*/ drawable = data.drawable;
932
	int /*long*/ drawable = data.drawable;
933
	int /*long*/ screen = OS.gdk_drawable_get_screen(drawable);
925
	if (data.image == null) {
934
	if (data.image == null) {
926
		int[] x = new int[1], y = new int[1];
935
		int[] x = new int[1], y = new int[1];
927
		int /*long*/ [] real_drawable = new int /*long*/ [1];
936
		int /*long*/ [] real_drawable = new int /*long*/ [1];
Lines 943-949 Link Here
943
		maskPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(maskPixmap), OS.XRenderFindStandardFormat(xDisplay, maskType), attribCount, attrib);
952
		maskPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(maskPixmap), OS.XRenderFindStandardFormat(xDisplay, maskType), attribCount, attrib);
944
		if (maskPict == 0) SWT.error(SWT.ERROR_NO_HANDLES);
953
		if (maskPict == 0) SWT.error(SWT.ERROR_NO_HANDLES);
945
	}
954
	}
946
	int /*long*/ format = OS.XRenderFindVisualFormat(xDisplay, OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()));
955
	int /*long*/ format = OS.XRenderFindVisualFormat(xDisplay, OS.gdk_x11_visual_get_xvisual(OS.gdk_screen_get_rgb_visual(screen)));
947
	int /*long*/ destPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(drawable), format, 0, null);
956
	int /*long*/ destPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(drawable), format, 0, null);
948
	if (destPict == 0) SWT.error(SWT.ERROR_NO_HANDLES);
957
	if (destPict == 0) SWT.error(SWT.ERROR_NO_HANDLES);
949
	int /*long*/ srcPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(srcImage.pixmap), format, 0, null);
958
	int /*long*/ srcPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(srcImage.pixmap), format, 0, null);
Lines 992-998 Link Here
992
int /*long*/ scale(int /*long*/ src, int srcX, int srcY, int srcWidth, int srcHeight, int destWidth, int destHeight) {
1001
int /*long*/ scale(int /*long*/ src, int srcX, int srcY, int srcWidth, int srcHeight, int destWidth, int destHeight) {
993
	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight);
1002
	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight);
994
	if (pixbuf == 0) return 0;
1003
	if (pixbuf == 0) return 0;
995
	int /*long*/ colormap = OS.gdk_colormap_get_system();
1004
	int /*long*/ screen = OS.gdk_gc_get_screen(handle);
1005
	int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen);
996
	OS.gdk_pixbuf_get_from_drawable(pixbuf, src, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
1006
	OS.gdk_pixbuf_get_from_drawable(pixbuf, src, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
997
	int /*long*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR);
1007
	int /*long*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR);
998
	OS.g_object_unref(pixbuf);
1008
	OS.g_object_unref(pixbuf);
Lines 1529-1535 Link Here
1529
		OS.pango_layout_get_size(layout, w, h);
1539
		OS.pango_layout_get_size(layout, w, h);
1530
		int width = OS.PANGO_PIXELS(w[0]);
1540
		int width = OS.PANGO_PIXELS(w[0]);
1531
		int height = OS.PANGO_PIXELS(h[0]);
1541
		int height = OS.PANGO_PIXELS(h[0]);
1532
		int /*long*/ pixmap = OS.gdk_pixmap_new(OS.GDK_ROOT_PARENT(), width, height, -1);
1542
		int /*long*/ pixmap = OS.gdk_pixmap_new(OS.gdk_screen_get_root_window(OS.gdk_gc_get_screen(handle)), width, height, -1);
1533
		if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1543
		if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1534
		int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
1544
		int /*long*/ gdkGC = OS.gdk_gc_new(pixmap);
1535
		if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
1545
		if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
(-)Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java (-4 / +6 lines)
Lines 71-77 Link Here
71
public Color(Device device, int red, int green, int blue) {
71
public Color(Device device, int red, int green, int blue) {
72
	if (device == null) device = Device.getDevice();
72
	if (device == null) device = Device.getDevice();
73
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
73
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
74
	init(device, red, green, blue);
74
	init(device, 0, red, green, blue);
75
	if (device.tracking) device.new_Object(this);
75
	if (device.tracking) device.new_Object(this);
76
}
76
}
77
77
Lines 101-107 Link Here
101
	if (device == null) device = Device.getDevice();
101
	if (device == null) device = Device.getDevice();
102
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
102
	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
103
	if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
103
	if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
104
	init(device, rgb.red, rgb.green, rgb.blue);
104
	init(device, 0, rgb.red, rgb.green, rgb.blue);
105
	if (device.tracking) device.new_Object(this);
105
	if (device.tracking) device.new_Object(this);
106
}
106
}
107
107
Lines 241-248 Link Here
241
	return color;
241
	return color;
242
}
242
}
243
243
244
void init(Device device, int red, int green, int blue) {
244
void init(Device device, int/*long*/ screen, int red, int green, int blue) {
245
	this.device = device;
245
	this.device = device;
246
    if (screen == 0) 
247
    	screen = OS.gdk_screen_get_default();
246
	if ((red > 255) || (red < 0) ||
248
	if ((red > 255) || (red < 0) ||
247
		(green > 255) || (green < 0) ||
249
		(green > 255) || (green < 0) ||
248
		(blue > 255) || (blue < 0)) {
250
		(blue > 255) || (blue < 0)) {
Lines 252-258 Link Here
252
	gdkColor.red = (short)((red & 0xFF) | ((red & 0xFF) << 8));
254
	gdkColor.red = (short)((red & 0xFF) | ((red & 0xFF) << 8));
253
	gdkColor.green = (short)((green & 0xFF) | ((green & 0xFF) << 8));
255
	gdkColor.green = (short)((green & 0xFF) | ((green & 0xFF) << 8));
254
	gdkColor.blue = (short)((blue & 0xFF) | ((blue & 0xFF) << 8));
256
	gdkColor.blue = (short)((blue & 0xFF) | ((blue & 0xFF) << 8));
255
	int /*long*/ colormap = OS.gdk_colormap_get_system();
257
	int /* long */colormap = OS.gdk_screen_get_system_colormap(screen);
256
	if (!OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) {
258
	if (!OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) {
257
		/* Allocate black. */
259
		/* Allocate black. */
258
		gdkColor = new GdkColor();
260
		gdkColor = new GdkColor();
(-)Eclipse SWT PI/gtk/library/os_stats.h (-1 / +16 lines)
Lines 155-161 Link Here
155
	_1XCheckMaskEvent_FUNC,
155
	_1XCheckMaskEvent_FUNC,
156
	_1XCheckWindowEvent_FUNC,
156
	_1XCheckWindowEvent_FUNC,
157
	_1XDefaultRootWindow_FUNC,
157
	_1XDefaultRootWindow_FUNC,
158
	_1XDefaultScreen_FUNC,
159
	_1XFlush_FUNC,
158
	_1XFlush_FUNC,
160
	_1XFree_FUNC,
159
	_1XFree_FUNC,
161
	_1XGetSelectionOwner_FUNC,
160
	_1XGetSelectionOwner_FUNC,
Lines 283-293 Link Here
283
	_1gdk_1color_1white_FUNC,
282
	_1gdk_1color_1white_FUNC,
284
	_1gdk_1colormap_1alloc_1color_FUNC,
283
	_1gdk_1colormap_1alloc_1color_FUNC,
285
	_1gdk_1colormap_1free_1colors_FUNC,
284
	_1gdk_1colormap_1free_1colors_FUNC,
285
	_1gdk_1colormap_1get_1screen_FUNC,
286
	_1gdk_1colormap_1get_1system_FUNC,
286
	_1gdk_1colormap_1get_1system_FUNC,
287
	_1gdk_1colormap_1query_1color_FUNC,
287
	_1gdk_1colormap_1query_1color_FUNC,
288
	_1gdk_1cursor_1destroy_FUNC,
288
	_1gdk_1cursor_1destroy_FUNC,
289
	_1gdk_1cursor_1new_FUNC,
289
	_1gdk_1cursor_1new_FUNC,
290
	_1gdk_1cursor_1new_1from_1pixmap_FUNC,
290
	_1gdk_1cursor_1new_1from_1pixmap_FUNC,
291
	_1gdk_1display_1get_1default_FUNC,
292
	_1gdk_1display_1get_1n_1screens_FUNC,
293
	_1gdk_1display_1get_1pointer_FUNC,
294
	_1gdk_1display_1get_1screen_FUNC,
295
	_1gdk_1display_1warp_1pointer_FUNC,
291
	_1gdk_1drag_1status_FUNC,
296
	_1gdk_1drag_1status_FUNC,
292
	_1gdk_1draw_1arc_FUNC,
297
	_1gdk_1draw_1arc_FUNC,
293
	_1gdk_1draw_1drawable_FUNC,
298
	_1gdk_1draw_1drawable_FUNC,
Lines 302-307 Link Here
302
	_1gdk_1draw_1rectangle_FUNC,
307
	_1gdk_1draw_1rectangle_FUNC,
303
	_1gdk_1drawable_1get_1depth_FUNC,
308
	_1gdk_1drawable_1get_1depth_FUNC,
304
	_1gdk_1drawable_1get_1image_FUNC,
309
	_1gdk_1drawable_1get_1image_FUNC,
310
	_1gdk_1drawable_1get_1screen_FUNC,
305
	_1gdk_1drawable_1get_1size_FUNC,
311
	_1gdk_1drawable_1get_1size_FUNC,
306
	_1gdk_1drawable_1get_1visible_1region_FUNC,
312
	_1gdk_1drawable_1get_1visible_1region_FUNC,
307
	_1gdk_1error_1trap_1pop_FUNC,
313
	_1gdk_1error_1trap_1pop_FUNC,
Lines 319-324 Link Here
319
	_1gdk_1event_1put_FUNC,
325
	_1gdk_1event_1put_FUNC,
320
	_1gdk_1flush_FUNC,
326
	_1gdk_1flush_FUNC,
321
	_1gdk_1free_1text_1list_FUNC,
327
	_1gdk_1free_1text_1list_FUNC,
328
	_1gdk_1gc_1get_1screen_FUNC,
322
	_1gdk_1gc_1get_1values_FUNC,
329
	_1gdk_1gc_1get_1values_FUNC,
323
	_1gdk_1gc_1new_FUNC,
330
	_1gdk_1gc_1new_FUNC,
324
	_1gdk_1gc_1set_1background_FUNC,
331
	_1gdk_1gc_1set_1background_FUNC,
Lines 343-348 Link Here
343
	_1gdk_1keyval_1to_1lower_FUNC,
350
	_1gdk_1keyval_1to_1lower_FUNC,
344
	_1gdk_1keyval_1to_1unicode_FUNC,
351
	_1gdk_1keyval_1to_1unicode_FUNC,
345
	_1gdk_1pango_1context_1get_FUNC,
352
	_1gdk_1pango_1context_1get_FUNC,
353
	_1gdk_1pango_1context_1get_1for_1screen_FUNC,
346
	_1gdk_1pango_1context_1set_1colormap_FUNC,
354
	_1gdk_1pango_1context_1set_1colormap_FUNC,
347
	_1gdk_1pango_1layout_1get_1clip_1region_FUNC,
355
	_1gdk_1pango_1layout_1get_1clip_1region_FUNC,
348
	_1gdk_1pixbuf_1copy_1area_FUNC,
356
	_1gdk_1pixbuf_1copy_1area_FUNC,
Lines 385-390 Link Here
385
	_1gdk_1screen_1get_1monitor_1geometry_FUNC,
393
	_1gdk_1screen_1get_1monitor_1geometry_FUNC,
386
	_1gdk_1screen_1get_1n_1monitors_FUNC,
394
	_1gdk_1screen_1get_1n_1monitors_FUNC,
387
	_1gdk_1screen_1get_1number_FUNC,
395
	_1gdk_1screen_1get_1number_FUNC,
396
	_1gdk_1screen_1get_1rgb_1visual_FUNC,
397
	_1gdk_1screen_1get_1root_1window_FUNC,
398
	_1gdk_1screen_1get_1system_1colormap_FUNC,
399
	_1gdk_1screen_1get_1width_FUNC,
388
	_1gdk_1screen_1height_FUNC,
400
	_1gdk_1screen_1height_FUNC,
389
	_1gdk_1screen_1width_FUNC,
401
	_1gdk_1screen_1width_FUNC,
390
	_1gdk_1screen_1width_1mm_FUNC,
402
	_1gdk_1screen_1width_1mm_FUNC,
Lines 1007-1012 Link Here
1007
	_1gtk_1widget_1get_1modifier_1style_FUNC,
1019
	_1gtk_1widget_1get_1modifier_1style_FUNC,
1008
	_1gtk_1widget_1get_1pango_1context_FUNC,
1020
	_1gtk_1widget_1get_1pango_1context_FUNC,
1009
	_1gtk_1widget_1get_1parent_FUNC,
1021
	_1gtk_1widget_1get_1parent_FUNC,
1022
	_1gtk_1widget_1get_1screen_FUNC,
1010
	_1gtk_1widget_1get_1size_1request_FUNC,
1023
	_1gtk_1widget_1get_1size_1request_FUNC,
1011
	_1gtk_1widget_1get_1style_FUNC,
1024
	_1gtk_1widget_1get_1style_FUNC,
1012
	_1gtk_1widget_1get_1toplevel_FUNC,
1025
	_1gtk_1widget_1get_1toplevel_FUNC,
Lines 1053-1058 Link Here
1053
	_1gtk_1window_1get_1mnemonic_1modifier_FUNC,
1066
	_1gtk_1window_1get_1mnemonic_1modifier_FUNC,
1054
	_1gtk_1window_1get_1modal_FUNC,
1067
	_1gtk_1window_1get_1modal_FUNC,
1055
	_1gtk_1window_1get_1position_FUNC,
1068
	_1gtk_1window_1get_1position_FUNC,
1069
	_1gtk_1window_1get_1screen_FUNC,
1056
	_1gtk_1window_1get_1size_FUNC,
1070
	_1gtk_1window_1get_1size_FUNC,
1057
	_1gtk_1window_1iconify_FUNC,
1071
	_1gtk_1window_1iconify_FUNC,
1058
	_1gtk_1window_1maximize_FUNC,
1072
	_1gtk_1window_1maximize_FUNC,
Lines 1067-1072 Link Here
1067
	_1gtk_1window_1set_1icon_1list_FUNC,
1081
	_1gtk_1window_1set_1icon_1list_FUNC,
1068
	_1gtk_1window_1set_1modal_FUNC,
1082
	_1gtk_1window_1set_1modal_FUNC,
1069
	_1gtk_1window_1set_1resizable_FUNC,
1083
	_1gtk_1window_1set_1resizable_FUNC,
1084
	_1gtk_1window_1set_1screen_FUNC,
1070
	_1gtk_1window_1set_1title_FUNC,
1085
	_1gtk_1window_1set_1title_FUNC,
1071
	_1gtk_1window_1set_1transient_1for_FUNC,
1086
	_1gtk_1window_1set_1transient_1for_FUNC,
1072
	_1gtk_1window_1set_1type_1hint_FUNC,
1087
	_1gtk_1window_1set_1type_1hint_FUNC,
(-)Eclipse SWT PI/gtk/library/os_stats.c (-3 / +18 lines)
Lines 18-25 Link Here
18
18
19
#ifdef NATIVE_STATS
19
#ifdef NATIVE_STATS
20
20
21
int OS_nativeFunctionCount = 1207;
21
int OS_nativeFunctionCount = 1222;
22
int OS_nativeFunctionCallCount[1207];
22
int OS_nativeFunctionCallCount[1222];
23
char * OS_nativeFunctionNames[] = {
23
char * OS_nativeFunctionNames[] = {
24
	"Call",
24
	"Call",
25
	"GDK_1EVENT_1TYPE",
25
	"GDK_1EVENT_1TYPE",
Lines 151-157 Link Here
151
	"_1XCheckMaskEvent",
151
	"_1XCheckMaskEvent",
152
	"_1XCheckWindowEvent",
152
	"_1XCheckWindowEvent",
153
	"_1XDefaultRootWindow",
153
	"_1XDefaultRootWindow",
154
	"_1XDefaultScreen",
155
	"_1XFlush",
154
	"_1XFlush",
156
	"_1XFree",
155
	"_1XFree",
157
	"_1XGetSelectionOwner",
156
	"_1XGetSelectionOwner",
Lines 279-289 Link Here
279
	"_1gdk_1color_1white",
278
	"_1gdk_1color_1white",
280
	"_1gdk_1colormap_1alloc_1color",
279
	"_1gdk_1colormap_1alloc_1color",
281
	"_1gdk_1colormap_1free_1colors",
280
	"_1gdk_1colormap_1free_1colors",
281
	"_1gdk_1colormap_1get_1screen",
282
	"_1gdk_1colormap_1get_1system",
282
	"_1gdk_1colormap_1get_1system",
283
	"_1gdk_1colormap_1query_1color",
283
	"_1gdk_1colormap_1query_1color",
284
	"_1gdk_1cursor_1destroy",
284
	"_1gdk_1cursor_1destroy",
285
	"_1gdk_1cursor_1new",
285
	"_1gdk_1cursor_1new",
286
	"_1gdk_1cursor_1new_1from_1pixmap",
286
	"_1gdk_1cursor_1new_1from_1pixmap",
287
	"_1gdk_1display_1get_1default",
288
	"_1gdk_1display_1get_1n_1screens",
289
	"_1gdk_1display_1get_1pointer",
290
	"_1gdk_1display_1get_1screen",
291
	"_1gdk_1display_1warp_1pointer",
287
	"_1gdk_1drag_1status",
292
	"_1gdk_1drag_1status",
288
	"_1gdk_1draw_1arc",
293
	"_1gdk_1draw_1arc",
289
	"_1gdk_1draw_1drawable",
294
	"_1gdk_1draw_1drawable",
Lines 298-303 Link Here
298
	"_1gdk_1draw_1rectangle",
303
	"_1gdk_1draw_1rectangle",
299
	"_1gdk_1drawable_1get_1depth",
304
	"_1gdk_1drawable_1get_1depth",
300
	"_1gdk_1drawable_1get_1image",
305
	"_1gdk_1drawable_1get_1image",
306
	"_1gdk_1drawable_1get_1screen",
301
	"_1gdk_1drawable_1get_1size",
307
	"_1gdk_1drawable_1get_1size",
302
	"_1gdk_1drawable_1get_1visible_1region",
308
	"_1gdk_1drawable_1get_1visible_1region",
303
	"_1gdk_1error_1trap_1pop",
309
	"_1gdk_1error_1trap_1pop",
Lines 315-320 Link Here
315
	"_1gdk_1event_1put",
321
	"_1gdk_1event_1put",
316
	"_1gdk_1flush",
322
	"_1gdk_1flush",
317
	"_1gdk_1free_1text_1list",
323
	"_1gdk_1free_1text_1list",
324
	"_1gdk_1gc_1get_1screen",
318
	"_1gdk_1gc_1get_1values",
325
	"_1gdk_1gc_1get_1values",
319
	"_1gdk_1gc_1new",
326
	"_1gdk_1gc_1new",
320
	"_1gdk_1gc_1set_1background",
327
	"_1gdk_1gc_1set_1background",
Lines 339-344 Link Here
339
	"_1gdk_1keyval_1to_1lower",
346
	"_1gdk_1keyval_1to_1lower",
340
	"_1gdk_1keyval_1to_1unicode",
347
	"_1gdk_1keyval_1to_1unicode",
341
	"_1gdk_1pango_1context_1get",
348
	"_1gdk_1pango_1context_1get",
349
	"_1gdk_1pango_1context_1get_1for_1screen",
342
	"_1gdk_1pango_1context_1set_1colormap",
350
	"_1gdk_1pango_1context_1set_1colormap",
343
	"_1gdk_1pango_1layout_1get_1clip_1region",
351
	"_1gdk_1pango_1layout_1get_1clip_1region",
344
	"_1gdk_1pixbuf_1copy_1area",
352
	"_1gdk_1pixbuf_1copy_1area",
Lines 381-386 Link Here
381
	"_1gdk_1screen_1get_1monitor_1geometry",
389
	"_1gdk_1screen_1get_1monitor_1geometry",
382
	"_1gdk_1screen_1get_1n_1monitors",
390
	"_1gdk_1screen_1get_1n_1monitors",
383
	"_1gdk_1screen_1get_1number",
391
	"_1gdk_1screen_1get_1number",
392
	"_1gdk_1screen_1get_1rgb_1visual",
393
	"_1gdk_1screen_1get_1root_1window",
394
	"_1gdk_1screen_1get_1system_1colormap",
395
	"_1gdk_1screen_1get_1width",
384
	"_1gdk_1screen_1height",
396
	"_1gdk_1screen_1height",
385
	"_1gdk_1screen_1width",
397
	"_1gdk_1screen_1width",
386
	"_1gdk_1screen_1width_1mm",
398
	"_1gdk_1screen_1width_1mm",
Lines 1003-1008 Link Here
1003
	"_1gtk_1widget_1get_1modifier_1style",
1015
	"_1gtk_1widget_1get_1modifier_1style",
1004
	"_1gtk_1widget_1get_1pango_1context",
1016
	"_1gtk_1widget_1get_1pango_1context",
1005
	"_1gtk_1widget_1get_1parent",
1017
	"_1gtk_1widget_1get_1parent",
1018
	"_1gtk_1widget_1get_1screen",
1006
	"_1gtk_1widget_1get_1size_1request",
1019
	"_1gtk_1widget_1get_1size_1request",
1007
	"_1gtk_1widget_1get_1style",
1020
	"_1gtk_1widget_1get_1style",
1008
	"_1gtk_1widget_1get_1toplevel",
1021
	"_1gtk_1widget_1get_1toplevel",
Lines 1049-1054 Link Here
1049
	"_1gtk_1window_1get_1mnemonic_1modifier",
1062
	"_1gtk_1window_1get_1mnemonic_1modifier",
1050
	"_1gtk_1window_1get_1modal",
1063
	"_1gtk_1window_1get_1modal",
1051
	"_1gtk_1window_1get_1position",
1064
	"_1gtk_1window_1get_1position",
1065
	"_1gtk_1window_1get_1screen",
1052
	"_1gtk_1window_1get_1size",
1066
	"_1gtk_1window_1get_1size",
1053
	"_1gtk_1window_1iconify",
1067
	"_1gtk_1window_1iconify",
1054
	"_1gtk_1window_1maximize",
1068
	"_1gtk_1window_1maximize",
Lines 1063-1068 Link Here
1063
	"_1gtk_1window_1set_1icon_1list",
1077
	"_1gtk_1window_1set_1icon_1list",
1064
	"_1gtk_1window_1set_1modal",
1078
	"_1gtk_1window_1set_1modal",
1065
	"_1gtk_1window_1set_1resizable",
1079
	"_1gtk_1window_1set_1resizable",
1080
	"_1gtk_1window_1set_1screen",
1066
	"_1gtk_1window_1set_1title",
1081
	"_1gtk_1window_1set_1title",
1067
	"_1gtk_1window_1set_1transient_1for",
1082
	"_1gtk_1window_1set_1transient_1for",
1068
	"_1gtk_1window_1set_1type_1hint",
1083
	"_1gtk_1window_1set_1type_1hint",
(-)Eclipse SWT PI/gtk/library/os.c (-12 / +199 lines)
Lines 1551-1568 Link Here
1551
}
1551
}
1552
#endif
1552
#endif
1553
1553
1554
#ifndef NO__1XDefaultScreen
1555
JNIEXPORT jint JNICALL OS_NATIVE(_1XDefaultScreen)
1556
	(JNIEnv *env, jclass that, jint arg0)
1557
{
1558
	jint rc = 0;
1559
	OS_NATIVE_ENTER(env, that, _1XDefaultScreen_FUNC);
1560
	rc = (jint)XDefaultScreen((Display *)arg0);
1561
	OS_NATIVE_EXIT(env, that, _1XDefaultScreen_FUNC);
1562
	return rc;
1563
}
1564
#endif
1565
1566
#ifndef NO__1XFlush
1554
#ifndef NO__1XFlush
1567
JNIEXPORT void JNICALL OS_NATIVE(_1XFlush)
1555
JNIEXPORT void JNICALL OS_NATIVE(_1XFlush)
1568
	(JNIEnv *env, jclass that, jint arg0)
1556
	(JNIEnv *env, jclass that, jint arg0)
Lines 3555-3560 Link Here
3555
}
3543
}
3556
#endif
3544
#endif
3557
3545
3546
#ifndef NO__1gdk_1colormap_1get_1screen
3547
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1colormap_1get_1screen)
3548
	(JNIEnv *env, jclass that, jint arg0)
3549
{
3550
	jint rc = 0;
3551
	OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1get_1screen_FUNC);
3552
	rc = (jint)gdk_colormap_get_screen((GdkColormap*)arg0);
3553
	OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1get_1screen_FUNC);
3554
	return rc;
3555
}
3556
#endif
3557
3558
#ifndef NO__1gdk_1colormap_1get_1system
3558
#ifndef NO__1gdk_1colormap_1get_1system
3559
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1colormap_1get_1system)
3559
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1colormap_1get_1system)
3560
	(JNIEnv *env, jclass that)
3560
	(JNIEnv *env, jclass that)
Lines 3620-3625 Link Here
3620
}
3620
}
3621
#endif
3621
#endif
3622
3622
3623
#ifndef NO__1gdk_1display_1get_1default
3624
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1display_1get_1default)
3625
	(JNIEnv *env, jclass that)
3626
{
3627
	jint rc = 0;
3628
	OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_FUNC);
3629
	rc = (jint)gdk_display_get_default();
3630
	OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_FUNC);
3631
	return rc;
3632
}
3633
#endif
3634
3635
#ifndef NO__1gdk_1display_1get_1n_1screens
3636
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1display_1get_1n_1screens)
3637
	(JNIEnv *env, jclass that, jint arg0)
3638
{
3639
	jint rc = 0;
3640
	OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1n_1screens_FUNC);
3641
	rc = (jint)gdk_display_get_n_screens((GdkDisplay*)arg0);
3642
	OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1n_1screens_FUNC);
3643
	return rc;
3644
}
3645
#endif
3646
3647
#ifndef NO__1gdk_1display_1get_1pointer
3648
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1display_1get_1pointer)
3649
	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2, jintArray arg3, jintArray arg4)
3650
{
3651
	jint *lparg1=NULL;
3652
	jint *lparg2=NULL;
3653
	jint *lparg3=NULL;
3654
	jint *lparg4=NULL;
3655
	OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1pointer_FUNC);
3656
	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
3657
	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
3658
	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
3659
	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
3660
	gdk_display_get_pointer((GdkDisplay*)arg0, (GdkScreen**)lparg1, (gint*)lparg2, (gint*)lparg3, (GdkModifierType*)lparg4);
3661
fail:
3662
	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
3663
	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
3664
	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
3665
	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
3666
	OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1pointer_FUNC);
3667
}
3668
#endif
3669
3670
#ifndef NO__1gdk_1display_1get_1screen
3671
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1display_1get_1screen)
3672
	(JNIEnv *env, jclass that, jint arg0, jint arg1)
3673
{
3674
	jint rc = 0;
3675
	OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1screen_FUNC);
3676
	rc = (jint)gdk_display_get_screen((GdkDisplay*)arg0, (gint)arg1);
3677
	OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1screen_FUNC);
3678
	return rc;
3679
}
3680
#endif
3681
3682
#ifndef NO__1gdk_1display_1warp_1pointer
3683
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1display_1warp_1pointer)
3684
	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
3685
{
3686
	OS_NATIVE_ENTER(env, that, _1gdk_1display_1warp_1pointer_FUNC);
3687
	gdk_display_warp_pointer((GdkDisplay*)arg0, (GdkScreen*)arg1, (gint)arg2, (gint)arg3);
3688
	OS_NATIVE_EXIT(env, that, _1gdk_1display_1warp_1pointer_FUNC);
3689
}
3690
#endif
3691
3623
#ifndef NO__1gdk_1drag_1status
3692
#ifndef NO__1gdk_1drag_1status
3624
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drag_1status)
3693
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drag_1status)
3625
	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
3694
	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
Lines 3821-3826 Link Here
3821
}
3890
}
3822
#endif
3891
#endif
3823
3892
3893
#ifndef NO__1gdk_1drawable_1get_1screen
3894
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drawable_1get_1screen)
3895
	(JNIEnv *env, jclass that, jint arg0)
3896
{
3897
	jint rc = 0;
3898
	OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1screen_FUNC);
3899
	rc = (jint)gdk_drawable_get_screen((GdkDrawable*)arg0);
3900
	OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1screen_FUNC);
3901
	return rc;
3902
}
3903
#endif
3904
3824
#ifndef NO__1gdk_1drawable_1get_1size
3905
#ifndef NO__1gdk_1drawable_1get_1size
3825
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drawable_1get_1size)
3906
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drawable_1get_1size)
3826
	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
3907
	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
Lines 4052-4057 Link Here
4052
}
4133
}
4053
#endif
4134
#endif
4054
4135
4136
#ifndef NO__1gdk_1gc_1get_1screen
4137
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1gc_1get_1screen)
4138
	(JNIEnv *env, jclass that, jint arg0)
4139
{
4140
	jint rc = 0;
4141
	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1get_1screen_FUNC);
4142
	rc = (jint)gdk_gc_get_screen((GdkGC*)arg0);
4143
	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1get_1screen_FUNC);
4144
	return rc;
4145
}
4146
#endif
4147
4055
#ifndef NO__1gdk_1gc_1get_1values
4148
#ifndef NO__1gdk_1gc_1get_1values
4056
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1get_1values)
4149
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1get_1values)
4057
	(JNIEnv *env, jclass that, jint arg0, jobject arg1)
4150
	(JNIEnv *env, jclass that, jint arg0, jobject arg1)
Lines 4351-4356 Link Here
4351
}
4444
}
4352
#endif
4445
#endif
4353
4446
4447
#ifndef NO__1gdk_1pango_1context_1get_1for_1screen
4448
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1pango_1context_1get_1for_1screen)
4449
	(JNIEnv *env, jclass that, jint arg0)
4450
{
4451
	jint rc = 0;
4452
	OS_NATIVE_ENTER(env, that, _1gdk_1pango_1context_1get_1for_1screen_FUNC);
4453
	rc = (jint)gdk_pango_context_get_for_screen((GdkScreen*)arg0);
4454
	OS_NATIVE_EXIT(env, that, _1gdk_1pango_1context_1get_1for_1screen_FUNC);
4455
	return rc;
4456
}
4457
#endif
4458
4354
#ifndef NO__1gdk_1pango_1context_1set_1colormap
4459
#ifndef NO__1gdk_1pango_1context_1set_1colormap
4355
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pango_1context_1set_1colormap)
4460
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pango_1context_1set_1colormap)
4356
	(JNIEnv *env, jclass that, jint arg0, jint arg1)
4461
	(JNIEnv *env, jclass that, jint arg0, jint arg1)
Lines 4964-4969 Link Here
4964
}
5069
}
4965
#endif
5070
#endif
4966
5071
5072
#ifndef NO__1gdk_1screen_1get_1rgb_1visual
5073
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1rgb_1visual)
5074
	(JNIEnv *env, jclass that, jint arg0)
5075
{
5076
	jint rc = 0;
5077
	OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1rgb_1visual_FUNC);
5078
	rc = (jint)gdk_screen_get_rgb_visual((GdkScreen*)arg0);
5079
	OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1rgb_1visual_FUNC);
5080
	return rc;
5081
}
5082
#endif
5083
5084
#ifndef NO__1gdk_1screen_1get_1root_1window
5085
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1root_1window)
5086
	(JNIEnv *env, jclass that, jint arg0)
5087
{
5088
	jint rc = 0;
5089
	OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1root_1window_FUNC);
5090
	rc = (jint)gdk_screen_get_root_window((GdkScreen*)arg0);
5091
	OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1root_1window_FUNC);
5092
	return rc;
5093
}
5094
#endif
5095
5096
#ifndef NO__1gdk_1screen_1get_1system_1colormap
5097
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1system_1colormap)
5098
	(JNIEnv *env, jclass that, jint arg0)
5099
{
5100
	jint rc = 0;
5101
	OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1system_1colormap_FUNC);
5102
	rc = (jint)gdk_screen_get_system_colormap((GdkScreen*)arg0);
5103
	OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1system_1colormap_FUNC);
5104
	return rc;
5105
}
5106
#endif
5107
5108
#ifndef NO__1gdk_1screen_1get_1width
5109
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1width)
5110
	(JNIEnv *env, jclass that, jint arg0)
5111
{
5112
	jint rc = 0;
5113
	OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1width_FUNC);
5114
	rc = (jint)gdk_screen_get_width((GdkScreen*)arg0);
5115
	OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1width_FUNC);
5116
	return rc;
5117
}
5118
#endif
5119
4967
#ifndef NO__1gdk_1screen_1height
5120
#ifndef NO__1gdk_1screen_1height
4968
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1height)
5121
JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1height)
4969
	(JNIEnv *env, jclass that)
5122
	(JNIEnv *env, jclass that)
Lines 14315-14320 Link Here
14315
}
14468
}
14316
#endif
14469
#endif
14317
14470
14471
#ifndef NO__1gtk_1widget_1get_1screen
14472
JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1get_1screen)
14473
	(JNIEnv *env, jclass that, jint arg0)
14474
{
14475
	jint rc = 0;
14476
	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1screen_FUNC);
14477
	rc = (jint)gtk_widget_get_screen((GtkWidget*)arg0);
14478
	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1screen_FUNC);
14479
	return rc;
14480
}
14481
#endif
14482
14318
#ifndef NO__1gtk_1widget_1get_1size_1request
14483
#ifndef NO__1gtk_1widget_1get_1size_1request
14319
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1size_1request)
14484
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1size_1request)
14320
	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
14485
	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
Lines 14853-14858 Link Here
14853
}
15018
}
14854
#endif
15019
#endif
14855
15020
15021
#ifndef NO__1gtk_1window_1get_1screen
15022
JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1window_1get_1screen)
15023
	(JNIEnv *env, jclass that, jint arg0)
15024
{
15025
	jint rc = 0;
15026
	OS_NATIVE_ENTER(env, that, _1gtk_1window_1get_1screen_FUNC);
15027
	rc = (jint)gtk_window_get_screen((GtkWindow*)arg0);
15028
	OS_NATIVE_EXIT(env, that, _1gtk_1window_1get_1screen_FUNC);
15029
	return rc;
15030
}
15031
#endif
15032
14856
#ifndef NO__1gtk_1window_1get_1size
15033
#ifndef NO__1gtk_1window_1get_1size
14857
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1get_1size)
15034
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1get_1size)
14858
	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
15035
	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
Lines 15005-15010 Link Here
15005
}
15182
}
15006
#endif
15183
#endif
15007
15184
15185
#ifndef NO__1gtk_1window_1set_1screen
15186
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1screen)
15187
	(JNIEnv *env, jclass that, jint arg0, jint arg1)
15188
{
15189
	OS_NATIVE_ENTER(env, that, _1gtk_1window_1set_1screen_FUNC);
15190
	gtk_window_set_screen((GtkWindow *)arg0, (GdkScreen *)arg1);
15191
	OS_NATIVE_EXIT(env, that, _1gtk_1window_1set_1screen_FUNC);
15192
}
15193
#endif
15194
15008
#ifndef NO__1gtk_1window_1set_1title
15195
#ifndef NO__1gtk_1window_1set_1title
15009
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1title)
15196
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1title)
15010
	(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1)
15197
	(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1)
(-)Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java (-1 / +2 lines)
Lines 23-28 Link Here
23
	int handle;
23
	int handle;
24
	int x, y, width, height;
24
	int x, y, width, height;
25
	int clientX, clientY, clientWidth, clientHeight;
25
	int clientX, clientY, clientWidth, clientHeight;
26
	int /*long*/ screen;
26
	
27
	
27
/**
28
/**
28
 * Prevents uninitialized instances from being created outside the package.
29
 * Prevents uninitialized instances from being created outside the package.
Lines 44-50 Link Here
44
	if (object == this) return true;
45
	if (object == this) return true;
45
	if (!(object instanceof Monitor)) return false;
46
	if (!(object instanceof Monitor)) return false;
46
	Monitor monitor = (Monitor) object;
47
	Monitor monitor = (Monitor) object;
47
	return handle == monitor.handle;
48
	return (handle == monitor.handle) && (screen == monitor.screen);
48
}
49
}
49
50
50
/**
51
/**
(-)Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java (-9 / +147 lines)
Lines 667-681 Link Here
667
		lock.unlock();
667
		lock.unlock();
668
	}
668
	}
669
}
669
}
670
public static final native int _XDefaultScreen(int /*long*/ display);
671
public static final int XDefaultScreen(int /*long*/ display) {
672
	lock.lock();
673
	try {
674
		return _XDefaultScreen(display);
675
	} finally {
676
		lock.unlock();
677
	}
678
}
679
public static final native int /*long*/ _XDefaultRootWindow(int /*long*/ display);
670
public static final native int /*long*/ _XDefaultRootWindow(int /*long*/ display);
680
public static final int /*long*/ XDefaultRootWindow(int /*long*/ display) {
671
public static final int /*long*/ XDefaultRootWindow(int /*long*/ display) {
681
	lock.lock();
672
	lock.lock();
Lines 2276-2281 Link Here
2276
		lock.unlock();
2267
		lock.unlock();
2277
	}
2268
	}
2278
}
2269
}
2270
public static final native int /*long*/ _gdk_colormap_get_screen(int /*long*/ cmap);
2271
public static final int /*long*/ gdk_colormap_get_screen(int /*long*/ cmap) {
2272
  lock.lock();
2273
  try {
2274
    return _gdk_colormap_get_screen(cmap);
2275
  } finally {
2276
    lock.unlock();
2277
  }
2278
}
2279
public static final native int /*long*/ _gdk_colormap_get_system();
2279
public static final native int /*long*/ _gdk_colormap_get_system();
2280
public static final int /*long*/ gdk_colormap_get_system() {
2280
public static final int /*long*/ gdk_colormap_get_system() {
2281
	lock.lock();
2281
	lock.lock();
Lines 2321-2326 Link Here
2321
		lock.unlock();
2321
		lock.unlock();
2322
	}
2322
	}
2323
}
2323
}
2324
public static final native int/*long*/ _gdk_display_get_default();
2325
public static final int/*long*/ gdk_display_get_default() {
2326
	lock.lock();
2327
	try {
2328
		return _gdk_display_get_default();
2329
	} finally {
2330
		lock.unlock();
2331
	}
2332
}
2333
public static final native int _gdk_display_get_n_screens(int/*long*/ display);
2334
public static final int gdk_display_get_n_screens(int/*long*/ display) {
2335
	lock.lock();
2336
	try {
2337
		return _gdk_display_get_n_screens(display);
2338
	} finally {
2339
		lock.unlock();
2340
	}
2341
}
2342
public static final native void _gdk_display_get_pointer(int/*long*/ display, int[] /*long[]*/ screen, int[] x, int[] y, int[] mask);
2343
public static final void gdk_display_get_pointer(int/*long*/ display, int[] /*long[]*/ screen, int[] x, int[] y, int[] mask) {
2344
  lock.lock();
2345
  try {
2346
    _gdk_display_get_pointer(display, screen, x, y, mask);
2347
  } finally {
2348
    lock.unlock();
2349
  }
2350
}
2351
public static final native int _gdk_display_get_screen(int display, int screen_num);
2352
public static final int gdk_display_get_screen(int display, int screen_num) {
2353
  lock.lock();
2354
  try {
2355
    return _gdk_display_get_screen(display, screen_num);
2356
  } finally {
2357
    lock.unlock();
2358
  }
2359
}
2360
public static final native void _gdk_display_warp_pointer(int/*long*/ display, int/*long*/ screen, int x, int y);
2361
public static final void gdk_display_warp_pointer(int/*long*/ display, int/*long*/ screen, int x, int y) {
2362
  lock.lock();
2363
  try {
2364
    _gdk_display_warp_pointer(display, screen, x, y);
2365
  } finally {
2366
    lock.unlock();
2367
  }
2368
}
2369
2324
public static final native void _gdk_drag_status(int /*long*/ context, int action, int time);
2370
public static final native void _gdk_drag_status(int /*long*/ context, int action, int time);
2325
public static final void gdk_drag_status(int /*long*/ context, int action, int time) {
2371
public static final void gdk_drag_status(int /*long*/ context, int action, int time) {
2326
	lock.lock();
2372
	lock.lock();
Lines 2448-2453 Link Here
2448
		lock.unlock();
2494
		lock.unlock();
2449
	}
2495
	}
2450
}
2496
}
2497
public static final native int /*long*/ _gdk_drawable_get_screen(int /*long*/ drawable);
2498
public static final int /*long*/ gdk_drawable_get_screen(int /*long*/ drawable) {
2499
   lock.unlock();
2500
   try {
2501
     return _gdk_drawable_get_screen(drawable);
2502
   } finally {
2503
     lock.unlock();
2504
   }
2505
}
2451
public static final native void _gdk_drawable_get_size(int /*long*/ drawable, int[] width, int[] height);
2506
public static final native void _gdk_drawable_get_size(int /*long*/ drawable, int[] width, int[] height);
2452
public static final void gdk_drawable_get_size(int /*long*/ drawable, int[] width, int[] height) {
2507
public static final void gdk_drawable_get_size(int /*long*/ drawable, int[] width, int[] height) {
2453
	lock.lock();
2508
	lock.lock();
Lines 2601-2606 Link Here
2601
		lock.unlock();
2656
		lock.unlock();
2602
	}
2657
	}
2603
}
2658
}
2659
public static final native int /*long*/ _gdk_gc_get_screen(int gc);
2660
public static final int /*long*/ gdk_gc_get_screen(int gc) {
2661
  lock.lock();
2662
  try {
2663
    return _gdk_gc_get_screen(gc);
2664
  } finally {
2665
    lock.unlock();
2666
  }
2667
}
2604
public static final native void _gdk_gc_get_values(int /*long*/ gc, GdkGCValues values);
2668
public static final native void _gdk_gc_get_values(int /*long*/ gc, GdkGCValues values);
2605
public static final void gdk_gc_get_values(int /*long*/ gc, GdkGCValues values) {
2669
public static final void gdk_gc_get_values(int /*long*/ gc, GdkGCValues values) {
2606
	lock.lock();
2670
	lock.lock();
Lines 2817-2822 Link Here
2817
		lock.unlock();
2881
		lock.unlock();
2818
	}
2882
	}
2819
}
2883
}
2884
public static final native int /*long*/ _gdk_pango_context_get_for_screen(int /*long*/ screen);
2885
public static final int /*long*/ gdk_pango_context_get_for_screen(int /*long*/ screen) {
2886
  lock.lock();
2887
  try {
2888
    return _gdk_pango_context_get_for_screen(screen);
2889
  } finally {
2890
    lock.unlock();
2891
  }
2892
}
2820
public static final native void _gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap);
2893
public static final native void _gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap);
2821
public static final void gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap) {
2894
public static final void gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap) {
2822
	lock.lock();
2895
	lock.lock();
Lines 3105-3110 Link Here
3105
		lock.unlock();
3178
		lock.unlock();
3106
	}
3179
	}
3107
}
3180
}
3181
3108
public static final native void _gdk_region_subtract(int /*long*/ source1, int /*long*/ source2);
3182
public static final native void _gdk_region_subtract(int /*long*/ source1, int /*long*/ source2);
3109
public static final void gdk_region_subtract(int /*long*/ source1, int /*long*/ source2) {
3183
public static final void gdk_region_subtract(int /*long*/ source1, int /*long*/ source2) {
3110
	lock.lock();
3184
	lock.lock();
Lines 3150-3155 Link Here
3150
		lock.unlock();
3224
		lock.unlock();
3151
	}
3225
	}
3152
}
3226
}
3227
public static final native int /*long*/ _gdk_screen_get_rgb_visual(int/*long*/ screen);
3228
public static final int/*long*/ gdk_screen_get_rgb_visual(int/*long*/ screen) {
3229
	lock.lock();
3230
	try {
3231
		return _gdk_screen_get_rgb_visual(screen);
3232
	} finally {
3233
		lock.unlock();
3234
	}
3235
}
3236
public static final native int /*long*/ _gdk_screen_get_root_window(int screen);
3237
public static final int /*long*/ gdk_screen_get_root_window(int screen) {
3238
	lock.lock();
3239
	try {
3240
		return _gdk_screen_get_root_window(screen);
3241
	}
3242
	finally {
3243
		lock.unlock();
3244
	}
3245
}
3246
public static final native int /*long*/ _gdk_screen_get_system_colormap(int/*long*/ screen);
3247
public static final int /*long*/ gdk_screen_get_system_colormap(int/*long*/ screen) {
3248
	lock.lock();
3249
	try {
3250
		return _gdk_screen_get_system_colormap(screen);
3251
	} finally {
3252
		lock.unlock();
3253
	}
3254
}
3255
public static final native int _gdk_screen_get_width(int/*long*/ screen);
3256
public static final int gdk_screen_get_width(int/*long*/ screen) {
3257
	lock.lock();
3258
	try {
3259
		return _gdk_screen_get_width(screen);
3260
	} finally {
3261
		lock.unlock();
3262
	}
3263
}
3153
public static final native int _gdk_screen_get_monitor_at_window(int /*long*/ screen, int /*long*/ window);
3264
public static final native int _gdk_screen_get_monitor_at_window(int /*long*/ screen, int /*long*/ window);
3154
public static final int gdk_screen_get_monitor_at_window(int /*long*/ screen, int /*long*/ window) {
3265
public static final int gdk_screen_get_monitor_at_window(int /*long*/ screen, int /*long*/ window) {
3155
	lock.lock();
3266
	lock.lock();
Lines 8696-8701 Link Here
8696
		lock.unlock();
8807
		lock.unlock();
8697
	}
8808
	}
8698
}
8809
}
8810
public static final native int /*long*/ _gtk_widget_get_screen(int/*long*/ widget);
8811
public static final int /*long*/ gtk_widget_get_screen(int /*long*/ widget) {
8812
	lock.lock();
8813
	try {
8814
		return _gtk_widget_get_screen(widget);
8815
	} finally {
8816
		lock.unlock();
8817
	}
8818
}
8699
public static final native int /*long*/ _gtk_widget_get_style(int /*long*/ widget);
8819
public static final native int /*long*/ _gtk_widget_get_style(int /*long*/ widget);
8700
public static final int /*long*/ gtk_widget_get_style(int /*long*/ widget) {
8820
public static final int /*long*/ gtk_widget_get_style(int /*long*/ widget) {
8701
	lock.lock();
8821
	lock.lock();
Lines 9101-9106 Link Here
9101
		lock.unlock();
9221
		lock.unlock();
9102
	}
9222
	}
9103
}
9223
}
9224
public static final native int /*long*/ _gtk_window_get_screen(int /*long*/ window);
9225
public static final int /*long*/ gtk_window_get_screen(int /*long*/ window) {
9226
  lock.lock();
9227
  try {
9228
    return _gtk_window_get_screen(window);
9229
  } finally {
9230
    lock.unlock();
9231
  }
9232
}
9104
public static final native void _gtk_window_get_size(int /*long*/ handle, int[] x, int[] y);
9233
public static final native void _gtk_window_get_size(int /*long*/ handle, int[] x, int[] y);
9105
public static final void gtk_window_get_size(int /*long*/ handle, int[] x, int[] y) {
9234
public static final void gtk_window_get_size(int /*long*/ handle, int[] x, int[] y) {
9106
	lock.lock();
9235
	lock.lock();
Lines 9236-9241 Link Here
9236
		lock.unlock();
9365
		lock.unlock();
9237
	}
9366
	}
9238
}
9367
}
9368
public static final native void _gtk_window_set_screen(int window, int screen);
9369
public static final void gtk_window_set_screen(int window, int screen) {
9370
  lock.lock();
9371
  try {
9372
    _gtk_window_set_screen(window, screen);
9373
  } finally {
9374
    lock.unlock();
9375
  }
9376
}
9239
public static final native void _gtk_window_set_title(int /*long*/ window, byte[] title);
9377
public static final native void _gtk_window_set_title(int /*long*/ window, byte[] title);
9240
public static final void gtk_window_set_title(int /*long*/ window, byte[] title) {
9378
public static final void gtk_window_set_title(int /*long*/ window, byte[] title) {
9241
	lock.lock();
9379
	lock.lock();
(-).classpath_gtk (-41 lines)
Removed Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
4
    <classpathentry kind="src" path="Eclipse SWT/gtk"/>
5
    <classpathentry kind="src" path="Eclipse SWT/cairo"/>
6
    <classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
7
    <classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
8
    <classpathentry kind="src" path="Eclipse SWT/common"/>
9
    <classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
10
    <classpathentry kind="src" path="Eclipse SWT PI/gtk">
11
	    <attributes>
12
			<attribute value="org.eclipse.swt.gtk.linux.x86" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
13
		</attributes>
14
    </classpathentry>
15
    <classpathentry kind="src" path="Eclipse SWT PI/cairo"/>
16
    <classpathentry kind="src" path="Eclipse SWT PI/common"/>
17
    <classpathentry kind="src" path="Eclipse SWT PI/common_j2se"/>
18
    <classpathentry kind="src" path="Eclipse SWT Accessibility/gtk"/>
19
    <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/>
20
    <classpathentry kind="src" path="Eclipse SWT AWT/gtk"/>
21
    <classpathentry kind="src" path="Eclipse SWT AWT/common"/>
22
    <classpathentry kind="src" path="Eclipse SWT Drag and Drop/gtk"/>
23
    <classpathentry kind="src" path="Eclipse SWT Drag and Drop/common"/>
24
    <classpathentry kind="src" path="Eclipse SWT Printing/gtk"/>
25
    <classpathentry kind="src" path="Eclipse SWT Printing/common"/>
26
    <classpathentry kind="src" path="Eclipse SWT Program/gtk"/>
27
    <classpathentry kind="src" path="Eclipse SWT Program/common"/>
28
    <classpathentry kind="src" path="Eclipse SWT Program/gnome"/>
29
    <classpathentry kind="src" path="Eclipse SWT Program/cde"/>
30
	<classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/>
31
    <classpathentry kind="src" path="Eclipse SWT Browser/common"/>
32
    <classpathentry kind="src" path="Eclipse SWT Browser/mozilla"/>
33
    <classpathentry kind="src" path="Eclipse SWT Mozilla/gtk"/>
34
    <classpathentry kind="src" path="Eclipse SWT Mozilla/common"/>
35
    <classpathentry kind="src" path="Eclipse SWT OpenGL/gtk"/>
36
    <classpathentry kind="src" path="Eclipse SWT OpenGL/glx"/>
37
    <classpathentry kind="src" path="Eclipse SWT OpenGL/common"/>
38
    <classpathentry kind="src" path="Eclipse SWT Theme/gtk"/>
39
    <classpathentry kind="lib" path="extra_jars/exceptions.jar"/>
40
    <classpathentry kind="output" path="bin"/>
41
</classpath>

Return to bug 152978