// 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 java.util.logging.*;
public class XFontStruct extends XWrapperBase { 
	private Unsafe unsafe = XlibWrapper.unsafe; 
	private final boolean should_free_memory;
	public static int getSize() { return ((XlibWrapper.dataModel == 32)?(80):(96)); }
	public int getDataSize() { return getSize(); }

	long pData;

	public long getPData() { return pData; }


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


	public XFontStruct() {
		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 XExtData get_ext_data(int index) { log.finest(""); return (Native.getLong(pData+0) != 0)?(new XExtData(Native.getLong(pData+0)+index*((XlibWrapper.dataModel == 32)?(16):(32)))):(null); }
	public long get_ext_data() { log.finest("");return Native.getLong(pData+0); }
	public void set_ext_data(long v) { log.finest(""); Native.putLong(pData + 0, v); }
	public long get_fid() { log.finest("");return (Native.getLong(pData+((XlibWrapper.dataModel == 32)?(4):(8)))); }
	public void set_fid(long v) { log.finest(""); Native.putLong(pData+((XlibWrapper.dataModel == 32)?(4):(8)), v); }
	public int get_direction() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(8):(16)))); }
	public void set_direction(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(8):(16)), v); }
	public int get_min_char_or_byte2() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(12):(20)))); }
	public void set_min_char_or_byte2(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(12):(20)), v); }
	public int get_max_char_or_byte2() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(16):(24)))); }
	public void set_max_char_or_byte2(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(16):(24)), v); }
	public int get_min_byte1() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(20):(28)))); }
	public void set_min_byte1(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(20):(28)), v); }
	public int get_max_byte1() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(24):(32)))); }
	public void set_max_byte1(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(24):(32)), v); }
	public boolean get_all_chars_exist() { log.finest("");return (Native.getBool(pData+((XlibWrapper.dataModel == 32)?(28):(36)))); }
	public void set_all_chars_exist(boolean v) { log.finest(""); Native.putBool(pData+((XlibWrapper.dataModel == 32)?(28):(36)), v); }
	public int get_n_properties() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(36):(44)))); }
	public void set_n_properties(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(36):(44)), v); }
	public XFontProp get_properties(int index) { log.finest(""); return (Native.getLong(pData+((XlibWrapper.dataModel == 32)?(40):(48))) != 0)?(new XFontProp(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(40):(48)))+index*((XlibWrapper.dataModel == 32)?(8):(16)))):(null); }
	public long get_properties() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(40):(48))); }
	public void set_properties(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(40):(48)), v); }
	public XCharStruct get_min_bounds() { log.finest("");return new XCharStruct(pData + ((XlibWrapper.dataModel == 32)?(44):(56))); }
	public XCharStruct get_max_bounds() { log.finest("");return new XCharStruct(pData + ((XlibWrapper.dataModel == 32)?(56):(68))); }
	public XCharStruct get_per_char(int index) { log.finest(""); return (Native.getLong(pData+((XlibWrapper.dataModel == 32)?(68):(80))) != 0)?(new XCharStruct(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(68):(80)))+index*12)):(null); }
	public long get_per_char() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(68):(80))); }
	public void set_per_char(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(68):(80)), v); }
	public int get_ascent() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(72):(88)))); }
	public void set_ascent(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(72):(88)), v); }
	public int get_descent() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(76):(92)))); }
	public void set_descent(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(76):(92)), v); }


	String getName() {
		return "XFontStruct"; 
	}


	String getFieldsAsString() {
		String ret="";

		ret += ""+"ext_data = " + get_ext_data() +", ";
		ret += ""+"fid = " + get_fid() +", ";
		ret += ""+"direction = " + get_direction() +", ";
		ret += ""+"min_char_or_byte2 = " + get_min_char_or_byte2() +", ";
		ret += ""+"max_char_or_byte2 = " + get_max_char_or_byte2() +", ";
		ret += ""+"min_byte1 = " + get_min_byte1() +", ";
		ret += ""+"max_byte1 = " + get_max_byte1() +", ";
		ret += ""+"all_chars_exist = " + get_all_chars_exist() +", ";
		ret += ""+"n_properties = " + get_n_properties() +", ";
		ret += ""+"properties = " + get_properties() +", ";
		ret += ""+"min_bounds = " + get_min_bounds() +", ";
		ret += ""+"max_bounds = " + get_max_bounds() +", ";
		ret += ""+"per_char = " + get_per_char() +", ";
		ret += ""+"ascent = " + get_ascent() +", ";
		ret += ""+"descent = " + get_descent() +", ";
		return ret;
	}


}



