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

	long pData;

	public long getPData() { return pData; }


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


	public XImage() {
		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 int get_width() { log.finest("");return (Native.getInt(pData+0)); }
	public void set_width(int v) { log.finest(""); Native.putInt(pData+0, v); }
	public int get_height() { log.finest("");return (Native.getInt(pData+4)); }
	public void set_height(int v) { log.finest(""); Native.putInt(pData+4, v); }
	public int get_xoffset() { log.finest("");return (Native.getInt(pData+8)); }
	public void set_xoffset(int v) { log.finest(""); Native.putInt(pData+8, v); }
	public int get_format() { log.finest("");return (Native.getInt(pData+12)); }
	public void set_format(int v) { log.finest(""); Native.putInt(pData+12, v); }
	public byte get_data(int index) { log.finest(""); return Native.getByte(Native.getLong(pData+16)+index*1); }
	public long get_data() { log.finest("");return Native.getLong(pData+16); }
	public void set_data(long v) { log.finest(""); Native.putLong(pData + 16, v); }
	public int get_byte_order() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(20):(24)))); }
	public void set_byte_order(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(20):(24)), v); }
	public int get_bitmap_unit() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(24):(28)))); }
	public void set_bitmap_unit(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(24):(28)), v); }
	public int get_bitmap_bit_order() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(28):(32)))); }
	public void set_bitmap_bit_order(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(28):(32)), v); }
	public int get_bitmap_pad() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(32):(36)))); }
	public void set_bitmap_pad(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(32):(36)), v); }
	public int get_depth() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(36):(40)))); }
	public void set_depth(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(36):(40)), v); }
	public int get_bytes_per_line() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(40):(44)))); }
	public void set_bytes_per_line(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(40):(44)), v); }
	public int get_bits_per_pixel() { log.finest("");return (Native.getInt(pData+((XlibWrapper.dataModel == 32)?(44):(48)))); }
	public void set_bits_per_pixel(int v) { log.finest(""); Native.putInt(pData+((XlibWrapper.dataModel == 32)?(44):(48)), v); }
	public long get_red_mask() { log.finest("");return (Native.getLong(pData+((XlibWrapper.dataModel == 32)?(48):(56)))); }
	public void set_red_mask(long v) { log.finest(""); Native.putLong(pData+((XlibWrapper.dataModel == 32)?(48):(56)), v); }
	public long get_green_mask() { log.finest("");return (Native.getLong(pData+((XlibWrapper.dataModel == 32)?(52):(64)))); }
	public void set_green_mask(long v) { log.finest(""); Native.putLong(pData+((XlibWrapper.dataModel == 32)?(52):(64)), v); }
	public long get_blue_mask() { log.finest("");return (Native.getLong(pData+((XlibWrapper.dataModel == 32)?(56):(72)))); }
	public void set_blue_mask(long v) { log.finest(""); Native.putLong(pData+((XlibWrapper.dataModel == 32)?(56):(72)), v); }
	public long get_obdata(int index) { log.finest(""); return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(60):(80)))+index*Native.getLongSize(); }
	public long get_obdata() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(60):(80))); }
	public void set_obdata(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(60):(80)), v); }
	public long get_f_create_image(int index) { log.finest(""); return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(64):(88)))+index*Native.getLongSize(); }
	public long get_f_create_image() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(64):(88))); }
	public void set_f_create_image(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(64):(88)), v); }
	public long get_f_destroy_image(int index) { log.finest(""); return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(68):(96)))+index*Native.getLongSize(); }
	public long get_f_destroy_image() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(68):(96))); }
	public void set_f_destroy_image(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(68):(96)), v); }
	public long get_f_get_pixel(int index) { log.finest(""); return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(72):(104)))+index*Native.getLongSize(); }
	public long get_f_get_pixel() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(72):(104))); }
	public void set_f_get_pixel(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(72):(104)), v); }
	public long get_f_put_pixel(int index) { log.finest(""); return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(76):(112)))+index*Native.getLongSize(); }
	public long get_f_put_pixel() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(76):(112))); }
	public void set_f_put_pixel(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(76):(112)), v); }
	public long get_f_sub_image(int index) { log.finest(""); return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(80):(120)))+index*Native.getLongSize(); }
	public long get_f_sub_image() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(80):(120))); }
	public void set_f_sub_image(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(80):(120)), v); }
	public long get_f_add_pixel(int index) { log.finest(""); return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(84):(128)))+index*Native.getLongSize(); }
	public long get_f_add_pixel() { log.finest("");return Native.getLong(pData+((XlibWrapper.dataModel == 32)?(84):(128))); }
	public void set_f_add_pixel(long v) { log.finest(""); Native.putLong(pData + ((XlibWrapper.dataModel == 32)?(84):(128)), v); }


	String getName() {
		return "XImage"; 
	}


	String getFieldsAsString() {
		String ret="";

		ret += ""+"width = " + get_width() +", ";
		ret += ""+"height = " + get_height() +", ";
		ret += ""+"xoffset = " + get_xoffset() +", ";
		ret += ""+"format = " + get_format() +", ";
		ret += ""+"data = " + get_data() +", ";
		ret += ""+"byte_order = " + get_byte_order() +", ";
		ret += ""+"bitmap_unit = " + get_bitmap_unit() +", ";
		ret += ""+"bitmap_bit_order = " + get_bitmap_bit_order() +", ";
		ret += ""+"bitmap_pad = " + get_bitmap_pad() +", ";
		ret += ""+"depth = " + get_depth() +", ";
		ret += ""+"bytes_per_line = " + get_bytes_per_line() +", ";
		ret += ""+"bits_per_pixel = " + get_bits_per_pixel() +", ";
		ret += ""+"red_mask = " + get_red_mask() +", ";
		ret += ""+"green_mask = " + get_green_mask() +", ";
		ret += ""+"blue_mask = " + get_blue_mask() +", ";
		ret += ""+"obdata = " + get_obdata() +", ";
		ret += ""+"f_create_image = " + get_f_create_image() +", ";
		ret += ""+"f_destroy_image = " + get_f_destroy_image() +", ";
		ret += ""+"f_get_pixel = " + get_f_get_pixel() +", ";
		ret += ""+"f_put_pixel = " + get_f_put_pixel() +", ";
		ret += ""+"f_sub_image = " + get_f_sub_image() +", ";
		ret += ""+"f_add_pixel = " + get_f_add_pixel() +", ";
		return ret;
	}


}



