
jogamp.nativewindow.windows.BITMAPINFO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jogl-all Show documentation
Show all versions of jogl-all Show documentation
Java™ Binding for the OpenGL® API
/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/JavaEmitter.java on Thu Aug 07 00:27:48 CEST 2014 ----! */
package jogamp.nativewindow.windows;
import java.nio.*;
import com.jogamp.gluegen.runtime.*;
import com.jogamp.common.os.*;
import com.jogamp.common.nio.*;
import jogamp.common.os.MachineDescriptionRuntime;
import javax.media.nativewindow.util.Point;
import javax.media.nativewindow.NativeWindowException;
import jogamp.nativewindow.NWJNILibLoader;
import jogamp.nativewindow.Debug;
public class BITMAPINFO {
StructAccessor accessor;
private static final int mdIdx = MachineDescriptionRuntime.getStatic().ordinal();
private static final int[] BITMAPINFO_size = new int[] { 44 /* ARMle_EABI */, 44 /* X86_32_UNIX */, 44 /* X86_64_UNIX */, 44 /* X86_32_MACOS */, 44 /* X86_32_WINDOWS */, 44 /* X86_64_WINDOWS */, 44 /* SPARC_32_SUNOS */ };
private static final int[] bmiHeader_offset = new int[] { 0 /* ARMle_EABI */, 0 /* X86_32_UNIX */, 0 /* X86_64_UNIX */, 0 /* X86_32_MACOS */, 0 /* X86_32_WINDOWS */, 0 /* X86_64_WINDOWS */, 0 /* SPARC_32_SUNOS */ };
private static final int[] bmiHeader_size = new int[] { 40 /* ARMle_EABI */, 40 /* X86_32_UNIX */, 40 /* X86_64_UNIX */, 40 /* X86_32_MACOS */, 40 /* X86_32_WINDOWS */, 40 /* X86_64_WINDOWS */, 40 /* SPARC_32_SUNOS */ };
private static final int[] bmiColors_offset = new int[] { 40 /* ARMle_EABI */, 40 /* X86_32_UNIX */, 40 /* X86_64_UNIX */, 40 /* X86_32_MACOS */, 40 /* X86_32_WINDOWS */, 40 /* X86_64_WINDOWS */, 40 /* SPARC_32_SUNOS */ };
private static final int[] bmiColors_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 4 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 4 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ };
public static int size() {
return BITMAPINFO_size[mdIdx];
}
public static BITMAPINFO create() {
return create(Buffers.newDirectByteBuffer(size()));
}
public static BITMAPINFO create(java.nio.ByteBuffer buf) {
return new BITMAPINFO(buf);
}
BITMAPINFO(java.nio.ByteBuffer buf) {
accessor = new StructAccessor(buf);
}
public java.nio.ByteBuffer getBuffer() {
return accessor.getBuffer();
}
/** Getter for native field: CType['BITMAPINFOHEADER' (typedef), size [fixed false, lnx64 40], [struct{11}]] */
public BITMAPINFOHEADER getBmiHeader() {
return BITMAPINFOHEADER.create( accessor.slice( bmiHeader_offset[mdIdx], bmiHeader_size[mdIdx] ) );
}
/** Setter for native field: CType['RGBQUAD *', size [fixed false, lnx64 4], [array*1]], with array length of 1
*/
public BITMAPINFO setBmiColors(RGBQUAD val) {
final int elemSize = RGBQUAD.size();
final ByteBuffer destB = getBuffer();
if( elemSize > bmiColors_size[mdIdx] ) { throw new IndexOutOfBoundsException("elemSize "+elemSize+" > size "+bmiColors_size[mdIdx]); };
int bOffset = bmiColors_offset[mdIdx];
final int bLimes = bOffset + elemSize;
if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize); };
final ByteBuffer sourceB = val.getBuffer();
for(int f=0; f= bLimes ) { throw new IndexOutOfBoundsException("elem-byte[0]["+f+"]: bOffset "+bOffset+" >= bLimes "+bLimes+", elemSize "+elemSize); };
destB.put(bOffset++, sourceB.get(f));
}
return this;
}
/** Getter for native field: CType['RGBQUAD *', size [fixed false, lnx64 4], [array*1]], with array length of 1
*/
public RGBQUAD getBmiColors() {
return RGBQUAD.create(accessor.slice(bmiColors_offset[mdIdx], RGBQUAD.size()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy