// 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 ColorData extends XWrapperBase { 
	private Unsafe unsafe = XlibWrapper.unsafe; 
	private final boolean should_free_memory;
	public static int getSize() { return ((XlibWrapper.dataModel == 32)?(44):(88)); }
	public int getDataSize() { return getSize(); }

	long pData;

	public long getPData() { return pData; }


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


	public ColorData() {
		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 ColorEntry get_awt_Colors(int index) { log.finest(""); return (Native.getLong(pData+0) != 0)?(new ColorEntry(Native.getLong(pData+0)+index*4)):(null); }
	public long get_awt_Colors() { log.finest("");return Native.getLong(pData+0); }
	public void set_awt_Colors(long v) { log.finest(""); Native.putLong(pData + 0, v); }
	public int get_awt_numICMcolors() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(4):(8)))); }
	public void set_awt_numICMcolors(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(4):(8)), v); }
	public int get_awt_icmLUT(int index) { log.finest(""); return Native.getInt(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(8):(16)))+index*4); }
	public long get_awt_icmLUT() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(8):(16))); }
	public void set_awt_icmLUT(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(8):(16)), v); }
	public byte get_awt_icmLUT2Colors(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(12):(24)))+index*1); }
	public long get_awt_icmLUT2Colors() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(12):(24))); }
	public void set_awt_icmLUT2Colors(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(12):(24)), v); }
	public byte get_img_grays(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(16):(32)))+index*1); }
	public long get_img_grays() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(16):(32))); }
	public void set_img_grays(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(16):(32)), v); }
	public byte get_img_clr_tbl(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(20):(40)))+index*1); }
	public long get_img_clr_tbl() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(20):(40))); }
	public void set_img_clr_tbl(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(20):(40)), v); }
	public byte get_img_oda_red(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(24):(48)))+index*1); }
	public long get_img_oda_red() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(24):(48))); }
	public void set_img_oda_red(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(24):(48)), v); }
	public byte get_img_oda_green(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(28):(56)))+index*1); }
	public long get_img_oda_green() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(28):(56))); }
	public void set_img_oda_green(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(28):(56)), v); }
	public byte get_img_oda_blue(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(32):(64)))+index*1); }
	public long get_img_oda_blue() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(32):(64))); }
	public void set_img_oda_blue(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(32):(64)), v); }
	public int get_pGrayInverseLutData(int index) { log.finest(""); return Native.getInt(Native.getLong(pData+((XlibWrapper.dataModel == 32)?(36):(72)))+index*4); }
	public long get_pGrayInverseLutData() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(36):(72))); }
	public void set_pGrayInverseLutData(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(36):(72)), v); }
	public int get_screendata() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(40):(80)))); }
	public void set_screendata(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(40):(80)), v); }


	String getName() {
		return "ColorData"; 
	}


	String getFieldsAsString() {
		String ret="";

		ret += ""+"awt_Colors = " + get_awt_Colors() +", ";
		ret += ""+"awt_numICMcolors = " + get_awt_numICMcolors() +", ";
		ret += ""+"awt_icmLUT = " + get_awt_icmLUT() +", ";
		ret += ""+"awt_icmLUT2Colors = " + get_awt_icmLUT2Colors() +", ";
		ret += ""+"img_grays = " + get_img_grays() +", ";
		ret += ""+"img_clr_tbl = " + get_img_clr_tbl() +", ";
		ret += ""+"img_oda_red = " + get_img_oda_red() +", ";
		ret += ""+"img_oda_green = " + get_img_oda_green() +", ";
		ret += ""+"img_oda_blue = " + get_img_oda_blue() +", ";
		ret += ""+"pGrayInverseLutData = " + get_pGrayInverseLutData() +", ";
		ret += ""+"screendata = " + get_screendata() +", ";
		return ret;
	}


}



