/** Set the behavioral options for this callback. */ private void setCallbackOptions(int options) { cbstruct.setInt(Native.POINTER_SIZE, options); }
/** * Indirect the native pointer to <code>malloc</code> space, a la * <code>Pointer.setInt</code>. But this method performs a bounds * checks to ensure that the indirection does not cause memory outside the * <code>malloc</code>ed space to be accessed. * * @see Pointer#setInt */ @Override public void setInt(long offset, int value) { boundsCheck(offset, 4); super.setInt(offset, value); }
public void setValue(int value) { getPointer().setInt(0, value); }
/** * Set <code>value</code> at location being pointed to. This is equivalent * to the expression * <code>*((long *)((char *)Pointer + offset)) = value</code>. * * @param offset byte offset from pointer at which <code>value</code> * must be set * @param value <code>long</code> value to set */ public void setNativeLong(long offset, NativeLong value) { if (NativeLong.SIZE == 8) { setLong(offset, value.longValue()); } else { setInt(offset, value.intValue()); } }
setInt(offset, Boolean.TRUE.equals(value) ? -1 : 0); } else if (type == byte.class || type == Byte.class) { setByte(offset, value == null ? 0 : ((Byte)value).byteValue()); setChar(offset, value == null ? 0 : ((Character)value).charValue()); } else if (type == int.class || type == Integer.class) { setInt(offset, value == null ? 0 : ((Integer)value).intValue()); } else if (type == long.class || type == Long.class) { setLong(offset, value == null ? 0 : ((Long)value).longValue());
/** * Create an uninitialized reference */ public ByReference() { super(4); getPointer().setInt(0, EnumUtils.UNINITIALIZED); }
/** * Create an uninitialized reference */ public ByReference() { super(4); getPointer().setInt(0, EnumUtils.UNINITIALIZED); }
/** * Sets the value. * * @param value the new value */ public void setValue(UINT value) { getPointer().setInt(0, value.intValue()); }
/** * Sets the value. * @param value the new value */ public void setValue(MC_VCP_CODE_TYPE value) { getPointer().setInt(0, EnumUtils.toInteger(value)); }
/** * Sets the value. * @param value the new value */ public void setValue(MC_COLOR_TEMPERATURE value) { getPointer().setInt(0, EnumUtils.toInteger(value)); }
/** * Sets the value. * * @param value the new value */ public void setValue(BOOL value) { getPointer().setInt(0, value.intValue()); }
/** * Sets the value. * @param value the new value */ public void setValue(MC_DISPLAY_TECHNOLOGY_TYPE value) { getPointer().setInt(0, EnumUtils.toInteger(value)); }
/** * Sets the value. * * @param value the new value */ public void setValue(LONG value) { getPointer().setInt(0, value.intValue()); }
/** * Sets the value. * * @param value the new value */ public void setValue(DWORD value) { getPointer().setInt(0, value.intValue()); }
/** * Sets the value. * * @param value the new value */ public void setValue(ULONG value) { getPointer().setInt(0, value.intValue()); }
/** * Sets the value. * * @param value the new value */ public void setValue(SCODE value) { getPointer().setInt(0, value.intValue()); }
protected void setLong(long value) { if (Handle.SIZE == 4) { getPointer().setInt(0, (int)value); } else { getPointer().setLong(0, value); } } }
public void setValue(ULONG_PTR value) { if (Native.POINTER_SIZE == 4) { getPointer().setInt(0, value.intValue()); } else { getPointer().setLong(0, value.longValue()); } } public ULONG_PTR getValue() {
public void setValue(ULONG_PTR value) { if (Pointer.SIZE == 4) { getPointer().setInt(0, value.intValue()); } else { getPointer().setLong(0, value.longValue()); } }
public void setValue(ULONG_PTR value) { if (Pointer.SIZE == 4) { getPointer().setInt(0, value.intValue()); } else { getPointer().setLong(0, value.longValue()); } } public ULONG_PTR getValue() {