Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 52324 Details for
Bug 152978
Improve support for multihead environments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
First proposal
patch.txt (text/plain), 62.07 KB, created by
Mathias Engelhardt
on 2006-10-19 12:09:11 EDT
(
hide
)
Description:
First proposal
Filename:
MIME Type:
Creator:
Mathias Engelhardt
Created:
2006-10-19 12:09:11 EDT
Size:
62.07 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java,v >retrieving revision 1.131 >diff -u -r1.131 Widget.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java 3 Oct 2006 15:28:29 -0000 1.131 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java 19 Oct 2006 16:02:23 -0000 >@@ -519,6 +519,16 @@ > return display; > } > >+public Monitor getMonitor() { >+ int topHandle = topHandle(); >+ if (topHandle != 0) { >+ int screen = OS.gtk_window_get_screen(topHandle); >+ int number = OS.gdk_screen_get_monitor_at_window(screen, OS.GTK_WIDGET_WINDOW(topHandle)); >+ return display.gtk_monitor_get_monitor(screen, number); >+ } >+ return null; >+} >+ > String getName () { > // String string = getClass ().getName (); > // int index = string.lastIndexOf ('.'); >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.323 >diff -u -r1.323 Control.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 17 Oct 2006 17:36:17 -0000 1.323 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 19 Oct 2006 16:02:22 -0000 >@@ -1808,7 +1808,7 @@ > public Monitor getMonitor () { > checkWidget(); > Monitor monitor = null; >- int /*long*/ screen = OS.gdk_screen_get_default (); >+ int /* long */screen = OS.gtk_widget_get_screen(handle); > if (screen != 0) { > int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ()); > GdkRectangle dest = new GdkRectangle (); >@@ -1819,8 +1819,9 @@ > monitor.y = dest.y; > monitor.width = dest.width; > monitor.height = dest.height; >+ monitor.screen = screen; > Rectangle workArea = null; >- if (monitorNumber == 0) workArea = display.getWorkArea (); >+ if (monitorNumber == 0) workArea = display.getWorkArea (screen); > if (workArea != null) { > monitor.clientX = workArea.x; > monitor.clientY = workArea.y; >@@ -2932,7 +2933,7 @@ > int /*long*/ topWindow = OS.GTK_WIDGET_WINDOW (topHandle); > int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (topWindow); > int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (enableWindow); >- int xScreen = OS.XDefaultScreen (xDisplay); >+ int xScreen = OS.gdk_screen_get_number(OS.gtk_widget_get_screen(handle)); > int flags = OS.CWStackMode | OS.CWSibling; > XWindowChanges changes = new XWindowChanges (); > changes.sibling = OS.gdk_x11_drawable_get_xid (topWindow); >@@ -3389,7 +3390,7 @@ > if (redrawWindow != 0 && siblingWindow == 0) changes.stack_mode = OS.Below; > int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); > int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window); >- int xScreen = OS.XDefaultScreen (xDisplay); >+ int xScreen = OS.gdk_screen_get_number(OS.gtk_widget_get_screen(handle)); > int flags = OS.CWStackMode | OS.CWSibling; > /* > * Feature in X. If the receiver is a top level, XConfigureWindow () >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java,v >retrieving revision 1.52 >diff -u -r1.52 Tracker.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java 11 Oct 2006 17:49:44 -0000 1.52 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java 19 Oct 2006 16:02:23 -0000 >@@ -43,6 +43,7 @@ > Rectangle bounds; > int cursorOrientation = SWT.NONE; > int oldX, oldY; >+ int /*long*/ screen; > > final static int STEPSIZE_SMALL = 1; > final static int STEPSIZE_LARGE = 9; >@@ -188,7 +189,7 @@ > int newY = bounds.y; > > Point point = display.map (parent, null, newX, newY); >- display.setCursorLocation (point); >+ display.setCursorLocation(getMonitor().screen, point); > > /* > * The call to XWarpPointer does not always place the pointer on the >@@ -221,7 +222,7 @@ > } > > Point point = display.map (parent, null, newX, newY); >- display.setCursorLocation (point); >+ display.setCursorLocation(getMonitor().screen, point); > > /* > * The call to XWarpPointer does not always place the pointer on the >@@ -299,7 +300,15 @@ > } > > void drawRectangles (Rectangle [] rects) { >- int /*long*/ window = OS.GDK_ROOT_PARENT (); >+ if (screen == 0) { >+ int[] _screen = new int[1]; >+ int[] _x = new int[1]; >+ int[] _y = new int[1]; >+ int[] _mask = new int[1]; >+ OS.gdk_display_get_pointer(OS.gdk_display_get_default(), _screen, _x, _y, _mask); >+ screen = _screen[0]; >+ } >+ int /* long */window = OS.gdk_screen_get_root_window(screen); > if (parent != null) { > window = OS.GTK_WIDGET_WINDOW (parent.paintHandle()); > } >@@ -646,17 +655,22 @@ > */ > public boolean open () { > checkWidget(); >- window = OS.GDK_ROOT_PARENT (); >+ int[] oldX = new int[1], oldY = new int[1], state = new int[1]; >+ int[] screen = new int[1]; >+ OS.gdk_display_get_pointer(OS.gdk_display_get_default(), screen, oldX, oldY, state); >+ this.screen = screen[0]; >+ if (rectangles == null) >+ return false; >+ window = OS.gdk_screen_get_root_window(this.screen); > if (parent != null) { > window = OS.GTK_WIDGET_WINDOW (parent.paintHandle()); > } >+ > if (window == 0) return false; > cancelled = false; > tracking = true; > update (); > drawRectangles (rectangles); >- int [] oldX = new int [1], oldY = new int [1], state = new int [1]; >- OS.gdk_window_get_pointer (window, oldX, oldY, state); > > /* > * if exactly one of UP/DOWN is specified as a style then set the cursor >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java,v >retrieving revision 1.77 >diff -u -r1.77 Menu.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java 12 Jul 2006 18:41:42 -0000 1.77 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java 19 Oct 2006 16:02:23 -0000 >@@ -683,7 +683,7 @@ > if (reqy + requisition.height > screenHeight && reqy - requisition.height >= 0) { > reqy -= requisition.height; > } >- int screenWidth = OS.gdk_screen_width (); >+ int screenWidth = OS.gdk_screen_get_width (getMonitor().screen); > int reqx = this.x; > if ((style & SWT.RIGHT_TO_LEFT) != 0) { > if (reqx - requisition.width >= 0) reqx -= requisition.width; >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java,v >retrieving revision 1.33 >diff -u -r1.33 Caret.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java 9 Aug 2005 22:09:16 -0000 1.33 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java 19 Oct 2006 16:02:22 -0000 >@@ -96,7 +96,8 @@ > color.red = (short) 0xffff; > color.green = (short) 0xffff; > color.blue = (short) 0xffff; >- int /*long*/ colormap = OS.gdk_colormap_get_system (); >+ int /*long*/ screen = getMonitor().screen; >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_colormap_alloc_color (colormap, color, true, true); > OS.gdk_gc_set_foreground (gc, color); > OS.gdk_gc_set_function (gc, OS.GDK_XOR); >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java,v >retrieving revision 1.223 >diff -u -r1.223 Shell.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java 31 Aug 2006 22:38:32 -0000 1.223 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java 19 Oct 2006 16:02:23 -0000 >@@ -1681,4 +1681,24 @@ > } > } > } >+ >+public void setMonitor(Monitor monitor) { >+ int width, height; >+ width = OS.GTK_WIDGET_WIDTH(shellHandle); >+ height = OS.GTK_WIDGET_HEIGHT(shellHandle); >+ >+ int toScreen; >+ if (monitor == null || monitor.screen == 0) { >+ toScreen = OS.gdk_screen_get_default(); >+ } else { >+ toScreen = monitor.screen; >+ } >+ >+ OS.gtk_window_set_screen(OS.gtk_widget_get_toplevel(shellHandle), toScreen); >+ OS.gtk_window_move(handle, monitor.clientX, monitor.clientY); >+ OS.gtk_window_resize(shellHandle, width, height); >+ >+ layout(); >+ } >+ > } >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java,v >retrieving revision 1.261 >diff -u -r1.261 Display.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java 3 Oct 2006 15:28:29 -0000 1.261 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java 19 Oct 2006 16:02:23 -0000 >@@ -11,10 +11,40 @@ > package org.eclipse.swt.widgets; > > >-import org.eclipse.swt.*; >-import org.eclipse.swt.internal.*; >-import org.eclipse.swt.internal.gtk.*; >-import org.eclipse.swt.graphics.*; >+import java.util.Vector; >+ >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.SWTError; >+import org.eclipse.swt.SWTException; >+import org.eclipse.swt.graphics.Color; >+import org.eclipse.swt.graphics.Cursor; >+import org.eclipse.swt.graphics.Device; >+import org.eclipse.swt.graphics.DeviceData; >+import org.eclipse.swt.graphics.Font; >+import org.eclipse.swt.graphics.GCData; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.swt.graphics.ImageData; >+import org.eclipse.swt.graphics.PaletteData; >+import org.eclipse.swt.graphics.Point; >+import org.eclipse.swt.graphics.Rectangle; >+import org.eclipse.swt.graphics.Resource; >+import org.eclipse.swt.internal.Callback; >+import org.eclipse.swt.internal.Compatibility; >+import org.eclipse.swt.internal.Converter; >+import org.eclipse.swt.internal.Lock; >+import org.eclipse.swt.internal.gtk.GTypeInfo; >+import org.eclipse.swt.internal.gtk.GdkColor; >+import org.eclipse.swt.internal.gtk.GdkRectangle; >+import org.eclipse.swt.internal.gtk.GdkVisual; >+import org.eclipse.swt.internal.gtk.GtkCellRendererClass; >+import org.eclipse.swt.internal.gtk.GtkRequisition; >+import org.eclipse.swt.internal.gtk.GtkWidgetClass; >+import org.eclipse.swt.internal.gtk.LONG; >+import org.eclipse.swt.internal.gtk.OS; >+import org.eclipse.swt.internal.gtk.XButtonEvent; >+import org.eclipse.swt.internal.gtk.XEvent; >+import org.eclipse.swt.internal.gtk.XExposeEvent; >+import org.eclipse.swt.internal.gtk.XVisibilityEvent; > > /** > * Instances of this class are responsible for managing the >@@ -931,7 +961,8 @@ > static int /*long*/ createPixbuf(Image image) { > int [] w = new int [1], h = new int [1]; > OS.gdk_drawable_get_size (image.pixmap, w, h); >- int /*long*/ colormap = OS.gdk_colormap_get_system (); >+ int /*long*/ screen = OS.gdk_drawable_get_screen(image.pixmap); >+ int /* long */colormap = OS.gdk_screen_get_system_colormap(screen); > int /*long*/ pixbuf; > boolean hasMask = image.mask != 0 && OS.gdk_drawable_get_depth (image.mask) == 1; > if (hasMask) { >@@ -1426,7 +1457,7 @@ > public Point getCursorLocation () { > checkDevice (); > int [] x = new int [1], y = new int [1]; >- OS.gdk_window_get_pointer (0, x, y, null); >+ OS.gdk_display_get_pointer(OS.gdk_display_get_default(), null, x, y, null); > return new Point (x [0], y [0]); > } > >@@ -1719,7 +1750,7 @@ > * and position of the screen not covered by dock and panel > * windows. See http://freedesktop.org/Standards/wm-spec. > */ >-Rectangle getWorkArea() { >+Rectangle getWorkArea(int /*long*/ screen) { > byte[] name = Converter.wcsToMbcs (null, "_NET_WORKAREA", true); > int /*long*/ atom = OS.gdk_atom_intern (name, true); > if (atom == OS.GDK_NONE) return null; >@@ -1727,8 +1758,8 @@ > int[] actualFormat = new int[1]; > int[] actualLength = new int[1]; > int /*long*/[] data = new int /*long*/[1]; >- if (!OS.gdk_property_get (OS.GDK_ROOT_PARENT (), atom, OS.GDK_NONE, 0, 16, 0, actualType, actualFormat, actualLength, data)) { >- return null; >+ if (!OS.gdk_property_get(OS.gdk_screen_get_root_window(screen), atom, OS.GDK_NONE, 0, 16, 0, actualType, actualFormat, actualLength, data)) { >+ return null; > } > Rectangle result = null; > if (data [0] != 0) { >@@ -1754,60 +1785,78 @@ > * @since 3.0 > */ > public Monitor [] getMonitors () { >- checkDevice (); >- Monitor [] monitors = null; >- Rectangle workArea = getWorkArea(); >- int /*long*/ screen = OS.gdk_screen_get_default (); >- if (screen != 0) { >- int monitorCount = OS.gdk_screen_get_n_monitors (screen); >- if (monitorCount > 0) { >- monitors = new Monitor [monitorCount]; >- GdkRectangle dest = new GdkRectangle (); >- for (int i = 0; i < monitorCount; i++) { >- OS.gdk_screen_get_monitor_geometry (screen, i, dest); >- Monitor monitor = new Monitor (); >- monitor.handle = i; >- monitor.x = dest.x; >- monitor.y = dest.y; >- monitor.width = dest.width; >- monitor.height = dest.height; >- if (i == 0 && workArea != null) { >- monitor.clientX = workArea.x; >- monitor.clientY = workArea.y; >- monitor.clientWidth = workArea.width; >- monitor.clientHeight = workArea.height; >- } else { >- monitor.clientX = monitor.x; >- monitor.clientY = monitor.y; >- monitor.clientWidth = monitor.width; >- monitor.clientHeight = monitor.height; >- } >- monitors [i] = monitor; >- } >- } >- } >- if (monitors == null) { >- /* No multimonitor support detected, default to one monitor */ >- Monitor monitor = new Monitor (); >- Rectangle bounds = getBounds (); >- monitor.x = bounds.x; >- monitor.y = bounds.y; >- monitor.width = bounds.width; >- monitor.height = bounds.height; >- if (workArea != null) { >- monitor.clientX = workArea.x; >- monitor.clientY = workArea.y; >- monitor.clientWidth = workArea.width; >- monitor.clientHeight = workArea.height; >- } else { >- monitor.clientX = monitor.x; >- monitor.clientY = monitor.y; >- monitor.clientWidth = monitor.width; >- monitor.clientHeight = monitor.height; >- } >- monitors = new Monitor [] { monitor }; >- } >- return monitors; >+ checkDevice(); >+ Monitor[] monitors = null; >+ >+ int display = OS.gdk_display_get_default(); >+ int numScreens = OS.gdk_display_get_n_screens(display); >+ if (numScreens > 0) { >+ java.util.List monitorList = new Vector(); >+ for (int n = 0; n < numScreens; n++) { >+ int screen = OS.gdk_display_get_screen(display, n); >+ if (screen != 0) { >+ int monitorCount = OS.gdk_screen_get_n_monitors(screen); >+ if (monitorCount > 0) { >+ for (int i = 0; i < monitorCount; i++) { >+ monitorList.add(gtk_monitor_get_monitor(screen, i)); >+ } >+ } >+ } >+ } >+ monitors = new Monitor[monitorList.size()]; >+ for (int i = 0; i < monitorList.size(); i++) { >+ monitors[i] = (Monitor) monitorList.get(i); >+ } >+ } >+ if (monitors == null) { >+ Rectangle workArea = getWorkArea(OS.gdk_screen_get_default()); >+ /* No multimonitor support detected, default to one monitor */ >+ Monitor monitor = new Monitor(); >+ Rectangle bounds = getBounds(); >+ monitor.x = bounds.x; >+ monitor.y = bounds.y; >+ monitor.width = bounds.width; >+ monitor.height = bounds.height; >+ monitor.screen = OS.gdk_screen_get_default(); >+ if (workArea != null) { >+ monitor.clientX = workArea.x; >+ monitor.clientY = workArea.y; >+ monitor.clientWidth = workArea.width; >+ monitor.clientHeight = workArea.height; >+ } else { >+ monitor.clientX = monitor.x; >+ monitor.clientY = monitor.y; >+ monitor.clientWidth = monitor.width; >+ monitor.clientHeight = monitor.height; >+ } >+ monitors = new Monitor[] { monitor }; >+ } >+ return monitors; >+} >+ >+Monitor gtk_monitor_get_monitor(int screen, int monitorNumber) { >+ GdkRectangle dest = new GdkRectangle(); >+ OS.gdk_screen_get_monitor_geometry(screen, monitorNumber, dest); >+ Rectangle workArea = getWorkArea(screen); >+ Monitor result = new Monitor(); >+ result.handle = monitorNumber; >+ result.x = dest.x; >+ result.y = dest.y; >+ result.width = dest.width; >+ result.height = dest.height; >+ result.screen = screen; >+ if (monitorNumber == 0 && workArea != null) { >+ result.clientX = workArea.x; >+ result.clientY = workArea.y; >+ result.clientWidth = workArea.width; >+ result.clientHeight = workArea.height; >+ } else { >+ result.clientX = result.x; >+ result.clientY = result.y; >+ result.clientWidth = result.width; >+ result.clientHeight = result.height; >+ } >+ return result; > } > > /** >@@ -3280,12 +3329,12 @@ > * @since 2.1 > */ > public void setCursorLocation (int x, int y) { >- checkDevice (); >- if (OS.GDK_WINDOWING_X11 ()) { >- int /*long*/ xDisplay = OS.GDK_DISPLAY (); >- int /*long*/ xWindow = OS.XDefaultRootWindow (xDisplay); >- OS.XWarpPointer (xDisplay, OS.None, xWindow, 0, 0, 0, 0, x, y); >- } >+ setCursorLocation(OS.gdk_screen_get_default(), x, y); >+} >+ >+public void setCursorLocation(int screen, int x, int y) { >+ checkDevice(); >+ OS.gdk_display_warp_pointer(OS.gdk_display_get_default(), screen, x, y); > } > > /** >@@ -3303,10 +3352,15 @@ > * > * @since 2.0 > */ >-public void setCursorLocation (Point point) { >- checkDevice (); >- if (point == null) error (SWT.ERROR_NULL_ARGUMENT); >- setCursorLocation (point.x, point.y); >+public void setCursorLocation(Point point) { >+ checkDevice(); >+ if (point == null) >+ error(SWT.ERROR_NULL_ARGUMENT); >+ setCursorLocation(point.x, point.y); >+} >+ >+public void setCursorLocation(int/* long */screen, Point point) { >+ setCursorLocation(screen, point.x, point.y); > } > > /** >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java,v >retrieving revision 1.51 >diff -u -r1.51 Sash.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java 9 May 2006 19:46:49 -0000 1.51 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java 19 Oct 2006 16:02:23 -0000 >@@ -144,7 +144,8 @@ > byte [] bits = {-86, 85, -86, 85, -86, 85, -86, 85}; > int /*long*/ stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8); > int /*long*/ gc = OS.gdk_gc_new (window); >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ screen = getMonitor().screen; >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > GdkColor color = new GdkColor (); > OS.gdk_color_white (colormap, color); > OS.gdk_gc_set_foreground (gc, color); >Index: Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java,v >retrieving revision 1.54 >diff -u -r1.54 ImageData.java >--- Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java 9 May 2006 19:47:05 -0000 1.54 >+++ Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java 19 Oct 2006 16:02:21 -0000 >@@ -11,9 +11,12 @@ > package org.eclipse.swt.graphics; > > >-import java.io.*; >-import org.eclipse.swt.*; >+import java.io.InputStream; >+ >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.SWTException; > import org.eclipse.swt.internal.CloneableCompatibility; >+import org.eclipse.swt.internal.gtk.OS; > > /** > * Instances of this class are device-independent descriptions >@@ -3572,6 +3575,7 @@ > ImageData band = createGradientBand(width, height, vertical, > fromRGB, toRGB, redBits, greenBits, blueBits); > Image image = new Image(device, band); >+ image.gtk_set_screen(OS.gdk_gc_get_screen(gc.handle)); > if ((band.width == 1) || (band.height == 1)) { > gc.drawImage(image, 0, 0, band.width, band.height, x, y, width, height); > } else { >Index: Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java,v >retrieving revision 1.7 >diff -u -r1.7 GLCanvas.java >--- Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java 17 Nov 2005 05:23:33 -0000 1.7 >+++ Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java 19 Oct 2006 16:02:12 -0000 >@@ -106,9 +106,10 @@ > } > glxAttrib [pos++] = 0; > OS.gtk_widget_realize (handle); >+ int /*long*/ screen = OS.gtk_widget_get_screen(handle); > int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle); > int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); >- int /*long*/ infoPtr = GLX.glXChooseVisual (xDisplay, OS.XDefaultScreen (xDisplay), glxAttrib); >+ int /*long*/ infoPtr = GLX.glXChooseVisual (xDisplay, OS.gdk_screen_get_number(screen), glxAttrib); > if (infoPtr == 0) { > dispose (); > SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH); >@@ -116,7 +117,6 @@ > vinfo = new XVisualInfo (); > GLX.memmove (vinfo, infoPtr, XVisualInfo.sizeof); > OS.XFree (infoPtr); >- int /*long*/ screen = OS.gdk_screen_get_default (); > int /*long*/ gdkvisual = OS.gdk_x11_screen_lookup_visual (screen, vinfo.visualid); > //FIXME- share lists > //context = GLX.glXCreateContext (xDisplay, info, share == null ? 0 : share.context, true); >Index: Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java,v >retrieving revision 1.58 >diff -u -r1.58 Image.java >--- Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java 9 May 2006 19:47:08 -0000 1.58 >+++ Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java 19 Oct 2006 16:02:22 -0000 >@@ -257,7 +257,8 @@ > } > > /* Create the new pixmap */ >- int /*long*/ pixmap = OS.gdk_pixmap_new (OS.GDK_ROOT_PARENT(), width, height, -1); >+ int/*long*/ screen = OS.gdk_drawable_get_screen(srcImage.pixmap); >+ int /*long*/ pixmap = OS.gdk_pixmap_new (OS.gdk_screen_get_root_window(screen), width, height, -1); > if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES); > int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); > if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); >@@ -273,7 +274,7 @@ > /* Retrieve the source pixmap data */ > int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); > if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, 0, 0, 0, 0, width, height); > int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); > int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); >@@ -406,7 +407,7 @@ > public Image(Device device, ImageData data) { > if (device == null) device = Device.getDevice(); > if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); >- init(device, data); >+ init(device, data, 0); > if (device.tracking) device.new_Object(this); > } > >@@ -447,7 +448,7 @@ > ImageData image = new ImageData(source.width, source.height, source.depth, source.palette, source.scanlinePad, source.data); > image.maskPad = mask.scanlinePad; > image.maskData = mask.data; >- init(device, image); >+ init(device, image, 0); > if (device.tracking) device.new_Object(this); > } > >@@ -502,7 +503,7 @@ > public Image(Device device, InputStream stream) { > if (device == null) device = Device.getDevice(); > if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); >- init(device, new ImageData(stream)); >+ init(device, new ImageData(stream), 0); > if (device.tracking) device.new_Object(this); > } > >@@ -590,7 +591,7 @@ > return; > } > } catch (SWTException e) {} >- init(device, new ImageData(filename)); >+ init(device, new ImageData(filename), 0); > if (device.tracking) device.new_Object(this); > } > >@@ -599,11 +600,14 @@ > */ > void createMask() { > if (mask != 0) return; >- mask = createMask(getImageData(), false); >+ mask = createMask(getImageData(), false, 0); > if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES); > } > >-int /*long*/ createMask(ImageData image, boolean copy) { >+int /*long*/ createMask(ImageData image, boolean copy, int/*long*/ screen) { >+ if (screen == 0) { >+ screen = OS.gdk_screen_get_default(); >+ } > ImageData mask = image.getTransparencyMask(); > byte[] data = mask.data; > byte[] maskData = copy ? new byte[data.length] : data; >@@ -614,7 +618,7 @@ > ((s & 0x04) << 3) | ((s & 0x02) << 5) | ((s & 0x01) << 7)); > } > maskData = ImageData.convertPad(maskData, mask.width, mask.height, mask.depth, mask.scanlinePad, 1); >- return OS.gdk_bitmap_create_from_data(0, maskData, mask.width, mask.height); >+ return OS.gdk_bitmap_create_from_data(OS.gdk_screen_get_root_window(screen), maskData, mask.width, mask.height); > } > > void createSurface() { >@@ -627,7 +631,8 @@ > if (mask != 0 || alpha != -1 || alphaData != null) { > int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); > if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ screen = OS.gdk_drawable_get_screen(pixmap); >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height); > int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); > int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); >@@ -839,7 +844,8 @@ > int width = w[0], height = h[0]; > int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); > if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ screen = OS.gdk_drawable_get_screen(pixmap); >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height); > int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); > int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); >@@ -945,7 +951,8 @@ > white.red = (short)0xFFFF; > white.green = (short)0xFFFF; > white.blue = (short)0xFFFF; >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ screen = OS.gdk_drawable_get_screen(pixmap); >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_colormap_alloc_color(colormap, white, true, true); > int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); > OS.gdk_gc_set_foreground(gdkGC, white); >@@ -954,9 +961,12 @@ > OS.gdk_colormap_free_colors(colormap, white, 1); > } > >-void init(Device device, ImageData image) { >+void init(Device device, ImageData image, int/*long*/ screen) { > if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); > this.device = device; >+ if (screen == 0) { >+ screen = OS.gdk_screen_get_default(); >+ } > int width = image.width; > int height = image.height; > PaletteData palette = image.palette; >@@ -997,7 +1007,7 @@ > } > } > OS.memmove(data, buffer, stride * height); >- int /*long*/ pixmap = OS.gdk_pixmap_new (OS.GDK_ROOT_PARENT(), width, height, -1); >+ int /*long*/ pixmap = OS.gdk_pixmap_new (OS.gdk_screen_get_root_window(screen), width, height, -1); > if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES); > int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); > if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); >@@ -1020,7 +1030,7 @@ > transparentPixel = rgb.red << 16 | rgb.green << 8 | rgb.blue; > } > } >- int /*long*/ mask = createMask(image, isIcon); >+ int /*long*/ mask = createMask(image, isIcon, screen); > if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES); > this.mask = mask; > if (isIcon) { >@@ -1037,7 +1047,7 @@ > System.arraycopy(image.alphaData, 0, this.alphaData, 0, alphaData.length); > } > if (device.useXRender && (alpha != -1 || alphaData != null)) { >- mask = OS.gdk_pixmap_new(0, alpha != -1 ? 1 : width, alpha != -1 ? 1 : height, 8); >+ mask = OS.gdk_pixmap_new(OS.gdk_screen_get_root_window(screen), alpha != -1 ? 1 : width, alpha != -1 ? 1 : height, 8); > if (mask == 0) SWT.error(SWT.ERROR_NO_HANDLES); > int /*long*/ gc = OS.gdk_gc_new(mask); > if (alpha != -1) { >@@ -1185,4 +1195,8 @@ > return "Image {" + pixmap + "}"; > } > >+public void gtk_set_screen(int screen) { >+ init(device, getImageData(), screen); >+} >+ > } >Index: Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java,v >retrieving revision 1.138 >diff -u -r1.138 GC.java >--- Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java 12 Oct 2006 16:25:36 -0000 1.138 >+++ Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java 19 Oct 2006 16:02:22 -0000 >@@ -661,6 +661,9 @@ > if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); > if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); > if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); >+ if (OS.gdk_drawable_get_screen(image.pixmap) != OS.gdk_gc_get_screen(handle)) { >+ image.gtk_set_screen(OS.gdk_gc_get_screen(handle)); >+ } > drawImage(image, 0, 0, -1, -1, x, y, -1, -1, true); > } > >@@ -704,6 +707,9 @@ > } > if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); > if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); >+ if (OS.gdk_drawable_get_screen(image.pixmap) != OS.gdk_gc_get_screen(handle)) { >+ image.gtk_set_screen(OS.gdk_gc_get_screen(handle)); >+ } > drawImage(image, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, false); > } > >@@ -792,7 +798,8 @@ > } > int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight); > if (pixbuf == 0) return; >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ screen = OS.gdk_gc_get_screen(handle); >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight); > int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); > int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); >@@ -830,6 +837,7 @@ > /* Generate the mask if necessary. */ > if (srcImage.transparentPixel != -1) srcImage.createMask(); > int /*long*/ maskPixmap = srcImage.mask; >+ int /*long*/ screen = OS.gdk_gc_get_screen(handle); > > if (device.useXRender) { > drawImageXRender(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight, maskPixmap, OS.PictStandardA1); >@@ -837,7 +845,7 @@ > if (srcWidth != destWidth || srcHeight != destHeight) { > int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight); > if (pixbuf != 0) { >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_pixbuf_get_from_drawable(pixbuf, colorPixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight); > int /*long*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight); > if (maskPixbuf != 0) { >@@ -885,7 +893,7 @@ > int newHeight = srcY + srcHeight; > int bytesPerLine = (newWidth + 7) / 8; > byte[] maskData = new byte[bytesPerLine * newHeight]; >- int /*long*/ mask = OS.gdk_bitmap_create_from_data(0, maskData, newWidth, newHeight); >+ int /*long*/ mask = OS.gdk_bitmap_create_from_data(OS.gdk_screen_get_root_window(screen), maskData, newWidth, newHeight); > if (mask != 0) { > int /*long*/ gc = OS.gdk_gc_new(mask); > OS.gdk_region_offset(data.clipRgn, -destX + srcX, -destY + srcY); >@@ -922,6 +930,7 @@ > 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) { > int translateX = 0, translateY = 0; > int /*long*/ drawable = data.drawable; >+ int /*long*/ screen = OS.gdk_drawable_get_screen(drawable); > if (data.image == null) { > int[] x = new int[1], y = new int[1]; > int /*long*/ [] real_drawable = new int /*long*/ [1]; >@@ -943,7 +952,7 @@ > maskPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(maskPixmap), OS.XRenderFindStandardFormat(xDisplay, maskType), attribCount, attrib); > if (maskPict == 0) SWT.error(SWT.ERROR_NO_HANDLES); > } >- int /*long*/ format = OS.XRenderFindVisualFormat(xDisplay, OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system())); >+ int /*long*/ format = OS.XRenderFindVisualFormat(xDisplay, OS.gdk_x11_visual_get_xvisual(OS.gdk_screen_get_rgb_visual(screen))); > int /*long*/ destPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(drawable), format, 0, null); > if (destPict == 0) SWT.error(SWT.ERROR_NO_HANDLES); > int /*long*/ srcPict = OS.XRenderCreatePicture(xDisplay, OS.gdk_x11_drawable_get_xid(srcImage.pixmap), format, 0, null); >@@ -992,7 +1001,8 @@ > int /*long*/ scale(int /*long*/ src, int srcX, int srcY, int srcWidth, int srcHeight, int destWidth, int destHeight) { > int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight); > if (pixbuf == 0) return 0; >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /*long*/ screen = OS.gdk_gc_get_screen(handle); >+ int /*long*/ colormap = OS.gdk_screen_get_system_colormap(screen); > OS.gdk_pixbuf_get_from_drawable(pixbuf, src, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight); > int /*long*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR); > OS.g_object_unref(pixbuf); >@@ -1529,7 +1539,7 @@ > OS.pango_layout_get_size(layout, w, h); > int width = OS.PANGO_PIXELS(w[0]); > int height = OS.PANGO_PIXELS(h[0]); >- int /*long*/ pixmap = OS.gdk_pixmap_new(OS.GDK_ROOT_PARENT(), width, height, -1); >+ int /*long*/ pixmap = OS.gdk_pixmap_new(OS.gdk_screen_get_root_window(OS.gdk_gc_get_screen(handle)), width, height, -1); > if (pixmap == 0) SWT.error(SWT.ERROR_NO_HANDLES); > int /*long*/ gdkGC = OS.gdk_gc_new(pixmap); > if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); >Index: Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java,v >retrieving revision 1.23 >diff -u -r1.23 Color.java >--- Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java 23 Jun 2005 14:51:56 -0000 1.23 >+++ Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java 19 Oct 2006 16:02:21 -0000 >@@ -71,7 +71,7 @@ > public Color(Device device, int red, int green, int blue) { > if (device == null) device = Device.getDevice(); > if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); >- init(device, red, green, blue); >+ init(device, 0, red, green, blue); > if (device.tracking) device.new_Object(this); > } > >@@ -101,7 +101,7 @@ > if (device == null) device = Device.getDevice(); > if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); > if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); >- init(device, rgb.red, rgb.green, rgb.blue); >+ init(device, 0, rgb.red, rgb.green, rgb.blue); > if (device.tracking) device.new_Object(this); > } > >@@ -241,8 +241,10 @@ > return color; > } > >-void init(Device device, int red, int green, int blue) { >+void init(Device device, int/*long*/ screen, int red, int green, int blue) { > this.device = device; >+ if (screen == 0) >+ screen = OS.gdk_screen_get_default(); > if ((red > 255) || (red < 0) || > (green > 255) || (green < 0) || > (blue > 255) || (blue < 0)) { >@@ -252,7 +254,7 @@ > gdkColor.red = (short)((red & 0xFF) | ((red & 0xFF) << 8)); > gdkColor.green = (short)((green & 0xFF) | ((green & 0xFF) << 8)); > gdkColor.blue = (short)((blue & 0xFF) | ((blue & 0xFF) << 8)); >- int /*long*/ colormap = OS.gdk_colormap_get_system(); >+ int /* long */colormap = OS.gdk_screen_get_system_colormap(screen); > if (!OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) { > /* Allocate black. */ > gdkColor = new GdkColor(); >Index: Eclipse SWT PI/gtk/library/os_stats.h >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h,v >retrieving revision 1.126 >diff -u -r1.126 os_stats.h >--- Eclipse SWT PI/gtk/library/os_stats.h 3 Oct 2006 15:28:29 -0000 1.126 >+++ Eclipse SWT PI/gtk/library/os_stats.h 19 Oct 2006 16:02:15 -0000 >@@ -155,7 +155,6 @@ > _1XCheckMaskEvent_FUNC, > _1XCheckWindowEvent_FUNC, > _1XDefaultRootWindow_FUNC, >- _1XDefaultScreen_FUNC, > _1XFlush_FUNC, > _1XFree_FUNC, > _1XGetSelectionOwner_FUNC, >@@ -283,11 +282,17 @@ > _1gdk_1color_1white_FUNC, > _1gdk_1colormap_1alloc_1color_FUNC, > _1gdk_1colormap_1free_1colors_FUNC, >+ _1gdk_1colormap_1get_1screen_FUNC, > _1gdk_1colormap_1get_1system_FUNC, > _1gdk_1colormap_1query_1color_FUNC, > _1gdk_1cursor_1destroy_FUNC, > _1gdk_1cursor_1new_FUNC, > _1gdk_1cursor_1new_1from_1pixmap_FUNC, >+ _1gdk_1display_1get_1default_FUNC, >+ _1gdk_1display_1get_1n_1screens_FUNC, >+ _1gdk_1display_1get_1pointer_FUNC, >+ _1gdk_1display_1get_1screen_FUNC, >+ _1gdk_1display_1warp_1pointer_FUNC, > _1gdk_1drag_1status_FUNC, > _1gdk_1draw_1arc_FUNC, > _1gdk_1draw_1drawable_FUNC, >@@ -302,6 +307,7 @@ > _1gdk_1draw_1rectangle_FUNC, > _1gdk_1drawable_1get_1depth_FUNC, > _1gdk_1drawable_1get_1image_FUNC, >+ _1gdk_1drawable_1get_1screen_FUNC, > _1gdk_1drawable_1get_1size_FUNC, > _1gdk_1drawable_1get_1visible_1region_FUNC, > _1gdk_1error_1trap_1pop_FUNC, >@@ -319,6 +325,7 @@ > _1gdk_1event_1put_FUNC, > _1gdk_1flush_FUNC, > _1gdk_1free_1text_1list_FUNC, >+ _1gdk_1gc_1get_1screen_FUNC, > _1gdk_1gc_1get_1values_FUNC, > _1gdk_1gc_1new_FUNC, > _1gdk_1gc_1set_1background_FUNC, >@@ -343,6 +350,7 @@ > _1gdk_1keyval_1to_1lower_FUNC, > _1gdk_1keyval_1to_1unicode_FUNC, > _1gdk_1pango_1context_1get_FUNC, >+ _1gdk_1pango_1context_1get_1for_1screen_FUNC, > _1gdk_1pango_1context_1set_1colormap_FUNC, > _1gdk_1pango_1layout_1get_1clip_1region_FUNC, > _1gdk_1pixbuf_1copy_1area_FUNC, >@@ -385,6 +393,10 @@ > _1gdk_1screen_1get_1monitor_1geometry_FUNC, > _1gdk_1screen_1get_1n_1monitors_FUNC, > _1gdk_1screen_1get_1number_FUNC, >+ _1gdk_1screen_1get_1rgb_1visual_FUNC, >+ _1gdk_1screen_1get_1root_1window_FUNC, >+ _1gdk_1screen_1get_1system_1colormap_FUNC, >+ _1gdk_1screen_1get_1width_FUNC, > _1gdk_1screen_1height_FUNC, > _1gdk_1screen_1width_FUNC, > _1gdk_1screen_1width_1mm_FUNC, >@@ -1007,6 +1019,7 @@ > _1gtk_1widget_1get_1modifier_1style_FUNC, > _1gtk_1widget_1get_1pango_1context_FUNC, > _1gtk_1widget_1get_1parent_FUNC, >+ _1gtk_1widget_1get_1screen_FUNC, > _1gtk_1widget_1get_1size_1request_FUNC, > _1gtk_1widget_1get_1style_FUNC, > _1gtk_1widget_1get_1toplevel_FUNC, >@@ -1053,6 +1066,7 @@ > _1gtk_1window_1get_1mnemonic_1modifier_FUNC, > _1gtk_1window_1get_1modal_FUNC, > _1gtk_1window_1get_1position_FUNC, >+ _1gtk_1window_1get_1screen_FUNC, > _1gtk_1window_1get_1size_FUNC, > _1gtk_1window_1iconify_FUNC, > _1gtk_1window_1maximize_FUNC, >@@ -1067,6 +1081,7 @@ > _1gtk_1window_1set_1icon_1list_FUNC, > _1gtk_1window_1set_1modal_FUNC, > _1gtk_1window_1set_1resizable_FUNC, >+ _1gtk_1window_1set_1screen_FUNC, > _1gtk_1window_1set_1title_FUNC, > _1gtk_1window_1set_1transient_1for_FUNC, > _1gtk_1window_1set_1type_1hint_FUNC, >Index: Eclipse SWT PI/gtk/library/os_stats.c >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c,v >retrieving revision 1.127 >diff -u -r1.127 os_stats.c >--- Eclipse SWT PI/gtk/library/os_stats.c 3 Oct 2006 15:28:29 -0000 1.127 >+++ Eclipse SWT PI/gtk/library/os_stats.c 19 Oct 2006 16:02:14 -0000 >@@ -18,8 +18,8 @@ > > #ifdef NATIVE_STATS > >-int OS_nativeFunctionCount = 1207; >-int OS_nativeFunctionCallCount[1207]; >+int OS_nativeFunctionCount = 1222; >+int OS_nativeFunctionCallCount[1222]; > char * OS_nativeFunctionNames[] = { > "Call", > "GDK_1EVENT_1TYPE", >@@ -151,7 +151,6 @@ > "_1XCheckMaskEvent", > "_1XCheckWindowEvent", > "_1XDefaultRootWindow", >- "_1XDefaultScreen", > "_1XFlush", > "_1XFree", > "_1XGetSelectionOwner", >@@ -279,11 +278,17 @@ > "_1gdk_1color_1white", > "_1gdk_1colormap_1alloc_1color", > "_1gdk_1colormap_1free_1colors", >+ "_1gdk_1colormap_1get_1screen", > "_1gdk_1colormap_1get_1system", > "_1gdk_1colormap_1query_1color", > "_1gdk_1cursor_1destroy", > "_1gdk_1cursor_1new", > "_1gdk_1cursor_1new_1from_1pixmap", >+ "_1gdk_1display_1get_1default", >+ "_1gdk_1display_1get_1n_1screens", >+ "_1gdk_1display_1get_1pointer", >+ "_1gdk_1display_1get_1screen", >+ "_1gdk_1display_1warp_1pointer", > "_1gdk_1drag_1status", > "_1gdk_1draw_1arc", > "_1gdk_1draw_1drawable", >@@ -298,6 +303,7 @@ > "_1gdk_1draw_1rectangle", > "_1gdk_1drawable_1get_1depth", > "_1gdk_1drawable_1get_1image", >+ "_1gdk_1drawable_1get_1screen", > "_1gdk_1drawable_1get_1size", > "_1gdk_1drawable_1get_1visible_1region", > "_1gdk_1error_1trap_1pop", >@@ -315,6 +321,7 @@ > "_1gdk_1event_1put", > "_1gdk_1flush", > "_1gdk_1free_1text_1list", >+ "_1gdk_1gc_1get_1screen", > "_1gdk_1gc_1get_1values", > "_1gdk_1gc_1new", > "_1gdk_1gc_1set_1background", >@@ -339,6 +346,7 @@ > "_1gdk_1keyval_1to_1lower", > "_1gdk_1keyval_1to_1unicode", > "_1gdk_1pango_1context_1get", >+ "_1gdk_1pango_1context_1get_1for_1screen", > "_1gdk_1pango_1context_1set_1colormap", > "_1gdk_1pango_1layout_1get_1clip_1region", > "_1gdk_1pixbuf_1copy_1area", >@@ -381,6 +389,10 @@ > "_1gdk_1screen_1get_1monitor_1geometry", > "_1gdk_1screen_1get_1n_1monitors", > "_1gdk_1screen_1get_1number", >+ "_1gdk_1screen_1get_1rgb_1visual", >+ "_1gdk_1screen_1get_1root_1window", >+ "_1gdk_1screen_1get_1system_1colormap", >+ "_1gdk_1screen_1get_1width", > "_1gdk_1screen_1height", > "_1gdk_1screen_1width", > "_1gdk_1screen_1width_1mm", >@@ -1003,6 +1015,7 @@ > "_1gtk_1widget_1get_1modifier_1style", > "_1gtk_1widget_1get_1pango_1context", > "_1gtk_1widget_1get_1parent", >+ "_1gtk_1widget_1get_1screen", > "_1gtk_1widget_1get_1size_1request", > "_1gtk_1widget_1get_1style", > "_1gtk_1widget_1get_1toplevel", >@@ -1049,6 +1062,7 @@ > "_1gtk_1window_1get_1mnemonic_1modifier", > "_1gtk_1window_1get_1modal", > "_1gtk_1window_1get_1position", >+ "_1gtk_1window_1get_1screen", > "_1gtk_1window_1get_1size", > "_1gtk_1window_1iconify", > "_1gtk_1window_1maximize", >@@ -1063,6 +1077,7 @@ > "_1gtk_1window_1set_1icon_1list", > "_1gtk_1window_1set_1modal", > "_1gtk_1window_1set_1resizable", >+ "_1gtk_1window_1set_1screen", > "_1gtk_1window_1set_1title", > "_1gtk_1window_1set_1transient_1for", > "_1gtk_1window_1set_1type_1hint", >Index: Eclipse SWT PI/gtk/library/os.c >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c,v >retrieving revision 1.211 >diff -u -r1.211 os.c >--- Eclipse SWT PI/gtk/library/os.c 17 Oct 2006 21:16:48 -0000 1.211 >+++ Eclipse SWT PI/gtk/library/os.c 19 Oct 2006 16:02:14 -0000 >@@ -1551,18 +1551,6 @@ > } > #endif > >-#ifndef NO__1XDefaultScreen >-JNIEXPORT jint JNICALL OS_NATIVE(_1XDefaultScreen) >- (JNIEnv *env, jclass that, jint arg0) >-{ >- jint rc = 0; >- OS_NATIVE_ENTER(env, that, _1XDefaultScreen_FUNC); >- rc = (jint)XDefaultScreen((Display *)arg0); >- OS_NATIVE_EXIT(env, that, _1XDefaultScreen_FUNC); >- return rc; >-} >-#endif >- > #ifndef NO__1XFlush > JNIEXPORT void JNICALL OS_NATIVE(_1XFlush) > (JNIEnv *env, jclass that, jint arg0) >@@ -3555,6 +3543,18 @@ > } > #endif > >+#ifndef NO__1gdk_1colormap_1get_1screen >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1colormap_1get_1screen) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1get_1screen_FUNC); >+ rc = (jint)gdk_colormap_get_screen((GdkColormap*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1get_1screen_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gdk_1colormap_1get_1system > JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1colormap_1get_1system) > (JNIEnv *env, jclass that) >@@ -3620,6 +3620,75 @@ > } > #endif > >+#ifndef NO__1gdk_1display_1get_1default >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1display_1get_1default) >+ (JNIEnv *env, jclass that) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_FUNC); >+ rc = (jint)gdk_display_get_default(); >+ OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gdk_1display_1get_1n_1screens >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1display_1get_1n_1screens) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1n_1screens_FUNC); >+ rc = (jint)gdk_display_get_n_screens((GdkDisplay*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1n_1screens_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gdk_1display_1get_1pointer >+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1display_1get_1pointer) >+ (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2, jintArray arg3, jintArray arg4) >+{ >+ jint *lparg1=NULL; >+ jint *lparg2=NULL; >+ jint *lparg3=NULL; >+ jint *lparg4=NULL; >+ OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1pointer_FUNC); >+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; >+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; >+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; >+ if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail; >+ gdk_display_get_pointer((GdkDisplay*)arg0, (GdkScreen**)lparg1, (gint*)lparg2, (gint*)lparg3, (GdkModifierType*)lparg4); >+fail: >+ if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0); >+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); >+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); >+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1pointer_FUNC); >+} >+#endif >+ >+#ifndef NO__1gdk_1display_1get_1screen >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1display_1get_1screen) >+ (JNIEnv *env, jclass that, jint arg0, jint arg1) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1screen_FUNC); >+ rc = (jint)gdk_display_get_screen((GdkDisplay*)arg0, (gint)arg1); >+ OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1screen_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gdk_1display_1warp_1pointer >+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1display_1warp_1pointer) >+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3) >+{ >+ OS_NATIVE_ENTER(env, that, _1gdk_1display_1warp_1pointer_FUNC); >+ gdk_display_warp_pointer((GdkDisplay*)arg0, (GdkScreen*)arg1, (gint)arg2, (gint)arg3); >+ OS_NATIVE_EXIT(env, that, _1gdk_1display_1warp_1pointer_FUNC); >+} >+#endif >+ > #ifndef NO__1gdk_1drag_1status > JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drag_1status) > (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2) >@@ -3821,6 +3890,18 @@ > } > #endif > >+#ifndef NO__1gdk_1drawable_1get_1screen >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drawable_1get_1screen) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1screen_FUNC); >+ rc = (jint)gdk_drawable_get_screen((GdkDrawable*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1screen_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gdk_1drawable_1get_1size > JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drawable_1get_1size) > (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2) >@@ -4052,6 +4133,18 @@ > } > #endif > >+#ifndef NO__1gdk_1gc_1get_1screen >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1gc_1get_1screen) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1gc_1get_1screen_FUNC); >+ rc = (jint)gdk_gc_get_screen((GdkGC*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1gc_1get_1screen_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gdk_1gc_1get_1values > JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1get_1values) > (JNIEnv *env, jclass that, jint arg0, jobject arg1) >@@ -4351,6 +4444,18 @@ > } > #endif > >+#ifndef NO__1gdk_1pango_1context_1get_1for_1screen >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1pango_1context_1get_1for_1screen) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1pango_1context_1get_1for_1screen_FUNC); >+ rc = (jint)gdk_pango_context_get_for_screen((GdkScreen*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1pango_1context_1get_1for_1screen_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gdk_1pango_1context_1set_1colormap > JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pango_1context_1set_1colormap) > (JNIEnv *env, jclass that, jint arg0, jint arg1) >@@ -4964,6 +5069,54 @@ > } > #endif > >+#ifndef NO__1gdk_1screen_1get_1rgb_1visual >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1rgb_1visual) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1rgb_1visual_FUNC); >+ rc = (jint)gdk_screen_get_rgb_visual((GdkScreen*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1rgb_1visual_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gdk_1screen_1get_1root_1window >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1root_1window) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1root_1window_FUNC); >+ rc = (jint)gdk_screen_get_root_window((GdkScreen*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1root_1window_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gdk_1screen_1get_1system_1colormap >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1system_1colormap) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1system_1colormap_FUNC); >+ rc = (jint)gdk_screen_get_system_colormap((GdkScreen*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1system_1colormap_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gdk_1screen_1get_1width >+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1width) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1width_FUNC); >+ rc = (jint)gdk_screen_get_width((GdkScreen*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1width_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gdk_1screen_1height > JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1height) > (JNIEnv *env, jclass that) >@@ -14315,6 +14468,18 @@ > } > #endif > >+#ifndef NO__1gtk_1widget_1get_1screen >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1get_1screen) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1screen_FUNC); >+ rc = (jint)gtk_widget_get_screen((GtkWidget*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1screen_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gtk_1widget_1get_1size_1request > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1size_1request) > (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2) >@@ -14853,6 +15018,18 @@ > } > #endif > >+#ifndef NO__1gtk_1window_1get_1screen >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1window_1get_1screen) >+ (JNIEnv *env, jclass that, jint arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1window_1get_1screen_FUNC); >+ rc = (jint)gtk_window_get_screen((GtkWindow*)arg0); >+ OS_NATIVE_EXIT(env, that, _1gtk_1window_1get_1screen_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gtk_1window_1get_1size > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1get_1size) > (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2) >@@ -15005,6 +15182,16 @@ > } > #endif > >+#ifndef NO__1gtk_1window_1set_1screen >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1screen) >+ (JNIEnv *env, jclass that, jint arg0, jint arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1window_1set_1screen_FUNC); >+ gtk_window_set_screen((GtkWindow *)arg0, (GdkScreen *)arg1); >+ OS_NATIVE_EXIT(env, that, _1gtk_1window_1set_1screen_FUNC); >+} >+#endif >+ > #ifndef NO__1gtk_1window_1set_1title > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1title) > (JNIEnv *env, jclass that, jint arg0, jbyteArray arg1) >Index: Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java,v >retrieving revision 1.5 >diff -u -r1.5 Monitor.java >--- Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java 23 Jun 2005 14:51:56 -0000 1.5 >+++ Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java 19 Oct 2006 16:02:21 -0000 >@@ -23,6 +23,7 @@ > int handle; > int x, y, width, height; > int clientX, clientY, clientWidth, clientHeight; >+ int /*long*/ screen; > > /** > * Prevents uninitialized instances from being created outside the package. >@@ -44,7 +45,7 @@ > if (object == this) return true; > if (!(object instanceof Monitor)) return false; > Monitor monitor = (Monitor) object; >- return handle == monitor.handle; >+ return (handle == monitor.handle) && (screen == monitor.screen); > } > > /** >Index: Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java,v >retrieving revision 1.449 >diff -u -r1.449 OS.java >--- Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 17 Oct 2006 21:13:05 -0000 1.449 >+++ Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 19 Oct 2006 16:02:16 -0000 >@@ -667,15 +667,6 @@ > lock.unlock(); > } > } >-public static final native int _XDefaultScreen(int /*long*/ display); >-public static final int XDefaultScreen(int /*long*/ display) { >- lock.lock(); >- try { >- return _XDefaultScreen(display); >- } finally { >- lock.unlock(); >- } >-} > public static final native int /*long*/ _XDefaultRootWindow(int /*long*/ display); > public static final int /*long*/ XDefaultRootWindow(int /*long*/ display) { > lock.lock(); >@@ -2276,6 +2267,15 @@ > lock.unlock(); > } > } >+public static final native int /*long*/ _gdk_colormap_get_screen(int /*long*/ cmap); >+public static final int /*long*/ gdk_colormap_get_screen(int /*long*/ cmap) { >+ lock.lock(); >+ try { >+ return _gdk_colormap_get_screen(cmap); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native int /*long*/ _gdk_colormap_get_system(); > public static final int /*long*/ gdk_colormap_get_system() { > lock.lock(); >@@ -2321,6 +2321,52 @@ > lock.unlock(); > } > } >+public static final native int/*long*/ _gdk_display_get_default(); >+public static final int/*long*/ gdk_display_get_default() { >+ lock.lock(); >+ try { >+ return _gdk_display_get_default(); >+ } finally { >+ lock.unlock(); >+ } >+} >+public static final native int _gdk_display_get_n_screens(int/*long*/ display); >+public static final int gdk_display_get_n_screens(int/*long*/ display) { >+ lock.lock(); >+ try { >+ return _gdk_display_get_n_screens(display); >+ } finally { >+ lock.unlock(); >+ } >+} >+public static final native void _gdk_display_get_pointer(int/*long*/ display, int[] /*long[]*/ screen, int[] x, int[] y, int[] mask); >+public static final void gdk_display_get_pointer(int/*long*/ display, int[] /*long[]*/ screen, int[] x, int[] y, int[] mask) { >+ lock.lock(); >+ try { >+ _gdk_display_get_pointer(display, screen, x, y, mask); >+ } finally { >+ lock.unlock(); >+ } >+} >+public static final native int _gdk_display_get_screen(int display, int screen_num); >+public static final int gdk_display_get_screen(int display, int screen_num) { >+ lock.lock(); >+ try { >+ return _gdk_display_get_screen(display, screen_num); >+ } finally { >+ lock.unlock(); >+ } >+} >+public static final native void _gdk_display_warp_pointer(int/*long*/ display, int/*long*/ screen, int x, int y); >+public static final void gdk_display_warp_pointer(int/*long*/ display, int/*long*/ screen, int x, int y) { >+ lock.lock(); >+ try { >+ _gdk_display_warp_pointer(display, screen, x, y); >+ } finally { >+ lock.unlock(); >+ } >+} >+ > public static final native void _gdk_drag_status(int /*long*/ context, int action, int time); > public static final void gdk_drag_status(int /*long*/ context, int action, int time) { > lock.lock(); >@@ -2448,6 +2494,15 @@ > lock.unlock(); > } > } >+public static final native int /*long*/ _gdk_drawable_get_screen(int /*long*/ drawable); >+public static final int /*long*/ gdk_drawable_get_screen(int /*long*/ drawable) { >+ lock.unlock(); >+ try { >+ return _gdk_drawable_get_screen(drawable); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native void _gdk_drawable_get_size(int /*long*/ drawable, int[] width, int[] height); > public static final void gdk_drawable_get_size(int /*long*/ drawable, int[] width, int[] height) { > lock.lock(); >@@ -2601,6 +2656,15 @@ > lock.unlock(); > } > } >+public static final native int /*long*/ _gdk_gc_get_screen(int gc); >+public static final int /*long*/ gdk_gc_get_screen(int gc) { >+ lock.lock(); >+ try { >+ return _gdk_gc_get_screen(gc); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native void _gdk_gc_get_values(int /*long*/ gc, GdkGCValues values); > public static final void gdk_gc_get_values(int /*long*/ gc, GdkGCValues values) { > lock.lock(); >@@ -2817,6 +2881,15 @@ > lock.unlock(); > } > } >+public static final native int /*long*/ _gdk_pango_context_get_for_screen(int /*long*/ screen); >+public static final int /*long*/ gdk_pango_context_get_for_screen(int /*long*/ screen) { >+ lock.lock(); >+ try { >+ return _gdk_pango_context_get_for_screen(screen); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native void _gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap); > public static final void gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap) { > lock.lock(); >@@ -3105,6 +3178,7 @@ > lock.unlock(); > } > } >+ > public static final native void _gdk_region_subtract(int /*long*/ source1, int /*long*/ source2); > public static final void gdk_region_subtract(int /*long*/ source1, int /*long*/ source2) { > lock.lock(); >@@ -3150,6 +3224,43 @@ > lock.unlock(); > } > } >+public static final native int /*long*/ _gdk_screen_get_rgb_visual(int/*long*/ screen); >+public static final int/*long*/ gdk_screen_get_rgb_visual(int/*long*/ screen) { >+ lock.lock(); >+ try { >+ return _gdk_screen_get_rgb_visual(screen); >+ } finally { >+ lock.unlock(); >+ } >+} >+public static final native int /*long*/ _gdk_screen_get_root_window(int screen); >+public static final int /*long*/ gdk_screen_get_root_window(int screen) { >+ lock.lock(); >+ try { >+ return _gdk_screen_get_root_window(screen); >+ } >+ finally { >+ lock.unlock(); >+ } >+} >+public static final native int /*long*/ _gdk_screen_get_system_colormap(int/*long*/ screen); >+public static final int /*long*/ gdk_screen_get_system_colormap(int/*long*/ screen) { >+ lock.lock(); >+ try { >+ return _gdk_screen_get_system_colormap(screen); >+ } finally { >+ lock.unlock(); >+ } >+} >+public static final native int _gdk_screen_get_width(int/*long*/ screen); >+public static final int gdk_screen_get_width(int/*long*/ screen) { >+ lock.lock(); >+ try { >+ return _gdk_screen_get_width(screen); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native int _gdk_screen_get_monitor_at_window(int /*long*/ screen, int /*long*/ window); > public static final int gdk_screen_get_monitor_at_window(int /*long*/ screen, int /*long*/ window) { > lock.lock(); >@@ -8696,6 +8807,15 @@ > lock.unlock(); > } > } >+public static final native int /*long*/ _gtk_widget_get_screen(int/*long*/ widget); >+public static final int /*long*/ gtk_widget_get_screen(int /*long*/ widget) { >+ lock.lock(); >+ try { >+ return _gtk_widget_get_screen(widget); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native int /*long*/ _gtk_widget_get_style(int /*long*/ widget); > public static final int /*long*/ gtk_widget_get_style(int /*long*/ widget) { > lock.lock(); >@@ -9101,6 +9221,15 @@ > lock.unlock(); > } > } >+public static final native int /*long*/ _gtk_window_get_screen(int /*long*/ window); >+public static final int /*long*/ gtk_window_get_screen(int /*long*/ window) { >+ lock.lock(); >+ try { >+ return _gtk_window_get_screen(window); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native void _gtk_window_get_size(int /*long*/ handle, int[] x, int[] y); > public static final void gtk_window_get_size(int /*long*/ handle, int[] x, int[] y) { > lock.lock(); >@@ -9236,6 +9365,15 @@ > lock.unlock(); > } > } >+public static final native void _gtk_window_set_screen(int window, int screen); >+public static final void gtk_window_set_screen(int window, int screen) { >+ lock.lock(); >+ try { >+ _gtk_window_set_screen(window, screen); >+ } finally { >+ lock.unlock(); >+ } >+} > public static final native void _gtk_window_set_title(int /*long*/ window, byte[] title); > public static final void gtk_window_set_title(int /*long*/ window, byte[] title) { > lock.lock(); >Index: .classpath_gtk >=================================================================== >RCS file: .classpath_gtk >diff -N .classpath_gtk >--- .classpath_gtk 3 May 2006 18:48:43 -0000 1.25 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,41 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<classpath> >- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/> >- <classpathentry kind="src" path="Eclipse SWT/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT/cairo"/> >- <classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/> >- <classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/> >- <classpathentry kind="src" path="Eclipse SWT/common"/> >- <classpathentry kind="src" path="Eclipse SWT/common_j2se"/> >- <classpathentry kind="src" path="Eclipse SWT PI/gtk"> >- <attributes> >- <attribute value="org.eclipse.swt.gtk.linux.x86" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/> >- </attributes> >- </classpathentry> >- <classpathentry kind="src" path="Eclipse SWT PI/cairo"/> >- <classpathentry kind="src" path="Eclipse SWT PI/common"/> >- <classpathentry kind="src" path="Eclipse SWT PI/common_j2se"/> >- <classpathentry kind="src" path="Eclipse SWT Accessibility/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> >- <classpathentry kind="src" path="Eclipse SWT AWT/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT AWT/common"/> >- <classpathentry kind="src" path="Eclipse SWT Drag and Drop/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT Drag and Drop/common"/> >- <classpathentry kind="src" path="Eclipse SWT Printing/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT Printing/common"/> >- <classpathentry kind="src" path="Eclipse SWT Program/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT Program/common"/> >- <classpathentry kind="src" path="Eclipse SWT Program/gnome"/> >- <classpathentry kind="src" path="Eclipse SWT Program/cde"/> >- <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> >- <classpathentry kind="src" path="Eclipse SWT Browser/common"/> >- <classpathentry kind="src" path="Eclipse SWT Browser/mozilla"/> >- <classpathentry kind="src" path="Eclipse SWT Mozilla/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT Mozilla/common"/> >- <classpathentry kind="src" path="Eclipse SWT OpenGL/gtk"/> >- <classpathentry kind="src" path="Eclipse SWT OpenGL/glx"/> >- <classpathentry kind="src" path="Eclipse SWT OpenGL/common"/> >- <classpathentry kind="src" path="Eclipse SWT Theme/gtk"/> >- <classpathentry kind="lib" path="extra_jars/exceptions.jar"/> >- <classpathentry kind="output" path="bin"/> >-</classpath>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 152978
: 52324