org.purejava.appindicator._GtkScaleClass 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 _GtkScaleClass {
* struct _GtkRangeClass parent_class;
* char* (*format_value)(struct _GtkScale*,double);
* void (*draw_value)(struct _GtkScale*);
* void (*get_layout_offsets)(struct _GtkScale*,int*,int*);
* void (*_gtk_reserved1)();
* void (*_gtk_reserved2)();
* void (*_gtk_reserved3)();
* void (*_gtk_reserved4)();
* };
* }
*/
public class _GtkScaleClass {
public static MemoryLayout $LAYOUT() {
return constants$3047.const$2;
}
public static MemorySegment parent_class$slice(MemorySegment seg) {
return seg.asSlice(0, 912);
}
/**
* {@snippet :
* char* (*format_value)(struct _GtkScale*,double);
* }
*/
public interface format_value {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, double _x1);
static MemorySegment allocate(format_value fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3047.const$3, fi, constants$154.const$4, scope);
}
static format_value ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment __x0, double __x1) -> {
try {
return (java.lang.foreign.MemorySegment)constants$3047.const$4.invokeExact(symbol, __x0, __x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle format_value$VH() {
return constants$3047.const$5;
}
/**
* Getter for field:
* {@snippet :
* char* (*format_value)(struct _GtkScale*,double);
* }
*/
public static MemorySegment format_value$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3047.const$5.get(seg);
}
/**
* Setter for field:
* {@snippet :
* char* (*format_value)(struct _GtkScale*,double);
* }
*/
public static void format_value$set(MemorySegment seg, MemorySegment x) {
constants$3047.const$5.set(seg, x);
}
public static MemorySegment format_value$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3047.const$5.get(seg.asSlice(index*sizeof()));
}
public static void format_value$set(MemorySegment seg, long index, MemorySegment x) {
constants$3047.const$5.set(seg.asSlice(index*sizeof()), x);
}
public static format_value format_value(MemorySegment segment, Arena scope) {
return format_value.ofAddress(format_value$get(segment), scope);
}
/**
* {@snippet :
* void (*draw_value)(struct _GtkScale*);
* }
*/
public interface draw_value {
void apply(java.lang.foreign.MemorySegment display);
static MemorySegment allocate(draw_value fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3048.const$0, fi, constants$13.const$1, scope);
}
static draw_value ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _display) -> {
try {
constants$13.const$3.invokeExact(symbol, _display);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle draw_value$VH() {
return constants$3048.const$1;
}
/**
* Getter for field:
* {@snippet :
* void (*draw_value)(struct _GtkScale*);
* }
*/
public static MemorySegment draw_value$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3048.const$1.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*draw_value)(struct _GtkScale*);
* }
*/
public static void draw_value$set(MemorySegment seg, MemorySegment x) {
constants$3048.const$1.set(seg, x);
}
public static MemorySegment draw_value$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3048.const$1.get(seg.asSlice(index*sizeof()));
}
public static void draw_value$set(MemorySegment seg, long index, MemorySegment x) {
constants$3048.const$1.set(seg.asSlice(index*sizeof()), x);
}
public static draw_value draw_value(MemorySegment segment, Arena scope) {
return draw_value.ofAddress(draw_value$get(segment), scope);
}
/**
* {@snippet :
* void (*get_layout_offsets)(struct _GtkScale*,int*,int*);
* }
*/
public interface get_layout_offsets {
void apply(java.lang.foreign.MemorySegment key, java.lang.foreign.MemorySegment value, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(get_layout_offsets fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3048.const$2, fi, constants$14.const$3, scope);
}
static get_layout_offsets ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _key, java.lang.foreign.MemorySegment _value, java.lang.foreign.MemorySegment _user_data) -> {
try {
constants$14.const$5.invokeExact(symbol, _key, _value, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_layout_offsets$VH() {
return constants$3048.const$3;
}
/**
* Getter for field:
* {@snippet :
* void (*get_layout_offsets)(struct _GtkScale*,int*,int*);
* }
*/
public static MemorySegment get_layout_offsets$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3048.const$3.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*get_layout_offsets)(struct _GtkScale*,int*,int*);
* }
*/
public static void get_layout_offsets$set(MemorySegment seg, MemorySegment x) {
constants$3048.const$3.set(seg, x);
}
public static MemorySegment get_layout_offsets$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3048.const$3.get(seg.asSlice(index*sizeof()));
}
public static void get_layout_offsets$set(MemorySegment seg, long index, MemorySegment x) {
constants$3048.const$3.set(seg.asSlice(index*sizeof()), x);
}
public static get_layout_offsets get_layout_offsets(MemorySegment segment, Arena scope) {
return get_layout_offsets.ofAddress(get_layout_offsets$get(segment), scope);
}
/**
* {@snippet :
* void (*_gtk_reserved1)();
* }
*/
public interface _gtk_reserved1 {
void apply();
static MemorySegment allocate(_gtk_reserved1 fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3048.const$4, fi, constants$7.const$5, scope);
}
static _gtk_reserved1 ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
constants$64.const$1.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle _gtk_reserved1$VH() {
return constants$3048.const$5;
}
/**
* Getter for field:
* {@snippet :
* void (*_gtk_reserved1)();
* }
*/
public static MemorySegment _gtk_reserved1$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3048.const$5.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*_gtk_reserved1)();
* }
*/
public static void _gtk_reserved1$set(MemorySegment seg, MemorySegment x) {
constants$3048.const$5.set(seg, x);
}
public static MemorySegment _gtk_reserved1$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3048.const$5.get(seg.asSlice(index*sizeof()));
}
public static void _gtk_reserved1$set(MemorySegment seg, long index, MemorySegment x) {
constants$3048.const$5.set(seg.asSlice(index*sizeof()), x);
}
public static _gtk_reserved1 _gtk_reserved1(MemorySegment segment, Arena scope) {
return _gtk_reserved1.ofAddress(_gtk_reserved1$get(segment), scope);
}
/**
* {@snippet :
* void (*_gtk_reserved2)();
* }
*/
public interface _gtk_reserved2 {
void apply();
static MemorySegment allocate(_gtk_reserved2 fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3049.const$0, fi, constants$7.const$5, scope);
}
static _gtk_reserved2 ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
constants$64.const$1.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle _gtk_reserved2$VH() {
return constants$3049.const$1;
}
/**
* Getter for field:
* {@snippet :
* void (*_gtk_reserved2)();
* }
*/
public static MemorySegment _gtk_reserved2$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3049.const$1.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*_gtk_reserved2)();
* }
*/
public static void _gtk_reserved2$set(MemorySegment seg, MemorySegment x) {
constants$3049.const$1.set(seg, x);
}
public static MemorySegment _gtk_reserved2$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3049.const$1.get(seg.asSlice(index*sizeof()));
}
public static void _gtk_reserved2$set(MemorySegment seg, long index, MemorySegment x) {
constants$3049.const$1.set(seg.asSlice(index*sizeof()), x);
}
public static _gtk_reserved2 _gtk_reserved2(MemorySegment segment, Arena scope) {
return _gtk_reserved2.ofAddress(_gtk_reserved2$get(segment), scope);
}
/**
* {@snippet :
* void (*_gtk_reserved3)();
* }
*/
public interface _gtk_reserved3 {
void apply();
static MemorySegment allocate(_gtk_reserved3 fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3049.const$2, fi, constants$7.const$5, scope);
}
static _gtk_reserved3 ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
constants$64.const$1.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle _gtk_reserved3$VH() {
return constants$3049.const$3;
}
/**
* Getter for field:
* {@snippet :
* void (*_gtk_reserved3)();
* }
*/
public static MemorySegment _gtk_reserved3$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3049.const$3.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*_gtk_reserved3)();
* }
*/
public static void _gtk_reserved3$set(MemorySegment seg, MemorySegment x) {
constants$3049.const$3.set(seg, x);
}
public static MemorySegment _gtk_reserved3$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3049.const$3.get(seg.asSlice(index*sizeof()));
}
public static void _gtk_reserved3$set(MemorySegment seg, long index, MemorySegment x) {
constants$3049.const$3.set(seg.asSlice(index*sizeof()), x);
}
public static _gtk_reserved3 _gtk_reserved3(MemorySegment segment, Arena scope) {
return _gtk_reserved3.ofAddress(_gtk_reserved3$get(segment), scope);
}
/**
* {@snippet :
* void (*_gtk_reserved4)();
* }
*/
public interface _gtk_reserved4 {
void apply();
static MemorySegment allocate(_gtk_reserved4 fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3049.const$4, fi, constants$7.const$5, scope);
}
static _gtk_reserved4 ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return () -> {
try {
constants$64.const$1.invokeExact(symbol);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle _gtk_reserved4$VH() {
return constants$3049.const$5;
}
/**
* Getter for field:
* {@snippet :
* void (*_gtk_reserved4)();
* }
*/
public static MemorySegment _gtk_reserved4$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$3049.const$5.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*_gtk_reserved4)();
* }
*/
public static void _gtk_reserved4$set(MemorySegment seg, MemorySegment x) {
constants$3049.const$5.set(seg, x);
}
public static MemorySegment _gtk_reserved4$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$3049.const$5.get(seg.asSlice(index*sizeof()));
}
public static void _gtk_reserved4$set(MemorySegment seg, long index, MemorySegment x) {
constants$3049.const$5.set(seg.asSlice(index*sizeof()), x);
}
public static _gtk_reserved4 _gtk_reserved4(MemorySegment segment, Arena scope) {
return _gtk_reserved4.ofAddress(_gtk_reserved4$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); }
}