Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

address issue #84

  • Loading branch information...
commit a947dfdac53e91e78ff72fcc28f3995efe292ce1 1 parent b83e977
@twall authored
Showing with 2,711 additions and 2,021 deletions.
  1. +179 −195 contrib/ntservice/src/jnacontrib/jna/Advapi32.java
  2. +8 −4 contrib/platform/src/com/sun/jna/platform/mac/Carbon.java
  3. +146 −50 contrib/platform/src/com/sun/jna/platform/unix/X11.java
  4. +15 −23 contrib/platform/src/com/sun/jna/platform/win32/DsGetDC.java
  5. +7 −0 contrib/platform/src/com/sun/jna/platform/win32/Guid.java
  6. +46 −1 contrib/platform/src/com/sun/jna/platform/win32/LMAccess.java
  7. +32 −2 contrib/platform/src/com/sun/jna/platform/win32/NTSecApi.java
  8. +0 −1  contrib/platform/src/com/sun/jna/platform/win32/Netapi32.java
  9. +11 −0 contrib/platform/src/com/sun/jna/platform/win32/SetupApi.java
  10. +7 −0 contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java
  11. +34 −23 contrib/platform/src/com/sun/jna/platform/win32/Sspi.java
  12. +7 −0 contrib/platform/src/com/sun/jna/platform/win32/Tlhelp32.java
  13. +7 −0 contrib/platform/src/com/sun/jna/platform/win32/VerRsrc.java
  14. +7 −0 contrib/platform/src/com/sun/jna/platform/win32/Wdm.java
  15. +39 −1 contrib/platform/src/com/sun/jna/platform/win32/WinBase.java
  16. +10 −0 contrib/platform/src/com/sun/jna/platform/win32/WinCrypt.java
  17. +6 −0 contrib/platform/src/com/sun/jna/platform/win32/WinDef.java
  18. +21 −0 contrib/platform/src/com/sun/jna/platform/win32/WinGDI.java
  19. +1,558 −1,459 contrib/platform/src/com/sun/jna/platform/win32/WinNT.java
  20. +47 −1 contrib/platform/src/com/sun/jna/platform/win32/WinUser.java
  21. +7 −0 contrib/platform/src/com/sun/jna/platform/win32/Winioctl.java
  22. +11 −2 contrib/platform/src/com/sun/jna/platform/win32/Winspool.java
  23. +11 −0 contrib/platform/src/com/sun/jna/platform/win32/Winsvc.java
  24. +5 −7 contrib/platform/test/com/sun/jna/platform/win32/Netapi32Test.java
  25. +8 −5 src/com/sun/jna/CallbackReference.java
  26. +104 −109 src/com/sun/jna/Structure.java
  27. +2 −6 src/com/sun/jna/Union.java
  28. +27 −13 test/com/sun/jna/ArgumentsMarshalTest.java
  29. +11 −1 test/com/sun/jna/CallbacksTest.java
  30. +9 −0 test/com/sun/jna/IntegerTypeTest.java
  31. +11 −1 test/com/sun/jna/NativeTest.java
  32. +15 −4 test/com/sun/jna/ReturnTypesTest.java
  33. +3 −6 test/com/sun/jna/StructureBufferFieldTest.java
  34. +21 −5 test/com/sun/jna/StructureByValueTest.java
  35. +236 −100 test/com/sun/jna/StructureTest.java
  36. +6 −0 test/com/sun/jna/TypeMapperTest.java
  37. +12 −1 test/com/sun/jna/UnionTest.java
  38. +8 −1 test/com/sun/jna/VarArgsTest.java
  39. +9 −0 test/com/sun/jna/win32/W32APIMapperTest.java
  40. +8 −0 test/com/sun/jna/win32/W32StdCallTest.java
View
374 contrib/ntservice/src/jnacontrib/jna/Advapi32.java
@@ -9,204 +9,188 @@
package jnacontrib.jna;
-import com.sun.jna.*;
-import com.sun.jna.ptr.*;
-import com.sun.jna.win32.*;
+import java.util.Arrays;
+import java.util.List;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.WString;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
/**
- *
+ *
* @author TB
*/
-public interface Advapi32 extends StdCallLibrary {
- Advapi32 INSTANCE = (Advapi32) Native.loadLibrary("Advapi32", Advapi32.class,
- W32APIOptions.UNICODE_OPTIONS);
-
-/*
-SC_HANDLE WINAPI OpenSCManager(
- LPCTSTR lpMachineName,
- LPCTSTR lpDatabaseName,
- DWORD dwDesiredAccess
-);*/
- public Pointer OpenSCManager(String lpMachineName, WString lpDatabaseName, int dwDesiredAccess);
-
-/*
-BOOL WINAPI CloseServiceHandle(
- SC_HANDLE hSCObject
-);*/
- public boolean CloseServiceHandle(Pointer hSCObject);
-
-/*
-SC_HANDLE WINAPI OpenService(
- SC_HANDLE hSCManager,
- LPCTSTR lpServiceName,
- DWORD dwDesiredAccess
-);*/
- public Pointer OpenService(Pointer hSCManager, String lpServiceName, int dwDesiredAccess);
-
-/*
-BOOL WINAPI StartService(
- SC_HANDLE hService,
- DWORD dwNumServiceArgs,
- LPCTSTR* lpServiceArgVectors
-);*/
- public boolean StartService(Pointer hService, int dwNumServiceArgs, char[] lpServiceArgVectors);
-
-/*
-BOOL WINAPI ControlService(
- SC_HANDLE hService,
- DWORD dwControl,
- LPSERVICE_STATUS lpServiceStatus
-);*/
- public boolean ControlService(Pointer hService, int dwControl, SERVICE_STATUS lpServiceStatus);
-
-/*
-BOOL WINAPI StartServiceCtrlDispatcher(
- const SERVICE_TABLE_ENTRY* lpServiceTable
-);*/
- public boolean StartServiceCtrlDispatcher(Structure[] lpServiceTable);
-
-/*
-SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandler(
- LPCTSTR lpServiceName,
- LPHANDLER_FUNCTION lpHandlerProc
-);*/
- public Pointer RegisterServiceCtrlHandler(String lpServiceName, Handler lpHandlerProc);
-
-/*
-SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerEx(
- LPCTSTR lpServiceName,
- LPHANDLER_FUNCTION_EX lpHandlerProc,
- LPVOID lpContext
-);*/
- public Pointer RegisterServiceCtrlHandlerEx(String lpServiceName, HandlerEx lpHandlerProc, Pointer lpContext);
-
-/*
-BOOL WINAPI SetServiceStatus(
- SERVICE_STATUS_HANDLE hServiceStatus,
- LPSERVICE_STATUS lpServiceStatus
-);*/
- public boolean SetServiceStatus(Pointer hServiceStatus, SERVICE_STATUS lpServiceStatus);
-
-/*
-SC_HANDLE WINAPI CreateService(
- SC_HANDLE hSCManager,
- LPCTSTR lpServiceName,
- LPCTSTR lpDisplayName,
- DWORD dwDesiredAccess,
- DWORD dwServiceType,
- DWORD dwStartType,
- DWORD dwErrorControl,
- LPCTSTR lpBinaryPathName,
- LPCTSTR lpLoadOrderGroup,
- LPDWORD lpdwTagId,
- LPCTSTR lpDependencies,
- LPCTSTR lpServiceStartName,
- LPCTSTR lpPassword
-);*/
- public Pointer CreateService(Pointer hSCManager, String lpServiceName, String lpDisplayName,
- int dwDesiredAccess, int dwServiceType, int dwStartType, int dwErrorControl,
- String lpBinaryPathName, String lpLoadOrderGroup, IntByReference lpdwTagId,
- String lpDependencies, String lpServiceStartName, String lpPassword);
-
-/*
-BOOL WINAPI DeleteService(
- SC_HANDLE hService
-);*/
- public boolean DeleteService(Pointer hService);
-
-/*
-BOOL WINAPI ChangeServiceConfig2(
- SC_HANDLE hService,
- DWORD dwInfoLevel,
- LPVOID lpInfo
-);*/
- public boolean ChangeServiceConfig2(Pointer hService, int dwInfoLevel, ChangeServiceConfig2Info lpInfo);
-
-/*
-LONG WINAPI RegEnumValue(
- HKEY hKey,
- DWORD dwIndex,
- LPTSTR lpValueName,
- LPDWORD lpcchValueName,
- LPDWORD lpReserved,
- LPDWORD lpType,
- LPBYTE lpData,
- LPDWORD lpcbData
-);*/
- public int RegEnumValue(int hKey, int dwIndex, char[] lpValueName, IntByReference lpcchValueName, IntByReference reserved,
- IntByReference lpType, byte[] lpData, IntByReference lpcbData);
-
- interface SERVICE_MAIN_FUNCTION extends StdCallCallback {
- /*
- VOID WINAPI ServiceMain(
- DWORD dwArgc,
- LPTSTR* lpszArgv
- );*/
- public void callback(int dwArgc, Pointer lpszArgv);
- }
-
- interface Handler extends StdCallCallback {
- /*
- VOID WINAPI Handler(
- DWORD fdwControl
- );*/
- public void callback(int fdwControl);
- }
-
- interface HandlerEx extends StdCallCallback {
- /*
- DWORD WINAPI HandlerEx(
- DWORD dwControl,
- DWORD dwEventType,
- LPVOID lpEventData,
- LPVOID lpContext
- );*/
- public int callback(int dwControl, int dwEventType, Pointer lpEventData, Pointer lpContext);
- }
-
-/*
-typedef struct _SERVICE_STATUS {
- DWORD dwServiceType;
- DWORD dwCurrentState;
- DWORD dwControlsAccepted;
- DWORD dwWin32ExitCode;
- DWORD dwServiceSpecificExitCode;
- DWORD dwCheckPoint;
- DWORD dwWaitHint;
-} SERVICE_STATUS,
- *LPSERVICE_STATUS;*/
- public static class SERVICE_STATUS extends Structure {
- public int dwServiceType;
- public int dwCurrentState;
- public int dwControlsAccepted;
- public int dwWin32ExitCode;
- public int dwServiceSpecificExitCode;
- public int dwCheckPoint;
- public int dwWaitHint;
- }
-
-/*
-typedef struct _SERVICE_TABLE_ENTRY {
- LPTSTR lpServiceName;
- LPSERVICE_MAIN_FUNCTION lpServiceProc;
-} SERVICE_TABLE_ENTRY,
- *LPSERVICE_TABLE_ENTRY;*/
- public static class SERVICE_TABLE_ENTRY extends Structure {
- public String lpServiceName;
- public SERVICE_MAIN_FUNCTION lpServiceProc;
- }
-
- public static class ChangeServiceConfig2Info extends Structure {
- }
-
-/*
- typedef struct _SERVICE_DESCRIPTION {
- LPTSTR lpDescription;
-} SERVICE_DESCRIPTION,
- *LPSERVICE_DESCRIPTION;*/
- public static class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info {
- public String lpDescription;
- }
-}
+public interface Advapi32 extends StdCallLibrary {
+ Advapi32 INSTANCE = (Advapi32) Native.loadLibrary("Advapi32",
+ Advapi32.class, W32APIOptions.UNICODE_OPTIONS);
+
+ /*
+ * SC_HANDLE WINAPI OpenSCManager( LPCTSTR lpMachineName, LPCTSTR
+ * lpDatabaseName, DWORD dwDesiredAccess );
+ */
+ public Pointer OpenSCManager(String lpMachineName, WString lpDatabaseName,
+ int dwDesiredAccess);
+
+ /*
+ * BOOL WINAPI CloseServiceHandle( SC_HANDLE hSCObject );
+ */
+ public boolean CloseServiceHandle(Pointer hSCObject);
+
+ /*
+ * SC_HANDLE WINAPI OpenService( SC_HANDLE hSCManager, LPCTSTR
+ * lpServiceName, DWORD dwDesiredAccess );
+ */
+ public Pointer OpenService(Pointer hSCManager, String lpServiceName,
+ int dwDesiredAccess);
+
+ /*
+ * BOOL WINAPI StartService( SC_HANDLE hService, DWORD dwNumServiceArgs,
+ * LPCTSTR* lpServiceArgVectors );
+ */
+ public boolean StartService(Pointer hService, int dwNumServiceArgs,
+ char[] lpServiceArgVectors);
+
+ /*
+ * BOOL WINAPI ControlService( SC_HANDLE hService, DWORD dwControl,
+ * LPSERVICE_STATUS lpServiceStatus );
+ */
+ public boolean ControlService(Pointer hService, int dwControl,
+ SERVICE_STATUS lpServiceStatus);
+
+ /*
+ * BOOL WINAPI StartServiceCtrlDispatcher( const SERVICE_TABLE_ENTRY*
+ * lpServiceTable );
+ */
+ public boolean StartServiceCtrlDispatcher(Structure[] lpServiceTable);
+
+ /*
+ * SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandler( LPCTSTR
+ * lpServiceName, LPHANDLER_FUNCTION lpHandlerProc );
+ */
+ public Pointer RegisterServiceCtrlHandler(String lpServiceName,
+ Handler lpHandlerProc);
+
+ /*
+ * SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerEx( LPCTSTR
+ * lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext );
+ */
+ public Pointer RegisterServiceCtrlHandlerEx(String lpServiceName,
+ HandlerEx lpHandlerProc, Pointer lpContext);
+
+ /*
+ * BOOL WINAPI SetServiceStatus( SERVICE_STATUS_HANDLE hServiceStatus,
+ * LPSERVICE_STATUS lpServiceStatus );
+ */
+ public boolean SetServiceStatus(Pointer hServiceStatus,
+ SERVICE_STATUS lpServiceStatus);
+
+ /*
+ * SC_HANDLE WINAPI CreateService( SC_HANDLE hSCManager, LPCTSTR
+ * lpServiceName, LPCTSTR lpDisplayName, DWORD dwDesiredAccess, DWORD
+ * dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCTSTR
+ * lpBinaryPathName, LPCTSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCTSTR
+ * lpDependencies, LPCTSTR lpServiceStartName, LPCTSTR lpPassword );
+ */
+ public Pointer CreateService(Pointer hSCManager, String lpServiceName,
+ String lpDisplayName, int dwDesiredAccess, int dwServiceType,
+ int dwStartType, int dwErrorControl, String lpBinaryPathName,
+ String lpLoadOrderGroup, IntByReference lpdwTagId,
+ String lpDependencies, String lpServiceStartName, String lpPassword);
+
+ /*
+ * BOOL WINAPI DeleteService( SC_HANDLE hService );
+ */
+ public boolean DeleteService(Pointer hService);
+ /*
+ * BOOL WINAPI ChangeServiceConfig2( SC_HANDLE hService, DWORD dwInfoLevel,
+ * LPVOID lpInfo );
+ */
+ public boolean ChangeServiceConfig2(Pointer hService, int dwInfoLevel,
+ ChangeServiceConfig2Info lpInfo);
+
+ /*
+ * LONG WINAPI RegEnumValue( HKEY hKey, DWORD dwIndex, LPTSTR lpValueName,
+ * LPDWORD lpcchValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE
+ * lpData, LPDWORD lpcbData );
+ */
+ public int RegEnumValue(int hKey, int dwIndex, char[] lpValueName,
+ IntByReference lpcchValueName, IntByReference reserved,
+ IntByReference lpType, byte[] lpData, IntByReference lpcbData);
+
+ interface SERVICE_MAIN_FUNCTION extends StdCallCallback {
+ /*
+ * VOID WINAPI ServiceMain( DWORD dwArgc, LPTSTR* lpszArgv );
+ */
+ public void callback(int dwArgc, Pointer lpszArgv);
+ }
+ interface Handler extends StdCallCallback {
+ /*
+ * VOID WINAPI Handler( DWORD fdwControl );
+ */
+ public void callback(int fdwControl);
+ }
+
+ interface HandlerEx extends StdCallCallback {
+ /*
+ * DWORD WINAPI HandlerEx( DWORD dwControl, DWORD dwEventType, LPVOID
+ * lpEventData, LPVOID lpContext );
+ */
+ public int callback(int dwControl, int dwEventType,
+ Pointer lpEventData, Pointer lpContext);
+ }
+
+ /*
+ * typedef struct _SERVICE_STATUS { DWORD dwServiceType; DWORD
+ * dwCurrentState; DWORD dwControlsAccepted; DWORD dwWin32ExitCode; DWORD
+ * dwServiceSpecificExitCode; DWORD dwCheckPoint; DWORD dwWaitHint; }
+ * SERVICE_STATUS,LPSERVICE_STATUS;
+ */
+ public static class SERVICE_STATUS extends Structure {
+ public int dwServiceType;
+ public int dwCurrentState;
+ public int dwControlsAccepted;
+ public int dwWin32ExitCode;
+ public int dwServiceSpecificExitCode;
+ public int dwCheckPoint;
+ public int dwWaitHint;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwServiceType", "dwCurrentState", "dwControlsAccepted", "dwWin32ExitCode", "dwServiceSpecificExitCode", "dwCheckPoint", "dwWaitHint" });
+ }
+ }
+
+ /*
+ * typedef struct _SERVICE_TABLE_ENTRY { LPTSTR lpServiceName;
+ * LPSERVICE_MAIN_FUNCTION lpServiceProc; } SERVICE_TABLE_ENTRY,
+ * LPSERVICE_TABLE_ENTRY;
+ */
+ public static class SERVICE_TABLE_ENTRY extends Structure {
+ public String lpServiceName;
+ public SERVICE_MAIN_FUNCTION lpServiceProc;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "lpServiceName", "lpServiceProc" });
+ }
+ }
+
+ public static abstract class ChangeServiceConfig2Info extends Structure {
+ }
+
+ /*
+ * typedef struct _SERVICE_DESCRIPTION { LPTSTR lpDescription; }
+ * SERVICE_DESCRIPTION,LPSERVICE_DESCRIPTION;
+ */
+ public static class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info {
+ public String lpDescription;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "lpDescription" });
+ }
+ }
+}
View
12 contrib/platform/src/com/sun/jna/platform/mac/Carbon.java
@@ -17,14 +17,16 @@
package com.sun.jna.platform.mac;
+import java.nio.IntBuffer;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Callback;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.ptr.PointerByReference;
-import java.nio.IntBuffer;
-
/**
* Author: Denis Tulskiy
* Date: 7/25/11
@@ -70,7 +72,8 @@
public class EventTypeSpec extends Structure {
public int eventClass;
public int eventKind;
- { setFieldOrder(new String[] { "eventClass", "eventKind" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "eventClass", "eventKind" }); }
}
public static class EventHotKeyID extends Structure {
@@ -78,7 +81,8 @@
public int id;
public static class ByValue extends EventHotKeyID implements Structure.ByValue { }
- { setFieldOrder(new String[] { "signature", "id" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "signature", "id" }); }
}
public static interface EventHandlerProcPtr extends Callback {
View
196 contrib/platform/src/com/sun/jna/platform/unix/X11.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.unix;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Callback;
import com.sun.jna.FromNativeContext;
import com.sun.jna.Library;
@@ -277,7 +280,9 @@ void XShapeCombineMask(Display display, Window window, int dest_kind,
public short green, greenMask;
public short blue, blueMask;
public short alpha, alphaMask;
- { setFieldOrder(new String[] { "red", "redMask", "green", "greenMask", "blue", "blueMask", "alpha", "alphaMask" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "red", "redMask", "green", "greenMask", "blue", "blueMask", "alpha", "alphaMask" });
+ }
}
class PictFormat extends NativeLong {
private static final long serialVersionUID = 1L;
@@ -290,7 +295,9 @@ public PictFormat() { }
public int depth;
public XRenderDirectFormat direct;
public Colormap colormap;
- { setFieldOrder(new String[] { "id", "type", "depth", "direct", "colormap" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "id", "type", "depth", "direct", "colormap" });
+ }
}
int PictTypeIndexed = 0x0;
int PictTypeDirect = 0x1;
@@ -339,14 +346,18 @@ public PictFormat() { }
class XInputClassInfoByReference extends Structure implements Structure.ByReference {
public byte input_class;
public byte event_type_base;
- { setFieldOrder(new String[] { "input_class", "event_type_base" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "input_class", "event_type_base" });
+ }
}
class XDeviceByReference extends Structure implements Structure.ByReference {
public XID device_id;
public int num_classes;
public XInputClassInfoByReference classes;
- { setFieldOrder(new String[] { "device_id", "num_classes", "classes" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "device_id", "num_classes", "classes" });
+ }
}
X11 INSTANCE = (X11)Native.loadLibrary("X11", X11.class);
@@ -374,7 +385,9 @@ public PictFormat() { }
public int icon_x, icon_y;
public Pixmap icon_mask;
public XID window_group;
- { setFieldOrder(new String[] { "flags", "input", "initial_state", "icon_pixmap", "icon_window", "icon_x", "icon_y", "icon_mask", "window_group" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "flags", "input", "initial_state", "icon_pixmap", "icon_window", "icon_x", "icon_y", "icon_mask", "window_group" });
+ }
}
/*
@@ -390,7 +403,9 @@ public PictFormat() { }
public Atom encoding;
public int format;
public NativeLong nitems;
- { setFieldOrder(new String[] { "value", "encoding", "format", "nitems" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "value", "encoding", "format", "nitems" });
+ }
}
/*
@@ -419,12 +434,14 @@ public PictFormat() { }
public static class Aspect extends Structure {
public int x; // numerator
public int y; // denominator
- { setFieldOrder(new String[] { "x", "y" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "x", "y" }); }
}
public Aspect min_aspect, max_aspect;
public int base_width, base_height;
public int win_gravity;
- { setFieldOrder(new String[] { "flags", "x", "y", "width", "height", "min_width", "min_height", "max_width", "max_height", "width_inc", "height_inc", "min_aspect", "max_aspect", "base_width", "base_height", "win_gravity" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "flags", "x", "y", "width", "height", "min_width", "min_height", "max_width", "max_height", "width_inc", "height_inc", "min_aspect", "max_aspect", "base_width", "base_height", "win_gravity" }); }
}
/*
@@ -478,7 +495,9 @@ public PictFormat() { }
public NativeLong do_not_propagate_mask;
public boolean override_redirect;
public Screen screen;
- { setFieldOrder(new String[] { "x", "y", "width", "height", "border_width", "depth", "visual", "root", "c_class", "bit_gravity", "win_gravity", "backing_store", "backing_planes", "backing_pixel", "save_under", "colormap", "map_installed", "map_state", "all_event_masks", "your_event_mask", "do_not_propagate_mask", "override_redirect", "screen" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "x", "y", "width", "height", "border_width", "depth", "visual", "root", "c_class", "bit_gravity", "win_gravity", "backing_store", "backing_planes", "backing_pixel", "save_under", "colormap", "map_installed", "map_state", "all_event_masks", "your_event_mask", "do_not_propagate_mask", "override_redirect", "screen" });
+ }
}
/*
@@ -516,7 +535,9 @@ public PictFormat() { }
public boolean override_redirect;
public Colormap colormap;
public Cursor cursor;
- { setFieldOrder(new String[] { "background_pixmap", "background_pixel", "border_pixmap", "border_pixel", "bit_gravity", "win_gravity", "backing_store", "backing_planes", "backing_pixel", "save_under", "event_mask", "do_not_propagate_mask", "override_redirect", "colormap", "cursor" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "background_pixmap", "background_pixel", "border_pixmap", "border_pixel", "bit_gravity", "win_gravity", "backing_store", "backing_planes", "backing_pixel", "save_under", "event_mask", "do_not_propagate_mask", "override_redirect", "colormap", "cursor" });
+ }
}
int XK_0 = 0x30;
@@ -559,25 +580,31 @@ public PictFormat() { }
public NativeLong blue_mask;
public int colormap_size;
public int bits_per_rgb;
- { setFieldOrder(new String[] { "visual", "visualid", "screen", "depth", "c_class", "red_mask", "green_mask", "blue_mask", "colormap_size", "bits_per_rgb" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "visual", "visualid", "screen", "depth", "c_class", "red_mask", "green_mask", "blue_mask", "colormap_size", "bits_per_rgb" });
+ }
}
class XPoint extends Structure {
public short x, y;
- public XPoint() { this(0, 0); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "x", "y" });
+ }
+ public XPoint() { this((short)0, (short)0); }
public XPoint(short x, short y) {
this.x = x;
this.y = y;
- setFieldOrder(new String[] { "x", "y" });
}
}
class XRectangle extends Structure {
public short x, y;
public short width, height;
- public XRectangle() { this(0, 0, 0, 0); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "x", "y", "width", "height" });
+ }
+ public XRectangle() { this((short)0, (short)0, (short)0, (short)0); }
public XRectangle(short x, short y, short width, short height) {
this.x = x; this.y = y;
this.width = width; this.height = height;
- setFieldOrder(new String[] { "x", "y", "width", "height" });
}
}
@@ -718,7 +745,9 @@ Pixmap XCreateBitmapFromData(Display display, Window window, Pointer data,
public Pixmap clip_mask; /* bitmap clipping; other calls for rects */
public int dash_offset; /* patterned/dashed line information */
public byte dashes;
- { setFieldOrder(new String[] { "function", "plane_mask", "foreground", "background", "line_width", "line_style", "cap_style", "join_style", "fill_style", "fill_rule", "arc_mode", "tile", "stipple", "ts_x_origin", "ts_y_origin", "font", "subwindow_mode", "graphics_exposures", "clip_x_origin", "clip_y_origin", "clip_mask", "dash_offset", "dashes" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "function", "plane_mask", "foreground", "background", "line_width", "line_style", "cap_style", "join_style", "fill_style", "fill_rule", "arc_mode", "tile", "stipple", "ts_x_origin", "ts_y_origin", "font", "subwindow_mode", "graphics_exposures", "clip_x_origin", "clip_y_origin", "clip_mask", "dash_offset", "dashes" });
+ }
}
GC XCreateGC(Display display, Drawable drawable, NativeLong mask, XGCValues values);
int XSetFillRule(Display display, GC gc, int fill_rule);
@@ -1344,7 +1373,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int send_event; // true if this came from a SendEvent request
public Display display; // Display the event was read from
public Window window; // window on which event was requested in event mask
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window" });
+ }
}
class XKeyEvent extends Structure {
@@ -1361,7 +1392,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int state; // key or button mask
public int keycode; // detail
public int same_screen; // same screen flag
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "state", "keycode", "same_screen" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "state", "keycode", "same_screen" });
+ }
}
class XButtonEvent extends Structure {
@@ -1378,7 +1411,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int state; // key or button mask
public int button; // detail
public int same_screen; // same screen flag
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "state", "button", "same_screen" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "state", "button", "same_screen" });
+ }
}
class XButtonPressedEvent extends XButtonEvent {
@@ -1396,7 +1431,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Atom message_type;
public int format;
public Data data;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "message_type", "format", "data" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "message_type", "format", "data" });
+ }
public static class Data extends Union {
public byte b[] = new byte[20];
@@ -1419,7 +1456,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int state; // key or button mask
public byte is_hint; // detail
public int same_screen; // same screen flag
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "state", "is_hint", "same_screen" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "state", "is_hint", "same_screen" });
+ }
}
class XPointerMovedEvent extends XMotionEvent {
@@ -1445,7 +1484,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int same_screen; // same screen flag
public int focus; // boolean focus
public int state; // key or button mask
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "mode", "detail", "same_screen", "focus", "state" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "root", "subwindow", "time", "x", "y", "x_root", "y_root", "mode", "detail", "same_screen", "focus", "state" });
+ }
}
class XEnterWindowEvent extends XCrossingEvent {
@@ -1467,7 +1508,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
* NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
* NotifyPointerRoot, NotifyDetailNone
*/
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "mode", "detail" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "mode", "detail" });
+ }
}
class XFocusInEvent extends XFocusChangeEvent {
@@ -1485,7 +1528,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int x, y;
public int width, height;
public int count; // if non-zero, at least this many more
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "width", "height", "count" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "width", "height", "count" });
+ }
}
class XGraphicsExposeEvent extends Structure {
@@ -1499,7 +1544,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int count; // if non-zero, at least this many more
public int major_code; // core is CopyArea or CopyPlane
public int minor_code; // not defined in the core
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "drawable", "x", "y", "width", "height", "count", "major_code", "minor_code" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "drawable", "x", "y", "width", "height", "count", "major_code", "minor_code" });
+ }
}
class XNoExposeEvent extends Structure {
@@ -1510,7 +1557,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Drawable drawable;
public int major_code; // core is CopyArea or CopyPlane
public int minor_code; // not defined in the core
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "drawable", "major_code", "minor_code" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "drawable", "major_code", "minor_code" });
+ }
}
class XVisibilityEvent extends Structure {
@@ -1520,7 +1569,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Display display; // Display the event was read from
public Window window;
public int state; // Visibility state
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "state" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "state" });
+ }
}
class XCreateWindowEvent extends Structure {
@@ -1534,7 +1585,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int width, height; // size of window
public int border_width; // border width
public int override_redirect; // creation should be overridden
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "parent", "window", "x", "y", "width", "height", "border_width", "override_redirect" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "parent", "window", "x", "y", "width", "height", "border_width", "override_redirect" });
+ }
}
class XDestroyWindowEvent extends Structure {
@@ -1544,7 +1597,8 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Display display; // Display the event was read from
public Window event;
public Window window;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window" }); }
}
class XUnmapEvent extends Structure {
@@ -1555,7 +1609,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window event;
public Window window;
public int from_configure;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "from_configure" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "from_configure" });
+ }
}
class XMapEvent extends Structure {
@@ -1566,7 +1622,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window event;
public Window window;
public int override_redirect; // boolean, is override set...
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "override_redirect" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "override_redirect" });
+ }
}
class XMapRequestEvent extends Structure {
@@ -1576,7 +1634,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Display display; // Display the event was read from
public Window parent;
public Window window;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window" });
+ }
}
class XReparentEvent extends Structure {
@@ -1589,7 +1649,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window parent;
public int x, y;
public int override_redirect;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "override_redirect" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "override_redirect" });
+ }
}
class XConfigureEvent extends Structure {
@@ -1604,7 +1666,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int border_width;
public Window above;
public int override_redirect;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "width", "height", "border_width", "above", "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" });
+ }
}
class XGravityEvent extends Structure {
@@ -1615,7 +1679,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window event;
public Window window;
public int x, y;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "x", "y" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y" });
+ }
}
class XResizeRequestEvent extends Structure {
@@ -1625,7 +1691,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Display display; // Display the event was read from
public Window window;
public int width, height;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "width", "height" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "width", "height" });
+ }
}
class XConfigureRequestEvent extends Structure {
@@ -1641,7 +1709,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window above;
public int detail; // Above, Below, TopIf, BottomIf, Opposite
public NativeLong value_mask;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "width", "height", "above", "detail", "value_mask" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "x", "y", "width", "height", "above", "detail", "value_mask" });
+ }
}
class XCirculateEvent extends Structure {
@@ -1652,7 +1722,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window event;
public Window window;
public int place; // PlaceOnTop, PlaceOnBottom
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "event", "window", "place" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "event", "window", "place" });
+ }
}
class XCirculateRequestEvent extends Structure {
@@ -1663,7 +1735,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window parent;
public Window window;
public int place; // PlaceOnTop, PlaceOnBottom
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "parent", "window", "place" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "parent", "window", "place" });
+ }
}
class XPropertyEvent extends Structure {
@@ -1675,7 +1749,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Atom atom;
public NativeLong time;
public int state; // NewValue, Deleted
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "atom", "time", "state" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "atom", "time", "state" });
+ }
}
class XSelectionClearEvent extends Structure {
@@ -1686,7 +1762,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Window window;
public Atom selection;
public NativeLong time;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "selection", "time" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "selection", "time" });
+ }
}
class XSelectionRequestEvent extends Structure {
@@ -1700,7 +1778,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Atom target;
public Atom property;
public NativeLong time;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "owner", "requestor", "selection", "target", "property", "time" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "owner", "requestor", "selection", "target", "property", "time" });
+ }
}
class XSelectionEvent extends Structure {
@@ -1713,7 +1793,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Atom target;
public Atom property; // ATOM or None
public NativeLong time;
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "requestor", "selection", "target", "property", "time" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "requestor", "selection", "target", "property", "time" });
+ }
}
class XColormapEvent extends Structure {
@@ -1725,7 +1807,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Colormap colormap; // COLORMAP or None
public int c_new; // C++
public int state; // ColormapInstalled, ColormapUninstalled
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "colormap", "c_new", "state" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "colormap", "c_new", "state" });
+ }
}
class XMappingEvent extends Structure {
@@ -1737,7 +1821,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public int request; // one of MappingModifier, MappingKeyboard, MappingPointer
public int first_keycode; // first keycode
public int count; // defines range of change w. first_keycode*/
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "request", "first_keycode", "count" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "request", "first_keycode", "count" });
+ }
}
class XErrorEvent extends Structure {
@@ -1748,7 +1834,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public byte request_code; // Major op-code of failed request
public byte minor_code; // Minor op-code of failed request
public XID resourceid; // resource id
- { setFieldOrder(new String[] { "type", "display", "serial", "error_code", "request_code", "minor_code", "resourceid" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "display", "serial", "error_code", "request_code", "minor_code", "resourceid" });
+ }
}
// generated on EnterWindow and FocusIn when KeyMapState selected
@@ -1759,7 +1847,9 @@ boolean XTranslateCoordinates(Display display, Window src_w, Window dest_w, int
public Display display; // Display the event was read from
public Window window;
public byte key_vector[] = new byte[32];
- { setFieldOrder(new String[] { "type", "serial", "send_event", "display", "window", "key_vector" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "type", "serial", "send_event", "display", "window", "key_vector" });
+ }
}
int XSelectInput(Display display, Window window, NativeLong eventMask);
@@ -1904,7 +1994,9 @@ int XPutImage(Display dpy, Drawable d, GC gc, XImage image,
class XModifierKeymapRef extends Structure implements Structure.ByReference{
public int max_keypermod; /* The server's max # of keys per modifier */
public Pointer modifiermap; /* An 8 by max_keypermod array of modifiers */
- { setFieldOrder(new String[] { "max_keypermod", "modifiermap" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "max_keypermod", "modifiermap" });
+ }
}
class XKeyboardControlRef extends Structure implements Structure.ByReference {
@@ -1925,7 +2017,9 @@ int XPutImage(Display dpy, Drawable d, GC gc, XImage image,
/** AutoRepeatModeOff, AutoRepeatModeOn, AutoRepeatModeDefault. */
public int auto_repeat_mode;
- { setFieldOrder(new String[] { "key_click_percent", "bell_percent", "bell_pitch", "bell_duration", "led", "led_mode", "key", "auto_repeat_mode" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "key_click_percent", "bell_percent", "bell_pitch", "bell_duration", "led", "led_mode", "key", "auto_repeat_mode" });
+ }
public String toString() {
return "XKeyboardControlByReference{" +
@@ -1957,7 +2051,9 @@ public String toString() {
/** Bit vector. Each bit set to 1 indicates that auto-repeat is enabled for the corresponding key. The vector is represented as 32 bytes. Byte N (from 0) contains the bits for keys 8N to 8N + 7 with the least significant bit in the byte representing key 8N. */
public byte auto_repeats[] = new byte[32];
- { setFieldOrder(new String[] { "key_click_percent", "bell_percent", "bell_pitch", "bell_duration", "led_mask", "global_auto_repeat", "auto_repeats" }); }
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "key_click_percent", "bell_percent", "bell_pitch", "bell_duration", "led_mask", "global_auto_repeat", "auto_repeats" });
+ }
public String toString() {
return "XKeyboardStateByReference{" +
View
38 contrib/platform/src/com/sun/jna/platform/win32/DsGetDC.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.WString;
@@ -100,6 +103,10 @@ public DOMAIN_CONTROLLER_INFO(Pointer memory) {
* subnet that the computer is in with a valid site.
*/
public WString ClientSiteName;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "DomainControllerName", "DomainControllerAddress", "DomainGuid", "DomainName", "DnsForestName", "Flags", "DcSiteName", "ClientSiteName"});
+ }
}
/**
@@ -112,6 +119,10 @@ public DOMAIN_CONTROLLER_INFO(Pointer memory) {
}
public DOMAIN_CONTROLLER_INFO.ByReference dci;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dci" });
+ }
}
/**
@@ -156,7 +167,6 @@ public DOMAIN_CONTROLLER_INFO(Pointer memory) {
public static class DS_DOMAIN_TRUSTS extends Structure {
public static class ByReference extends DS_DOMAIN_TRUSTS implements Structure.ByReference {
-
}
/**
@@ -194,6 +204,10 @@ public DOMAIN_CONTROLLER_INFO(Pointer memory) {
* Contains the GUID of the domain represented by this structure.
*/
public GUID DomainGuid;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "NetbiosDomainName", "DnsDomainName", "Flags", "ParentIndex", "TrustType", "TrustAttributes", "DomainSid", "DomainGuid" });
+ }
public DS_DOMAIN_TRUSTS() {
}
@@ -202,26 +216,4 @@ public DS_DOMAIN_TRUSTS(Pointer p) {
super(p);
}
};
-
- /**
- * A pointer to an array of DS_DOMAIN_TRUSTS.
- */
- public static class PDS_DOMAIN_TRUSTS extends Structure {
- public static class ByReference extends PDS_DOMAIN_TRUSTS implements Structure.ByReference {
-
- }
-
- public DS_DOMAIN_TRUSTS.ByReference t;
-
- /**
- * Returns domain trusts.
- * @param count
- * Number of domain trusts.
- * @return
- * An array of domain trusts.
- */
- public DS_DOMAIN_TRUSTS[] getTrusts(int count) {
- return (DS_DOMAIN_TRUSTS[]) t.toArray(count);
- }
- }
}
View
7 contrib/platform/src/com/sun/jna/platform/win32/Guid.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
@@ -89,5 +92,9 @@ public GUID(byte[] data) {
public short Data2;
public short Data3;
public byte[] Data4 = new byte[8];
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "Data1", "Data2", "Data3", "Data4" });
+ }
}
}
View
47 contrib/platform/src/com/sun/jna/platform/win32/LMAccess.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.WString;
@@ -36,6 +39,10 @@ public LOCALGROUP_INFO_0(Pointer memory) {
}
public WString lgrui0_name;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "lgrui0_name" });
+ }
}
public static class LOCALGROUP_INFO_1 extends Structure {
@@ -50,6 +57,9 @@ public LOCALGROUP_INFO_1(Pointer memory) {
public WString lgrui1_name;
public WString lgrui1_comment;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "lgrui1_name", "lgrui1_comment" });
+ }
}
//
@@ -80,6 +90,9 @@ public USER_INFO_0(Pointer memory) {
* Pointer to a Unicode string that specifies the name of the user account.
*/
public WString usri0_name;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "usri0_name" });
+ }
}
/**
@@ -136,6 +149,10 @@ public USER_INFO_1(Pointer memory) {
* logon script file.
*/
public WString usri1_script_path;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "usri1_name", "usri1_password", "usri1_password_age", "usri1_priv", "usri1_home_dir", "usri1_comment", "usri1_flags", "usri1_script_path" });
+ }
}
/**
@@ -206,7 +223,11 @@ public USER_INFO_23(Pointer memory) {
* A pointer to a SID structure that contains the security identifier (SID)
* that uniquely identifies the user. The NetUserAdd and NetUserSetInfo functions ignore this member.
*/
- public PSID.ByReference usri23_user_sid;
+ public PSID.ByReference usri23_user_sid;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "usri23_name", "usri23_full_name", "usri23_comment", "usri23_flags", "usri23_user_sid" });
+ }
}
/**
@@ -226,6 +247,10 @@ public GROUP_USERS_INFO_0(Pointer memory) {
* Pointer to a null-terminated Unicode character string that specifies a name.
*/
public WString grui0_name;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "grui0_name" });
+ }
}
/**
@@ -245,6 +270,10 @@ public LOCALGROUP_USERS_INFO_0(Pointer memory) {
* Pointer to a Unicode string specifying the name of a local group to which the user belongs.
*/
public WString lgrui0_name;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "lgrui0_name" });
+ }
}
/**
@@ -267,6 +296,10 @@ public GROUP_INFO_0(Pointer memory) {
* the name of the global group.
*/
public WString grpi0_name;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "grpi0_name" });
+ }
}
/**
@@ -294,6 +327,10 @@ public GROUP_INFO_1(Pointer memory) {
* string. The comment can contain MAXCOMMENTSZ characters.
*/
public WString grpi1_comment;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "grpi1_name", "grpi1_comment" });
+ }
}
/**
@@ -331,6 +368,10 @@ public GROUP_INFO_2(Pointer memory) {
* and SE_GROUP_ENABLED_BY_DEFAULT.
*/
public int grpi2_attributes;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "grpi2_name", "grpi2_comment", "grpi2_group_id", "grpi2_attributes" });
+ }
}
/**
@@ -368,6 +409,10 @@ public GROUP_INFO_3(Pointer memory) {
* SE_GROUP_ENABLED_BY_DEFAULT.
*/
public int grpi3_attributes;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "grpi3_name", "grpi3_comment", "grpi3_group_id", "grpi3_attributes" });
+ }
}
//
View
34 contrib/platform/src/com/sun/jna/platform/win32/NTSecApi.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Memory;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
@@ -52,6 +55,10 @@
*/
public Pointer Buffer;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "Length", "MaximumLength", "Buffer" });
+ }
+
/**
* String representation of the buffer.
* @return
@@ -97,11 +104,18 @@ public String getString() {
public PSID.ByReference Sid;
public LSA_UNICODE_STRING DnsName;
public LSA_UNICODE_STRING NetbiosName;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "Sid", "DnsName", "NetbiosName" });
+ }
}
public static class LSA_FOREST_TRUST_BINARY_DATA extends Structure {
public int Length;
public Pointer Buffer;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "Length", "Buffer" });
+ }
}
public static class LSA_FOREST_TRUST_RECORD extends Structure {
@@ -145,6 +159,10 @@ public String getString() {
*/
public UNION u;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "Flags", "ForestTrustType", "Time", "u" });
+ }
+
public void read() {
super.read();
@@ -170,7 +188,11 @@ public void read() {
}
- public LSA_FOREST_TRUST_RECORD.ByReference tr;
+ public LSA_FOREST_TRUST_RECORD.ByReference tr;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "tr" });
+ }
}
public static class LSA_FOREST_TRUST_INFORMATION extends Structure {
@@ -190,6 +212,10 @@ public void read() {
*/
public PLSA_FOREST_TRUST_RECORD.ByReference Entries;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "RecordCount", "Entries" });
+ }
+
/**
* Get an array of LSA_FOREST_TRUST_RECORD entries.
* @return
@@ -209,6 +235,10 @@ public void read() {
}
- public LSA_FOREST_TRUST_INFORMATION.ByReference fti;
+ public LSA_FOREST_TRUST_INFORMATION.ByReference fti;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "fti" });
+ }
}
}
View
1  contrib/platform/src/com/sun/jna/platform/win32/Netapi32.java
@@ -16,7 +16,6 @@
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.platform.win32.DsGetDC.PDOMAIN_CONTROLLER_INFO;
-import com.sun.jna.platform.win32.DsGetDC.PDS_DOMAIN_TRUSTS;
import com.sun.jna.platform.win32.Guid.GUID;
import com.sun.jna.platform.win32.NTSecApi.PLSA_FOREST_TRUST_INFORMATION;
import com.sun.jna.ptr.IntByReference;
View
11 contrib/platform/src/com/sun/jna/platform/win32/SetupApi.java
@@ -10,6 +10,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
@@ -282,6 +285,10 @@ public SP_DEVICE_INTERFACE_DATA(Pointer memory) {
* Reserved. Do not use.
*/
public Pointer Reserved;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "cbSize", "InterfaceClassGuid", "Flags", "Reserved" });
+ }
}
/**
@@ -330,5 +337,9 @@ public SP_DEVINFO_DATA(Pointer memory) {
* Reserved. For internal use only.
*/
public Pointer Reserved;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "cbSize", "InterfaceClassGuid", "DevInst", "Reserved" });
+ }
}
}
View
7 contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Platform;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
@@ -98,6 +101,10 @@
* A pointer to the title of a progress dialog box. This is a null-terminated string.
*/
public WString lpszProgressTitle;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "hwnd", "wFunc", "pFrom", "pTo", "fFlags", "fAnyOperationsAborted", "pNameMappings", "lpszProgressTitle" });
+ }
/** Use this to encode <code>pFrom/pTo</code> paths. */
public String encodePaths(String[] paths) {
View
57 contrib/platform/src/com/sun/jna/platform/win32/Sspi.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Memory;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
@@ -136,17 +139,18 @@
public static class SecHandle extends Structure {
public Pointer dwLower;
public Pointer dwUpper;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwLower", "dwUpper" });
+ }
public static class ByReference extends SecHandle implements Structure.ByReference {
-
}
/**
* An empty SecHandle.
*/
public SecHandle() {
- dwLower = null;
- dwUpper = null;
}
/**
@@ -165,16 +169,18 @@ public boolean isNull() {
public static class PSecHandle extends Structure {
public static class ByReference extends PSecHandle implements Structure.ByReference {
-
}
/**
* The first entry in an array of SecPkgInfo structures.
*/
public SecHandle.ByReference secHandle;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "secHandle" });
+ }
public PSecHandle() {
-
}
public PSecHandle(SecHandle h) {
@@ -209,7 +215,6 @@ public PSecHandle(SecHandle h) {
* Create a SECBUFFER_EMPTY SecBuffer.
*/
public ByReference() {
-
}
/**
@@ -245,19 +250,20 @@ public ByReference(int type, byte[] token) {
* Bit flags that indicate the type of buffer. Must be one of the values of
* the SecBufferType enumeration.
*/
- public int BufferType;
+ public int BufferType = SECBUFFER_EMPTY;
/**
* A pointer to a buffer.
*/
public Pointer pvBuffer;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "cbBuffer", "BufferType", "pvBuffer" });
+ }
/**
* Create a new SECBUFFER_EMPTY buffer.
*/
public SecBuffer() {
- cbBuffer = 0;
- pvBuffer = null;
- BufferType = SECBUFFER_EMPTY;
}
/**
@@ -271,7 +277,6 @@ public SecBuffer(int type, int size) {
cbBuffer = size;
pvBuffer = new Memory(size);
BufferType = type;
- allocateMemory();
}
/**
@@ -286,7 +291,6 @@ public SecBuffer(int type, byte[] token) {
pvBuffer = new Memory(token.length);
pvBuffer.write(0, token, 0, token.length);
BufferType = type;
- allocateMemory();
}
/**
@@ -295,7 +299,7 @@ public SecBuffer(int type, byte[] token) {
* Raw buffer bytes.
*/
public byte[] getBytes() {
- return pvBuffer.getByteArray(0, cbBuffer);
+ return pvBuffer == null ? null : pvBuffer.getByteArray(0, cbBuffer);
}
}
@@ -314,6 +318,10 @@ public SecBuffer(int type, byte[] token) {
*/
public SecBuffer.ByReference[] pBuffers;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "ulVersion", "cBuffers", "pBuffers" });
+ }
+
/**
* Create a new SecBufferDesc with one SECBUFFER_EMPTY buffer.
*/
@@ -370,13 +378,15 @@ public SecBufferDesc(int type, int tokenSize) {
public static class SECURITY_INTEGER extends Structure {
public int dwLower;
public int dwUpper;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwLower", "dwUpper" });
+ }
/**
* An security integer of 0.
*/
public SECURITY_INTEGER() {
- dwLower = 0;
- dwUpper = 0;
}
}
@@ -384,7 +394,6 @@ public SECURITY_INTEGER() {
* A timestamp.
*/
public static class TimeStamp extends SECURITY_INTEGER {
-
}
/**
@@ -401,8 +410,11 @@ public SECURITY_INTEGER() {
*/
public SecPkgInfo.ByReference pPkgInfo;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "pPkgInfo" });
+ }
+
public PSecPkgInfo() {
-
}
/**
@@ -423,7 +435,6 @@ public PSecPkgInfo() {
* A reference pointer to a SecPkgInfo structure.
*/
public static class ByReference extends SecPkgInfo implements Structure.ByReference {
-
}
/**
@@ -433,7 +444,7 @@ public PSecPkgInfo() {
/**
* Specifies the version of the package protocol. Must be 1.
*/
- public short wVersion;
+ public short wVersion = 1;
/**
* Specifies a DCE RPC identifier, if appropriate. If the package does not implement one of
* the DCE registered security systems, the reserved value SECPKG_ID_NONE is used.
@@ -453,14 +464,14 @@ public PSecPkgInfo() {
*/
public WString Comment;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "fCapabilities", "wVersion", "wRPCID", "cbMaxToken", "Name", "Comment" });
+ }
+
/**
* Create a new package info.
*/
public SecPkgInfo() {
- fCapabilities = 0;
- wVersion = 1;
- wRPCID = 0;
- cbMaxToken = 0;
}
}
}
View
7 contrib/platform/src/com/sun/jna/platform/win32/Tlhelp32.java
@@ -10,6 +10,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.win32.StdCallLibrary;
@@ -135,5 +138,9 @@ public PROCESSENTRY32(Pointer memory) {
* retrieve the full path of the executable file for a 64-bit process.
*/
public char[] szExeFile = new char[WinDef.MAX_PATH];
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwSize", "cntUsage", "th32ProcessID", "th32DefaultHeapID", "th32ModuleID", "cntThreads", "th32ParentProcessID", "pcPriClassBase", "dwFlags" });
+ }
}
}
View
7 contrib/platform/src/com/sun/jna/platform/win32/VerRsrc.java
@@ -10,6 +10,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.win32.StdCallLibrary;
@@ -113,5 +116,9 @@ public VS_FIXEDFILEINFO(Pointer memory) {
* The least significant 32 bits of the file's 64-bit binary creation date and time stamp.
*/
public WinDef.DWORD dwFileDateLS;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwSignature", "dwStrucVersion", "dwFileVersionMS", "dwFileVersionLS", "dwProductVersionMS", "dwProductVersionLS", "dwFielFlagsMask", "dwFileFlags", "dwFileOS", "dwFileType", "dwFileSubtype", "dwFileDateMS", "dwFileDateLS" });
+ }
}
}
View
7 contrib/platform/src/com/sun/jna/platform/win32/Wdm.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
@@ -61,6 +64,10 @@ public KEY_BASIC_INFORMATION(Pointer memory) {
* The string is not null-terminated.
*/
public char[] Name;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "LastWriteTime", "TitleIndex", "NameLength", "Name" });
+ }
/**
* Name of the key.
* @return String.
View
40 contrib/platform/src/com/sun/jna/platform/win32/WinBase.java
@@ -12,7 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
import java.util.Date;
+import java.util.List;
import com.sun.jna.Platform;
import com.sun.jna.Pointer;
@@ -169,7 +171,11 @@
*/
public static class FILETIME extends Structure {
public int dwLowDateTime;
- public int dwHighDateTime;
+ public int dwHighDateTime;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwLowDateTime", "dwHighDateTime" });
+ }
public static class ByReference extends FILETIME implements Structure.ByReference {
public ByReference() {
@@ -292,6 +298,10 @@ public String toString() {
public short wSecond;
// The millisecond. The valid values for this member are 0 through 999.
public short wMilliseconds;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "wYear", "wMonth", "wDayOfWeek", "wDay", "wHour", "wMinute", "wSecond", "wMilliseconds" });
+ }
}
/**
@@ -380,6 +390,10 @@ public String toString() {
public int Offset;
public int OffsetHigh;
public HANDLE hEvent;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "Internal", "InternalHigh", "Offset", "OffsetHigh", "hEvent" });
+ }
}
int INFINITE = 0xFFFFFFFF;
@@ -412,6 +426,10 @@ public String toString() {
* Reserved for future use.
*/
public WORD wReserved;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "wProcessorArchitecture", "wReserved" });
+ }
}
/** Unnamed inner union. */
@@ -482,6 +500,10 @@ public String toString() {
* Architecture-dependent processor revision.
*/
public WORD wProcessorRevision;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "processorArchitecture", "dwPageSize", "lpMinimumApplicationAddress", "lpMaximumApplicationAddress", "dwActiveProcessorMask", "dwNumberOfProcessors", "dwProcessorType", "dwAllocationGranularity", "wProcessorLevel", "wProcessorRevision"});
+ }
}
/**
@@ -531,6 +553,10 @@ public String toString() {
*/
public DWORDLONG ullAvailExtendedVirtual;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwLength", "dwMemoryLoad", "ullTotalPhys", "ullAvailPhys", "ullTotalPageFile", "ullAvailPageFile", "ullTotalVirtual", "ullAvailVirtual", "ullAvailExtendedVirtual" });
+ }
+
public MEMORYSTATUSEX() {
dwLength = new DWORD(size());
}
@@ -560,6 +586,10 @@ public MEMORYSTATUSEX() {
*/
public boolean bInheritHandle;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwLength", "lpSecurityDescriptor", "bInheritHandle" });
+ }
+
public SECURITY_ATTRIBUTES() {
dwLength = new DWORD(size());
}
@@ -732,6 +762,10 @@ public SECURITY_ATTRIBUTES() {
*/
public HANDLE hStdError;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "cb", "lpReserved", "lpDesktop", "lpTitle", "dwX", "dwY", "dwXSize", "dwYSize", "dwXCountChars", "dwYCountChars", "dwFillAttribute", "dwFlags", "wShowWindow", "cbReserved2", "lpReserved2", "hStdInput", "hStdOutput", "hStdError" });
+ }
+
public STARTUPINFO() {
cb = new DWORD(size());
}
@@ -773,6 +807,10 @@ public STARTUPINFO() {
* identifier may be reused.
*/
public DWORD dwThreadId;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "hProcess", "hThread", "dwProcessID", "dwThreadId" });
+ }
public static class ByReference extends PROCESS_INFORMATION implements Structure.ByReference {
public ByReference() {
View
10 contrib/platform/src/com/sun/jna/platform/win32/WinCrypt.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Memory;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
@@ -59,6 +62,9 @@ public DATA_BLOB(String s) {
*/
public Pointer pbData;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "cbData", "pbData" });
+ }
/**
* Get byte data.
* @return
@@ -100,6 +106,10 @@ public CRYPTPROTECT_PROMPTSTRUCT(Pointer memory) {
* A string containing the text of a prompt to be displayed.
*/
public String szPrompt;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "cbSize", "dwPromptFlags", "hwndApp", "szPrompt" });
+ }
}
//
View
6 contrib/platform/src/com/sun/jna/platform/win32/WinDef.java
@@ -13,6 +13,8 @@
package com.sun.jna.platform.win32;
import java.awt.Rectangle;
+import java.util.Arrays;
+import java.util.List;
import com.sun.jna.IntegerType;
import com.sun.jna.Native;
@@ -323,6 +325,10 @@ public WPARAM(long value) {
public int right;
public int bottom;
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "left", "top", "right", "bottom" });
+ }
+
public Rectangle toRectangle() {
return new Rectangle(left, top, right-left, bottom-top);
}
View
21 contrib/platform/src/com/sun/jna/platform/win32/WinGDI.java
@@ -12,6 +12,9 @@
*/
package com.sun.jna.platform.win32;
+import java.util.Arrays;
+import java.util.List;
+
import com.sun.jna.Structure;
import com.sun.jna.platform.win32.WinDef.RECT;
import com.sun.jna.win32.StdCallLibrary;
@@ -30,11 +33,20 @@
public int nCount;
public int nRgnSize;
public RECT rcBound;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "dwSize", "iType", "nCount", "nRgnSize", "rcBound" });
+ }
}
public class RGNDATA extends Structure {
public RGNDATAHEADER rdh;
public byte[] Buffer;
+
+ protected List getFieldOrder() {
+ return Arrays.asList(new String[] { "rdh", "Buffer" });
+ }
+
public RGNDATA(int bufferSize) {
Buffer = new byte[bufferSize];
allocateMemory();
@@ -74,6 +86,9 @@ public RGNDATA(int bufferSize) {
public int biYPelsPerMeter;
public int biClrUsed;
public</