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

jogamp.opengl.windows.wgl.PGPU_DEVICE Maven / Gradle / Ivy

The newest version!
/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/opengl/GLEmitter.java on Sat Oct 10 03:20:16 CEST 2015 ----! */


package jogamp.opengl.windows.wgl;

import java.nio.*;

import com.jogamp.gluegen.runtime.*;
import com.jogamp.common.os.*;
import com.jogamp.common.nio.*;
import jogamp.common.os.MachineDataInfoRuntime;

import java.util.*;
import com.jogamp.opengl.*;
import com.jogamp.opengl.fixedfunc.*;
import jogamp.opengl.*;

public class PGPU_DEVICE {

  StructAccessor accessor;

  private static final int mdIdx = MachineDataInfoRuntime.getStatic().ordinal();
  private final MachineDataInfo md;

  private static final int[] PGPU_DEVICE_size = new int[] { 184 /* ARM_MIPS_32 */, 184 /* X86_32_UNIX */, 184 /* X86_32_MACOS */, 184 /* PPC_32_UNIX */, 184 /* SPARC_32_SUNOS */, 184 /* X86_32_WINDOWS */, 184 /* LP64_UNIX */, 184 /* X86_64_WINDOWS */  };
  private static final int[] cb_offset = new int[] { 0 /* ARM_MIPS_32 */, 0 /* X86_32_UNIX */, 0 /* X86_32_MACOS */, 0 /* PPC_32_UNIX */, 0 /* SPARC_32_SUNOS */, 0 /* X86_32_WINDOWS */, 0 /* LP64_UNIX */, 0 /* X86_64_WINDOWS */ };
//private static final int[] cb_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */  };
  private static final int[] DeviceName_offset = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */ };
  private static final int[] DeviceName_size = new int[] { 32 /* ARM_MIPS_32 */, 32 /* X86_32_UNIX */, 32 /* X86_32_MACOS */, 32 /* PPC_32_UNIX */, 32 /* SPARC_32_SUNOS */, 32 /* X86_32_WINDOWS */, 32 /* LP64_UNIX */, 32 /* X86_64_WINDOWS */  };
  private static final int[] DeviceString_offset = new int[] { 36 /* ARM_MIPS_32 */, 36 /* X86_32_UNIX */, 36 /* X86_32_MACOS */, 36 /* PPC_32_UNIX */, 36 /* SPARC_32_SUNOS */, 36 /* X86_32_WINDOWS */, 36 /* LP64_UNIX */, 36 /* X86_64_WINDOWS */ };
  private static final int[] DeviceString_size = new int[] { 128 /* ARM_MIPS_32 */, 128 /* X86_32_UNIX */, 128 /* X86_32_MACOS */, 128 /* PPC_32_UNIX */, 128 /* SPARC_32_SUNOS */, 128 /* X86_32_WINDOWS */, 128 /* LP64_UNIX */, 128 /* X86_64_WINDOWS */  };
  private static final int[] Flags_offset = new int[] { 164 /* ARM_MIPS_32 */, 164 /* X86_32_UNIX */, 164 /* X86_32_MACOS */, 164 /* PPC_32_UNIX */, 164 /* SPARC_32_SUNOS */, 164 /* X86_32_WINDOWS */, 164 /* LP64_UNIX */, 164 /* X86_64_WINDOWS */ };
//private static final int[] Flags_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */  };
  private static final int[] rcVirtualScreen_offset = new int[] { 168 /* ARM_MIPS_32 */, 168 /* X86_32_UNIX */, 168 /* X86_32_MACOS */, 168 /* PPC_32_UNIX */, 168 /* SPARC_32_SUNOS */, 168 /* X86_32_WINDOWS */, 168 /* LP64_UNIX */, 168 /* X86_64_WINDOWS */ };
  private static final int[] rcVirtualScreen_size = new int[] { 16 /* ARM_MIPS_32 */, 16 /* X86_32_UNIX */, 16 /* X86_32_MACOS */, 16 /* PPC_32_UNIX */, 16 /* SPARC_32_SUNOS */, 16 /* X86_32_WINDOWS */, 16 /* LP64_UNIX */, 16 /* X86_64_WINDOWS */  };

  public static int size() {
    return PGPU_DEVICE_size[mdIdx];
  }

  public static PGPU_DEVICE create() {
    return create(Buffers.newDirectByteBuffer(size()));
  }

  public static PGPU_DEVICE create(java.nio.ByteBuffer buf) {
      return new PGPU_DEVICE(buf);
  }

  PGPU_DEVICE(java.nio.ByteBuffer buf) {
    md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
    accessor = new StructAccessor(buf);
  }

  public java.nio.ByteBuffer getBuffer() {
    return accessor.getBuffer();
  }

  /** Setter for native field cb: CType[(IntType) typedef 'DWORD', size [fixed true, lnx64 4], [const[false], int]] */
  public PGPU_DEVICE setCb(int val) {
    accessor.setIntAt(cb_offset[mdIdx], val);
    return this;
  }

  /** Getter for native field cb: CType[(IntType) typedef 'DWORD', size [fixed true, lnx64 4], [const[false], int]] */
  public int getCb() {
    return accessor.getIntAt(cb_offset[mdIdx]);
  }

  /** Getter for native field DeviceName: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 32 */
  public static final int getDeviceNameArrayLength() {
    return 32;
  }

  /** Setter for native field DeviceName: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 32 */
  public PGPU_DEVICE setDeviceName(final int offset, byte[] val) {
    final int arrayLength = 32;
    if( offset + val.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + val.length "+val.length+" > array-length "+arrayLength); };
    final int elemSize = Buffers.SIZEOF_BYTE;
    final ByteBuffer destB = getBuffer();
    final int bTotal = arrayLength * elemSize;
    if( bTotal > DeviceName_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+DeviceName_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); };
    int bOffset = DeviceName_offset[mdIdx];
    final int bLimes = bOffset + bTotal;
    if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize+" * "+arrayLength); };
    bOffset += elemSize * offset;
    accessor.setBytesAt(bOffset, val);
    return this;
  }

  /** Getter for native field DeviceName: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 32 */
  public ByteBuffer getDeviceName() {
    return accessor.slice(DeviceName_offset[mdIdx],  Buffers.SIZEOF_BYTE * 32);
  }

  /** Getter for native field DeviceName: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 32 */
  public byte[] getDeviceName(final int offset, byte result[]) {
    final int arrayLength = 32;
    if( offset + result.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + result.length "+result.length+" > array-length "+arrayLength); };
    return accessor.getBytesAt(DeviceName_offset[mdIdx] + (Buffers.SIZEOF_BYTE * offset), result);
  }


  /** Getter for native field DeviceString: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 128], [const[false], array*1]], with array length of 128 */
  public static final int getDeviceStringArrayLength() {
    return 128;
  }

  /** Setter for native field DeviceString: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 128], [const[false], array*1]], with array length of 128 */
  public PGPU_DEVICE setDeviceString(final int offset, byte[] val) {
    final int arrayLength = 128;
    if( offset + val.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + val.length "+val.length+" > array-length "+arrayLength); };
    final int elemSize = Buffers.SIZEOF_BYTE;
    final ByteBuffer destB = getBuffer();
    final int bTotal = arrayLength * elemSize;
    if( bTotal > DeviceString_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+DeviceString_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); };
    int bOffset = DeviceString_offset[mdIdx];
    final int bLimes = bOffset + bTotal;
    if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize+" * "+arrayLength); };
    bOffset += elemSize * offset;
    accessor.setBytesAt(bOffset, val);
    return this;
  }

  /** Getter for native field DeviceString: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 128], [const[false], array*1]], with array length of 128 */
  public ByteBuffer getDeviceString() {
    return accessor.slice(DeviceString_offset[mdIdx],  Buffers.SIZEOF_BYTE * 128);
  }

  /** Getter for native field DeviceString: CType[(ArrayType) 'CHAR *', size [fixed false, lnx64 128], [const[false], array*1]], with array length of 128 */
  public byte[] getDeviceString(final int offset, byte result[]) {
    final int arrayLength = 128;
    if( offset + result.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + result.length "+result.length+" > array-length "+arrayLength); };
    return accessor.getBytesAt(DeviceString_offset[mdIdx] + (Buffers.SIZEOF_BYTE * offset), result);
  }


  /** Setter for native field Flags: CType[(IntType) typedef 'DWORD', size [fixed true, lnx64 4], [const[false], int]] */
  public PGPU_DEVICE setFlags(int val) {
    accessor.setIntAt(Flags_offset[mdIdx], val);
    return this;
  }

  /** Getter for native field Flags: CType[(IntType) typedef 'DWORD', size [fixed true, lnx64 4], [const[false], int]] */
  public int getFlags() {
    return accessor.getIntAt(Flags_offset[mdIdx]);
  }

  /** Getter for native field rcVirtualScreen: CType[(StructType) typedef 'RECT', size [fixed false, lnx64 16], [const[false], struct{tagRECT: 4, }]] */
  public RECT getRcVirtualScreen() {
    return RECT.create( accessor.slice( rcVirtualScreen_offset[mdIdx], rcVirtualScreen_size[mdIdx] ) );
 }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy