package sun.awt.X11;
import jdk.internal.misc.Unsafe;
import sun.util.logging.PlatformLogger;
public class XRenderDirectFormat extends XWrapperBase {
private Unsafe unsafe = XlibWrapper.unsafe;
private final boolean should_free_memory;
public static int getSize() { return 16; }
public int getDataSize() { return getSize(); }
long pData;
public long getPData() { return pData; }
public XRenderDirectFormat(long addr) {
log.finest("Creating");
pData=addr;
should_free_memory = false;
}
public XRenderDirectFormat() {
log.finest("Creating");
pData = unsafe.allocateMemory(getSize());
should_free_memory = true;
}
public void dispose() {
log.finest("Disposing");
if (should_free_memory) {
log.finest("freeing memory");
unsafe.freeMemory(pData);
}
}
public short get_red() { log.finest("");return (Native.getShort(pData+0)); }
public void set_red(short v) { log.finest(""); Native.putShort(pData+0, v); }
public short get_redMask() { log.finest("");return (Native.getShort(pData+2)); }
public void set_redMask(short v) { log.finest(""); Native.putShort(pData+2, v); }
public short get_green() { log.finest("");return (Native.getShort(pData+4)); }
public void set_green(short v) { log.finest(""); Native.putShort(pData+4, v); }
public short get_greenMask() { log.finest("");return (Native.getShort(pData+6)); }
public void set_greenMask(short v) { log.finest(""); Native.putShort(pData+6, v); }
public short get_blue() { log.finest("");return (Native.getShort(pData+8)); }
public void set_blue(short v) { log.finest(""); Native.putShort(pData+8, v); }
public short get_blueMask() { log.finest("");return (Native.getShort(pData+10)); }
public void set_blueMask(short v) { log.finest(""); Native.putShort(pData+10, v); }
public short get_alpha() { log.finest("");return (Native.getShort(pData+12)); }
public void set_alpha(short v) { log.finest(""); Native.putShort(pData+12, v); }
public short get_alphaMask() { log.finest("");return (Native.getShort(pData+14)); }
public void set_alphaMask(short v) { log.finest(""); Native.putShort(pData+14, v); }
String getName() {
return "XRenderDirectFormat";
}
String getFieldsAsString() {
StringBuilder ret = new StringBuilder(320);
ret.append("red = ").append( get_red() ).append(", ");
ret.append("redMask = ").append( get_redMask() ).append(", ");
ret.append("green = ").append( get_green() ).append(", ");
ret.append("greenMask = ").append( get_greenMask() ).append(", ");
ret.append("blue = ").append( get_blue() ).append(", ");
ret.append("blueMask = ").append( get_blueMask() ).append(", ");
ret.append("alpha = ").append( get_alpha() ).append(", ");
ret.append("alphaMask = ").append( get_alphaMask() ).append(", ");
return ret.toString();
}
}