org.purejava.appindicator._GtkGLAreaClass 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 _GtkGLAreaClass {
* struct _GtkWidgetClass parent_class;
* int (*render)(struct _GtkGLArea*,struct _GdkGLContext*);
* void (*resize)(struct _GtkGLArea*,int,int);
* struct _GdkGLContext* (*create_context)(struct _GtkGLArea*);
* void* _padding[6];
* };
* }
*/
public class _GtkGLAreaClass {
public static MemoryLayout $LAYOUT() {
return constants$2743.const$4;
}
public static MemorySegment parent_class$slice(MemorySegment seg) {
return seg.asSlice(0, 824);
}
/**
* {@snippet :
* int (*render)(struct _GtkGLArea*,struct _GdkGLContext*);
* }
*/
public interface render {
int apply(java.lang.foreign.MemorySegment filter_info, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(render fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$2743.const$5, fi, constants$9.const$0, scope);
}
static render ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _filter_info, java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$12.const$1.invokeExact(symbol, _filter_info, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle render$VH() {
return constants$2744.const$0;
}
/**
* Getter for field:
* {@snippet :
* int (*render)(struct _GtkGLArea*,struct _GdkGLContext*);
* }
*/
public static MemorySegment render$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$2744.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*render)(struct _GtkGLArea*,struct _GdkGLContext*);
* }
*/
public static void render$set(MemorySegment seg, MemorySegment x) {
constants$2744.const$0.set(seg, x);
}
public static MemorySegment render$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$2744.const$0.get(seg.asSlice(index*sizeof()));
}
public static void render$set(MemorySegment seg, long index, MemorySegment x) {
constants$2744.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static render render(MemorySegment segment, Arena scope) {
return render.ofAddress(render$get(segment), scope);
}
/**
* {@snippet :
* void (*resize)(struct _GtkGLArea*,int,int);
* }
*/
public interface resize {
void apply(java.lang.foreign.MemorySegment _x0, int _x1, int _x2);
static MemorySegment allocate(resize fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$2744.const$1, fi, constants$467.const$3, scope);
}
static resize ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2) -> {
try {
constants$1901.const$2.invokeExact(symbol, __x0, __x1, __x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle resize$VH() {
return constants$2744.const$2;
}
/**
* Getter for field:
* {@snippet :
* void (*resize)(struct _GtkGLArea*,int,int);
* }
*/
public static MemorySegment resize$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$2744.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*resize)(struct _GtkGLArea*,int,int);
* }
*/
public static void resize$set(MemorySegment seg, MemorySegment x) {
constants$2744.const$2.set(seg, x);
}
public static MemorySegment resize$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$2744.const$2.get(seg.asSlice(index*sizeof()));
}
public static void resize$set(MemorySegment seg, long index, MemorySegment x) {
constants$2744.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static resize resize(MemorySegment segment, Arena scope) {
return resize.ofAddress(resize$get(segment), scope);
}
/**
* {@snippet :
* struct _GdkGLContext* (*create_context)(struct _GtkGLArea*);
* }
*/
public interface create_context {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(create_context fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$2744.const$3, fi, constants$5.const$2, scope);
}
static create_context 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 create_context$VH() {
return constants$2744.const$4;
}
/**
* Getter for field:
* {@snippet :
* struct _GdkGLContext* (*create_context)(struct _GtkGLArea*);
* }
*/
public static MemorySegment create_context$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$2744.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* struct _GdkGLContext* (*create_context)(struct _GtkGLArea*);
* }
*/
public static void create_context$set(MemorySegment seg, MemorySegment x) {
constants$2744.const$4.set(seg, x);
}
public static MemorySegment create_context$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$2744.const$4.get(seg.asSlice(index*sizeof()));
}
public static void create_context$set(MemorySegment seg, long index, MemorySegment x) {
constants$2744.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static create_context create_context(MemorySegment segment, Arena scope) {
return create_context.ofAddress(create_context$get(segment), scope);
}
public static MemorySegment _padding$slice(MemorySegment seg) {
return seg.asSlice(848, 48);
}
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); }
}