All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jogamp.nativewindow.windows.BITMAPINFO Maven / Gradle / Ivy

There is a newer version: 2.3.2
Show newest version
/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/JavaEmitter.java on Sat Jul 20 20:39:03 CEST 2013 ----! */


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 */  };

  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();
  }

  public BITMAPINFOHEADER getBmiHeader() {
    return BITMAPINFOHEADER.create( accessor.slice( bmiHeader_offset[mdIdx], bmiHeader_size[mdIdx] ) );
 }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy