org.purejava.appindicator._GtkTreeDragDestIface 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 _GtkTreeDragDestIface {
* struct _GTypeInterface g_iface;
* int (*drag_data_received)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* int (*row_drop_possible)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* };
* }
*/
public class _GtkTreeDragDestIface {
public static MemoryLayout $LAYOUT() {
return constants$3189.const$0;
}
public static MemorySegment g_iface$slice(MemorySegment seg) {
return seg.asSlice(0, 16);
}
/**
* {@snippet :
* int (*drag_data_received)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* }
*/
public interface drag_data_received {
int apply(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(drag_data_received fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3189.const$1, fi, constants$12.const$2, scope);
}
static drag_data_received ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _a, java.lang.foreign.MemorySegment _b, java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$12.const$4.invokeExact(symbol, _a, _b, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle drag_data_received$VH() {
return constants$3189.const$2;
}
/**
* Getter for field:
* {@snippet :
* int (*drag_data_received)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* }
*/
public static MemorySegment drag_data_received$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3189.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*drag_data_received)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* }
*/
public static void drag_data_received$set(MemorySegment seg, MemorySegment x) {
constants$3189.const$2.set(seg, x);
}
public static MemorySegment drag_data_received$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3189.const$2.get(seg.asSlice(index*sizeof()));
}
public static void drag_data_received$set(MemorySegment seg, long index, MemorySegment x) {
constants$3189.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static drag_data_received drag_data_received(MemorySegment segment, Arena scope) {
return drag_data_received.ofAddress(drag_data_received$get(segment), scope);
}
/**
* {@snippet :
* int (*row_drop_possible)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* }
*/
public interface row_drop_possible {
int apply(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(row_drop_possible fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3189.const$3, fi, constants$12.const$2, scope);
}
static row_drop_possible ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _a, java.lang.foreign.MemorySegment _b, java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$12.const$4.invokeExact(symbol, _a, _b, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle row_drop_possible$VH() {
return constants$3189.const$4;
}
/**
* Getter for field:
* {@snippet :
* int (*row_drop_possible)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* }
*/
public static MemorySegment row_drop_possible$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3189.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*row_drop_possible)(struct _GtkTreeDragDest*,struct _GtkTreePath*,struct _GtkSelectionData*);
* }
*/
public static void row_drop_possible$set(MemorySegment seg, MemorySegment x) {
constants$3189.const$4.set(seg, x);
}
public static MemorySegment row_drop_possible$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3189.const$4.get(seg.asSlice(index*sizeof()));
}
public static void row_drop_possible$set(MemorySegment seg, long index, MemorySegment x) {
constants$3189.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static row_drop_possible row_drop_possible(MemorySegment segment, Arena scope) {
return row_drop_possible.ofAddress(row_drop_possible$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); }
}