org.rococoa.cocoa.carboncore
Class MachineLocation
java.lang.Object
com.sun.jna.Structure
com.ochafik.lang.jnaerator.runtime.Structure<MachineLocation,MachineLocation.ByValue,MachineLocation.ByReference>
org.rococoa.cocoa.carboncore.MachineLocation
- All Implemented Interfaces:
- StructureType, StructureTypeDependent, Comparable<Structure<MachineLocation,MachineLocation.ByValue,MachineLocation.ByReference>>
- Direct Known Subclasses:
- MachineLocation.ByReference, MachineLocation.ByValue
public class MachineLocation
- extends Structure<MachineLocation,MachineLocation.ByValue,MachineLocation.ByReference>
In order for MachineLocation to be endian-safe, a new member
has been added to the 'u' union in the structure. You are
encouraged to use the new member instead of the old one.
If your code looked like this:
MachineLocation.u.dlsDelta = isDLS? 0x80: 0x00;
you should change it to this:
MachineLocation.u.dls.Delta = isDLS? 0x80: 0x00;
to be endian safe. The gmtDelta remains the same; the low 24-bits
are used. Remember that order of assignment DOES matter:
This will overwrite results:
MachineLocation.u.dls.Delta = 0xAA; // u = 0xAAGGGGGG; G=Garbage
MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
when in fact reversing the assignment would have preserved the values:
MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
MachineLocation.u.dls.Delta = 0xAA; // u = 0xAABBBBBB;
NOTE: The information regarding dlsDelta in Inside Mac is INCORRECT.
It's always 0x80 for daylight-saving time or 0x00 for standard time.
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Headers/OSUtils.h:103
This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.
Methods inherited from class com.ochafik.lang.jnaerator.runtime.Structure |
byReference, byValue, castToArray, castToArray, castToArray, castToReferenceArray, castToReferenceArray, castToValueArray, castToValueArray, clone, compareTo, newArray, read, setDependency, toArray, toArray, toArray, toReferenceArray, toReferenceArray, toValueArray, toValueArray, use, use, use, use, write |
Methods inherited from class com.sun.jna.Structure |
autoRead, autoRead, autoWrite, autoWrite, clear, equals, getAutoRead, getAutoWrite, getPointer, hashCode, newInstance, readField, setAutoRead, setAutoSynch, setAutoWrite, size, toString, writeField, writeField |
latitude
public int latitude
longitude
public int longitude
u
public MachineLocation.u_union u
MachineLocation
public MachineLocation()
MachineLocation
public MachineLocation(int latitude,
int longitude,
MachineLocation.u_union u)
- Parameters:
latitude
- C type : Fract
longitude
- C type : Fract
u
- C type : u_union
newArray
public static MachineLocation[] newArray(int arrayLength)
Copyright © 2009. All Rights Reserved.