// This file is an automatically generated file, please do not edit this file, modify the WrapperGenerator.java file instead !

package sun.awt.X11;

import sun.misc.*;

import sun.util.logging.PlatformLogger;
public class XTextProperty extends XWrapperBase { 
	private Unsafe unsafe = XlibWrapper.unsafe; 
	private final boolean should_free_memory;
	public static int getSize() { return 32; }
	public int getDataSize() { return getSize(); }

	long pData;

	public long getPData() { return pData; }


	public XTextProperty(long addr) {
		log.finest("Creating");
		pData=addr;
		should_free_memory = false;
	}


	public XTextProperty() {
		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 byte get_value(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+0)+index*1); }
	public long get_value() { log.finest("");return Native.getLong(pData+0); }
	public void set_value(long v) { log.finest(""); Native.putLong(pData + 0, v); }
	public long get_encoding() { log.finest("");return (Native.getLong(pData+8)); }
	public void set_encoding(long v) { log.finest(""); Native.putLong(pData+8, v); }
	public int get_format() { log.finest("");return (Native.getInt(pData+16)); }
	public void set_format(int v) { log.finest(""); Native.putInt(pData+16, v); }
	public long get_nitems() { log.finest("");return (Native.getLong(pData+24)); }
	public void set_nitems(long v) { log.finest(""); Native.putLong(pData+24, v); }


	String getName() {
		return "XTextProperty"; 
	}


	String getFieldsAsString() {
		StringBuilder ret = new StringBuilder(160);

		ret.append("value = ").append( get_value() ).append(", ");
		ret.append("encoding = ").append( get_encoding() ).append(", ");
		ret.append("format = ").append( get_format() ).append(", ");
		ret.append("nitems = ").append( get_nitems() ).append(", ");
		return ret.toString();
	}


}