mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
platform: JNA updated to 4.1.0 (code)
This commit is contained in:
+9
@@ -24,7 +24,9 @@ import com.sun.jna.win32.StdCallLibrary;
|
||||
import com.sun.jna.win32.W32APIFunctionMapper;
|
||||
import com.sun.jna.win32.W32APITypeMapper;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.sun.jna.Library.OPTION_FUNCTION_MAPPER;
|
||||
@@ -123,8 +125,15 @@ public class WindowsCryptUtils {
|
||||
DATA_BLOB pDataOut);
|
||||
|
||||
class DATA_BLOB extends Structure implements Structure.ByReference {
|
||||
private static final List __FIELDS = Arrays.asList("cbData", "pbData");
|
||||
|
||||
public W32API.DWORD cbData;
|
||||
public Pointer pbData;
|
||||
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return __FIELDS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -350,6 +352,8 @@ public class Foundation {
|
||||
}
|
||||
|
||||
public static class NSRect extends Structure implements Structure.ByValue {
|
||||
private static final List __FIELDS = Arrays.asList("origin", "size");
|
||||
|
||||
public NSPoint origin;
|
||||
public NSSize size;
|
||||
|
||||
@@ -357,9 +361,16 @@ public class Foundation {
|
||||
origin = new NSPoint(x, y);
|
||||
size = new NSSize(w, h);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return __FIELDS;
|
||||
}
|
||||
}
|
||||
|
||||
public static class NSPoint extends Structure implements Structure.ByValue {
|
||||
private static final List __FIELDS = Arrays.asList("x", "y");
|
||||
|
||||
public CGFloat x;
|
||||
public CGFloat y;
|
||||
|
||||
@@ -372,9 +383,16 @@ public class Foundation {
|
||||
this.x = new CGFloat(x);
|
||||
this.y = new CGFloat(y);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return __FIELDS;
|
||||
}
|
||||
}
|
||||
|
||||
public static class NSSize extends Structure implements Structure.ByValue {
|
||||
private static final List __FIELDS = Arrays.asList("width", "height");
|
||||
|
||||
public CGFloat width;
|
||||
public CGFloat height;
|
||||
|
||||
@@ -387,6 +405,11 @@ public class Foundation {
|
||||
this.width = new CGFloat(width);
|
||||
this.height = new CGFloat(height);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return __FIELDS;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CGFloat implements NativeMapped {
|
||||
|
||||
@@ -21,6 +21,9 @@ import com.sun.jna.platform.win32.WinDef;
|
||||
import com.sun.jna.ptr.IntByReference;
|
||||
import com.sun.jna.ptr.LongByReference;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public interface Win32RestartManager extends Library {
|
||||
|
||||
Win32RestartManager INSTANCE = (Win32RestartManager) Native.loadLibrary("Rstrtmgr", Win32RestartManager.class);
|
||||
@@ -30,11 +33,21 @@ public interface Win32RestartManager extends Library {
|
||||
int CCH_RM_MAX_SVC_NAME = 63;
|
||||
|
||||
class RmUniqueProcess extends Structure {
|
||||
private static final List __FIELDS = Arrays.asList("dwProcessId", "ProcessStartTime");
|
||||
|
||||
public int dwProcessId;
|
||||
public WinBase.FILETIME ProcessStartTime;
|
||||
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return __FIELDS;
|
||||
}
|
||||
}
|
||||
|
||||
class RmProcessInfo extends Structure {
|
||||
private static final List __FIELDS = Arrays.asList(
|
||||
"Process", "strAppName", "strServiceShortName", "ApplicationType", "AppStatus", "TSSessionId", "bRestartable");
|
||||
|
||||
public RmUniqueProcess Process;
|
||||
public char[] strAppName = new char[CCH_RM_MAX_APP_NAME + 1];
|
||||
public char[] strServiceShortName = new char[CCH_RM_MAX_SVC_NAME + 1];
|
||||
@@ -42,6 +55,11 @@ public interface Win32RestartManager extends Library {
|
||||
public WinDef.LONG AppStatus;
|
||||
public int TSSessionId;
|
||||
public boolean bRestartable;
|
||||
|
||||
@Override
|
||||
protected List getFieldOrder() {
|
||||
return __FIELDS;
|
||||
}
|
||||
}
|
||||
|
||||
int RmGetList(int dwSessionHandle,
|
||||
|
||||
Reference in New Issue
Block a user