com.badlogic.gdx.backends.iosrobovm.custom.HWMachine Maven / Gradle / Ivy
/*DO NOT EDIT THIS FILE - it is machine generated*/
package com.badlogic.gdx.backends.iosrobovm.custom;
import org.robovm.rt.bro.Bro;
import org.robovm.rt.bro.Struct;
import org.robovm.rt.bro.annotation.Bridge;
import org.robovm.rt.bro.annotation.Library;
import org.robovm.rt.bro.annotation.MachineSizedSInt;
import org.robovm.rt.bro.ptr.BytePtr;
import org.robovm.rt.bro.ptr.MachineSizedUIntPtr;
import org.robovm.rt.bro.ptr.VoidPtr;
/** DO NOT EDIT THIS FILE - it is machine generated */
@Library("c")
public class HWMachine {
static {
Bro.bind();
}
@Bridge
public static native int sysctlbyname (BytePtr name, VoidPtr oldp, MachineSizedUIntPtr oldlenp, VoidPtr newp,
@MachineSizedSInt long newlen);
public static String getMachineString () {
BytePtr name = BytePtr.toBytePtrAsciiZ("hw.machine");
MachineSizedUIntPtr size = new MachineSizedUIntPtr();
sysctlbyname(name, null, size, null, 0);
BytePtr machine = Struct.allocate(BytePtr.class, (int)size.get());
sysctlbyname(name, machine.as(VoidPtr.class), size, null, 0);
return machine.toStringAsciiZ();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy