diff --git a/contrib/platform/build.xml b/contrib/platform/build.xml
index a0ec75f965..7bddddcf64 100644
--- a/contrib/platform/build.xml
+++ b/contrib/platform/build.xml
@@ -69,6 +69,9 @@
+
+
+
@@ -86,4 +89,20 @@
No platform tests yet for OSX
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/contrib/platform/src/com/sun/jna/platform/unix/X11.java b/contrib/platform/src/com/sun/jna/platform/unix/X11.java
index ce9edd8566..1887cb7992 100644
--- a/contrib/platform/src/com/sun/jna/platform/unix/X11.java
+++ b/contrib/platform/src/com/sun/jna/platform/unix/X11.java
@@ -1610,7 +1610,7 @@ class XUnmapEvent extends Structure {
public Window window;
public int from_configure;
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "from_configure" });
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "event", "window", "from_configure" });
}
}
@@ -1623,7 +1623,7 @@ class XMapEvent extends Structure {
public Window window;
public int override_redirect; // boolean, is override set...
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "override_redirect" });
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "event", "window", "override_redirect" });
}
}
@@ -1635,7 +1635,7 @@ class XMapRequestEvent extends Structure {
public Window parent;
public Window window;
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window" });
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "parent", "window" });
}
}
@@ -1650,7 +1650,7 @@ class XReparentEvent extends Structure {
public int x, y;
public int override_redirect;
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "override_redirect" });
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "event", "window", "parent", "x", "y", "override_redirect" });
}
}
@@ -1667,7 +1667,7 @@ class XConfigureEvent extends Structure {
public Window above;
public int override_redirect;
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "width", "height", "border_width", "above", "override_redirect" });
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "event", "window", "x", "y", "width", "height", "border_width", "above", "override_redirect" });
}
}
@@ -1680,7 +1680,7 @@ class XGravityEvent extends Structure {
public Window window;
public int x, y;
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y" });
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "event", "window", "x", "y" });
}
}
@@ -1710,7 +1710,7 @@ class XConfigureRequestEvent extends Structure {
public int detail; // Above, Below, TopIf, BottomIf, Opposite
public NativeLong value_mask;
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "width", "height", "above", "detail", "value_mask" });
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "parent", "window", "x", "y", "width", "height", "border_width", "above", "detail", "value_mask" });
}
}
diff --git a/contrib/platform/test/com/sun/jna/platform/StructureFieldOrderTest.java b/contrib/platform/test/com/sun/jna/platform/StructureFieldOrderTest.java
index 3790731f49..ebdd8b2560 100644
--- a/contrib/platform/test/com/sun/jna/platform/StructureFieldOrderTest.java
+++ b/contrib/platform/test/com/sun/jna/platform/StructureFieldOrderTest.java
@@ -25,11 +25,32 @@
public class StructureFieldOrderTest extends TestCase {
+ private String origPropJNANoSys;
+
+ protected void setUp() {
+ origPropJNANoSys = System.getProperty("jna.nosys");
+ System.setProperty("jna.nosys", "true"); // would be set by ant script, set here for IDE usage
+ }
+
+ protected void tearDown() {
+ if (origPropJNANoSys == null) {
+ System.getProperties().remove("jna.nosys");
+ } else {
+ System.setProperty("jna.nosys", origPropJNANoSys);
+ }
+ }
+
+
public void testMethodGetFieldOrder() {
final List ignoreConstructorError = new ArrayList();
if (Platform.isWindows()) {
ignoreConstructorError.add(X11.class.getName() + "$");
+ } else {
+ ignoreConstructorError.add(com.sun.jna.platform.win32.Winspool.PRINTER_INFO_1.class.getName());
+ ignoreConstructorError.add(com.sun.jna.platform.win32.Winspool.PRINTER_INFO_4.class.getName());
+ ignoreConstructorError.add(com.sun.jna.platform.win32.SetupApi.SP_DEVICE_INTERFACE_DATA.class.getName());
+ ignoreConstructorError.add(com.sun.jna.platform.win32.SetupApi.SP_DEVINFO_DATA.class.getName());
}
ignoreConstructorError.add(DBT.DEV_BROADCAST_HANDLE.class.getName()); // manually validated by wolftobias
@@ -47,7 +68,7 @@ public void testMethodGetFieldOrderSingleClass() {
ignoreConstructorError.add(X11.class.getName() + "$");
}
- StructureFieldOrderInspector.checkMethodGetFieldOrder(LMAccess.GROUP_INFO_3.class, ignoreConstructorError);
+ StructureFieldOrderInspector.checkMethodGetFieldOrder(com.sun.jna.platform.win32.SetupApi.SP_DEVICE_INTERFACE_DATA.class, ignoreConstructorError);
}
//*/