org.purejava.appindicator._GTlsBackendInterface Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libappindicator-gtk3-java-full Show documentation
Show all versions of libappindicator-gtk3-java-full Show documentation
Java bindings for libappindicator-gtk3 in 100% pure Java
// Generated by jextract
package org.purejava.appindicator;
import java.lang.foreign.Arena;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;
import java.lang.invoke.VarHandle;
/**
* {@snippet :
* struct _GTlsBackendInterface {
* struct _GTypeInterface g_iface;
* int (*supports_tls)(struct _GTlsBackend*);
* unsigned long (*get_certificate_type)();
* unsigned long (*get_client_connection_type)();
* unsigned long (*get_server_connection_type)();
* unsigned long (*get_file_database_type)();
* struct _GTlsDatabase* (*get_default_database)(struct _GTlsBackend*);
* int (*supports_dtls)(struct _GTlsBackend*);
* unsigned long (*get_dtls_client_connection_type)();
* unsigned long (*get_dtls_server_connection_type)();
* };
* }
*/
public class _GTlsBackendInterface {
public static MemoryLayout $LAYOUT() {
return constants$1346.const$0;
}
public static MemorySegment g_iface$slice(MemorySegment seg) {
return seg.asSlice(0, 16);
}
/**
* {@snippet :
* int (*supports_tls)(struct _GTlsBackend*);
* }
*/
public interface supports_tls {
int apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(supports_tls fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1346.const$1, fi, constants$10.const$5, scope);
}
static supports_tls ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$14.const$2.invokeExact(symbol, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle supports_tls$VH() {
return constants$1346.const$2;
}
/**
* Getter for field:
* {@snippet :
* int (*supports_tls)(struct _GTlsBackend*);
* }
*/
public static MemorySegment supports_tls$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1346.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*supports_tls)(struct _GTlsBackend*);
* }
*/
public static void supports_tls$set(MemorySegment seg, MemorySegment x) {
constants$1346.const$2.set(seg, x);
}
public static MemorySegment supports_tls$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1346.const$2.get(seg.asSlice(index*sizeof()));
}
public static void supports_tls$set(MemorySegment seg, long index, MemorySegment x) {
constants$1346.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static supports_tls supports_tls(MemorySegment segment, Arena scope) {
return supports_tls.ofAddress(supports_tls$get(segment), scope);
}
/**
* {@snippet :
* unsigned long (*get_certificate_type)();
* }
*/
public interface get_certificate_type {
long apply();
static MemorySegment allocate(get_certificate_type fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1346.const$3, fi, constants$3.const$5, scope);
}
static get_certificate_type ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
return (long)constants$511.const$2.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_certificate_type$VH() {
return constants$1346.const$4;
}
/**
* Getter for field:
* {@snippet :
* unsigned long (*get_certificate_type)();
* }
*/
public static MemorySegment get_certificate_type$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1346.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* unsigned long (*get_certificate_type)();
* }
*/
public static void get_certificate_type$set(MemorySegment seg, MemorySegment x) {
constants$1346.const$4.set(seg, x);
}
public static MemorySegment get_certificate_type$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1346.const$4.get(seg.asSlice(index*sizeof()));
}
public static void get_certificate_type$set(MemorySegment seg, long index, MemorySegment x) {
constants$1346.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static get_certificate_type get_certificate_type(MemorySegment segment, Arena scope) {
return get_certificate_type.ofAddress(get_certificate_type$get(segment), scope);
}
/**
* {@snippet :
* unsigned long (*get_client_connection_type)();
* }
*/
public interface get_client_connection_type {
long apply();
static MemorySegment allocate(get_client_connection_type fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1346.const$5, fi, constants$3.const$5, scope);
}
static get_client_connection_type ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
return (long)constants$511.const$2.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_client_connection_type$VH() {
return constants$1347.const$0;
}
/**
* Getter for field:
* {@snippet :
* unsigned long (*get_client_connection_type)();
* }
*/
public static MemorySegment get_client_connection_type$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1347.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* unsigned long (*get_client_connection_type)();
* }
*/
public static void get_client_connection_type$set(MemorySegment seg, MemorySegment x) {
constants$1347.const$0.set(seg, x);
}
public static MemorySegment get_client_connection_type$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1347.const$0.get(seg.asSlice(index*sizeof()));
}
public static void get_client_connection_type$set(MemorySegment seg, long index, MemorySegment x) {
constants$1347.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static get_client_connection_type get_client_connection_type(MemorySegment segment, Arena scope) {
return get_client_connection_type.ofAddress(get_client_connection_type$get(segment), scope);
}
/**
* {@snippet :
* unsigned long (*get_server_connection_type)();
* }
*/
public interface get_server_connection_type {
long apply();
static MemorySegment allocate(get_server_connection_type fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1347.const$1, fi, constants$3.const$5, scope);
}
static get_server_connection_type ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
return (long)constants$511.const$2.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_server_connection_type$VH() {
return constants$1347.const$2;
}
/**
* Getter for field:
* {@snippet :
* unsigned long (*get_server_connection_type)();
* }
*/
public static MemorySegment get_server_connection_type$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1347.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* unsigned long (*get_server_connection_type)();
* }
*/
public static void get_server_connection_type$set(MemorySegment seg, MemorySegment x) {
constants$1347.const$2.set(seg, x);
}
public static MemorySegment get_server_connection_type$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1347.const$2.get(seg.asSlice(index*sizeof()));
}
public static void get_server_connection_type$set(MemorySegment seg, long index, MemorySegment x) {
constants$1347.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static get_server_connection_type get_server_connection_type(MemorySegment segment, Arena scope) {
return get_server_connection_type.ofAddress(get_server_connection_type$get(segment), scope);
}
/**
* {@snippet :
* unsigned long (*get_file_database_type)();
* }
*/
public interface get_file_database_type {
long apply();
static MemorySegment allocate(get_file_database_type fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1347.const$3, fi, constants$3.const$5, scope);
}
static get_file_database_type ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
return (long)constants$511.const$2.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_file_database_type$VH() {
return constants$1347.const$4;
}
/**
* Getter for field:
* {@snippet :
* unsigned long (*get_file_database_type)();
* }
*/
public static MemorySegment get_file_database_type$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1347.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* unsigned long (*get_file_database_type)();
* }
*/
public static void get_file_database_type$set(MemorySegment seg, MemorySegment x) {
constants$1347.const$4.set(seg, x);
}
public static MemorySegment get_file_database_type$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1347.const$4.get(seg.asSlice(index*sizeof()));
}
public static void get_file_database_type$set(MemorySegment seg, long index, MemorySegment x) {
constants$1347.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static get_file_database_type get_file_database_type(MemorySegment segment, Arena scope) {
return get_file_database_type.ofAddress(get_file_database_type$get(segment), scope);
}
/**
* {@snippet :
* struct _GTlsDatabase* (*get_default_database)(struct _GTlsBackend*);
* }
*/
public interface get_default_database {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(get_default_database fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1347.const$5, fi, constants$5.const$2, scope);
}
static get_default_database ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _user_data) -> {
try {
return (java.lang.foreign.MemorySegment)constants$99.const$0.invokeExact(symbol, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_default_database$VH() {
return constants$1348.const$0;
}
/**
* Getter for field:
* {@snippet :
* struct _GTlsDatabase* (*get_default_database)(struct _GTlsBackend*);
* }
*/
public static MemorySegment get_default_database$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1348.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* struct _GTlsDatabase* (*get_default_database)(struct _GTlsBackend*);
* }
*/
public static void get_default_database$set(MemorySegment seg, MemorySegment x) {
constants$1348.const$0.set(seg, x);
}
public static MemorySegment get_default_database$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1348.const$0.get(seg.asSlice(index*sizeof()));
}
public static void get_default_database$set(MemorySegment seg, long index, MemorySegment x) {
constants$1348.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static get_default_database get_default_database(MemorySegment segment, Arena scope) {
return get_default_database.ofAddress(get_default_database$get(segment), scope);
}
/**
* {@snippet :
* int (*supports_dtls)(struct _GTlsBackend*);
* }
*/
public interface supports_dtls {
int apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(supports_dtls fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1348.const$1, fi, constants$10.const$5, scope);
}
static supports_dtls ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$14.const$2.invokeExact(symbol, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle supports_dtls$VH() {
return constants$1348.const$2;
}
/**
* Getter for field:
* {@snippet :
* int (*supports_dtls)(struct _GTlsBackend*);
* }
*/
public static MemorySegment supports_dtls$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1348.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*supports_dtls)(struct _GTlsBackend*);
* }
*/
public static void supports_dtls$set(MemorySegment seg, MemorySegment x) {
constants$1348.const$2.set(seg, x);
}
public static MemorySegment supports_dtls$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1348.const$2.get(seg.asSlice(index*sizeof()));
}
public static void supports_dtls$set(MemorySegment seg, long index, MemorySegment x) {
constants$1348.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static supports_dtls supports_dtls(MemorySegment segment, Arena scope) {
return supports_dtls.ofAddress(supports_dtls$get(segment), scope);
}
/**
* {@snippet :
* unsigned long (*get_dtls_client_connection_type)();
* }
*/
public interface get_dtls_client_connection_type {
long apply();
static MemorySegment allocate(get_dtls_client_connection_type fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1348.const$3, fi, constants$3.const$5, scope);
}
static get_dtls_client_connection_type ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
return (long)constants$511.const$2.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_dtls_client_connection_type$VH() {
return constants$1348.const$4;
}
/**
* Getter for field:
* {@snippet :
* unsigned long (*get_dtls_client_connection_type)();
* }
*/
public static MemorySegment get_dtls_client_connection_type$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1348.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* unsigned long (*get_dtls_client_connection_type)();
* }
*/
public static void get_dtls_client_connection_type$set(MemorySegment seg, MemorySegment x) {
constants$1348.const$4.set(seg, x);
}
public static MemorySegment get_dtls_client_connection_type$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1348.const$4.get(seg.asSlice(index*sizeof()));
}
public static void get_dtls_client_connection_type$set(MemorySegment seg, long index, MemorySegment x) {
constants$1348.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static get_dtls_client_connection_type get_dtls_client_connection_type(MemorySegment segment, Arena scope) {
return get_dtls_client_connection_type.ofAddress(get_dtls_client_connection_type$get(segment), scope);
}
/**
* {@snippet :
* unsigned long (*get_dtls_server_connection_type)();
* }
*/
public interface get_dtls_server_connection_type {
long apply();
static MemorySegment allocate(get_dtls_server_connection_type fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1348.const$5, fi, constants$3.const$5, scope);
}
static get_dtls_server_connection_type ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
return (long)constants$511.const$2.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_dtls_server_connection_type$VH() {
return constants$1349.const$0;
}
/**
* Getter for field:
* {@snippet :
* unsigned long (*get_dtls_server_connection_type)();
* }
*/
public static MemorySegment get_dtls_server_connection_type$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1349.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* unsigned long (*get_dtls_server_connection_type)();
* }
*/
public static void get_dtls_server_connection_type$set(MemorySegment seg, MemorySegment x) {
constants$1349.const$0.set(seg, x);
}
public static MemorySegment get_dtls_server_connection_type$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1349.const$0.get(seg.asSlice(index*sizeof()));
}
public static void get_dtls_server_connection_type$set(MemorySegment seg, long index, MemorySegment x) {
constants$1349.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static get_dtls_server_connection_type get_dtls_server_connection_type(MemorySegment segment, Arena scope) {
return get_dtls_server_connection_type.ofAddress(get_dtls_server_connection_type$get(segment), scope);
}
public static long sizeof() { return $LAYOUT().byteSize(); }
public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); }
public static MemorySegment allocateArray(long len, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT()));
}
public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); }
}