| java.lang.Object sun.awt.X11.Native
Native | class Native (Code) | | This class contains the collection of utility functions to help work with
native data types on different platforms similarly.
|
Method Summary | |
static long | allocateLongArray(int length) | static long[] | card32ToArray(long ptr, int length) | static long | card32ToData(long[] arr) | static boolean | getBool(long ptr) Set of helper function to read data of different PLATFORM types
from memory pointer by ptr
Note, names of types in function are NATIVE PLATFORM types
and they have the same size as they would have in C compiler
on the same platform. | static boolean | getBool(long ptr, int index) | static byte | getByte(long ptr) | static byte | getByte(long ptr, int index) | static int | getByteSize() | static long | getCard32(long ptr) Set of function to access CARD32 type. | static long | getCard32(long ptr, int index) | static int | getCard32Size() | static int | getInt(long ptr) | static int | getInt(long ptr, int index) | static int | getIntSize() | static long | getLong(long ptr) | static long | getLong(long ptr, int index) | static int | getLongSize() | static short | getShort(long ptr) | static int | getShortSize() | static short | getUByte(long ptr) | static short | getUByte(long ptr, int index) | static int | getUByteSize() | static long | getUInt(long ptr) | static long | getUInt(long ptr, int index) | static int | getUIntSize() | static long | getULong(long ptr) | static int | getUShort(long ptr) | static int | getUShortSize() | static long | getWindow(long ptr) | static long | getWindow(long ptr, int index) | static int | getWindowSize() Set of function to return sizes of C data of the appropriate
type. | static void | put(long ptr, long[] arr) Stores Java long[] array into memory. | static void | putBool(long ptr, boolean data) | static void | putBool(long ptr, int index, boolean data) | static void | putByte(long ptr, byte data) | static void | putByte(long ptr, int index, byte data) | static void | putCard32(long ptr, long value) | static void | putCard32(long ptr, int index, long value) | static void | putInt(long ptr, int data) | static void | putInt(long ptr, int index, int data) | static void | putLong(long ptr, long data) | static void | putLong(long ptr, int index, long data) | static void | putLong(long ptr, Vector arr) Stores Java Vector of Longs into memory. | static void | putLongReverse(long ptr, Vector arr) Stores Java Vector of Longs into memory. | static void | putShort(long ptr, short data) | static void | putShort(long ptr, int index, short data) | static void | putUByte(long ptr, short data) | static void | putUByte(long ptr, int index, short data) | static void | putUInt(long ptr, long data) | static void | putUInt(long ptr, int index, long data) | static void | putULong(long ptr, long value) | static void | putUShort(long ptr, int data) | static void | putUShort(long ptr, int index, int data) | static void | putWindow(long ptr, long window) | static void | putWindow(long ptr, int index, long window) | static byte[] | toBytes(long data, int length) | static long | toData(byte[] bytes) | static long | toData(short[] shorts) | static long | toData(int[] ints) | static long | toData(long[] longs) | static long[] | toLongs(long data, int length) | static short[] | toUBytes(long data, int length) | static long | toUData(short[] bytes) | static long | toUData(int[] shorts) | static long | toUData(long[] ints) |
dataModel | static int dataModel(Code) | | |
longSize | static int longSize(Code) | | |
allocateLongArray | static long allocateLongArray(int length)(Code) | | Allocates memory for array of native long s of the size length
|
card32ToArray | static long[] card32ToArray(long ptr, int length)(Code) | | |
card32ToData | static long card32ToData(long[] arr)(Code) | | |
getBool | static boolean getBool(long ptr)(Code) | | Set of helper function to read data of different PLATFORM types
from memory pointer by ptr
Note, names of types in function are NATIVE PLATFORM types
and they have the same size as they would have in C compiler
on the same platform.
|
getBool | static boolean getBool(long ptr, int index)(Code) | | |
getByte | static byte getByte(long ptr)(Code) | | |
getByte | static byte getByte(long ptr, int index)(Code) | | |
getByteSize | static int getByteSize()(Code) | | Access to C byte data(one byte)
|
getCard32 | static long getCard32(long ptr)(Code) | | Set of function to access CARD32 type. All data which types are derived
from CARD32 should be accessed using this accessors.
These types are: XID(Window, Drawable, Font, Pixmap, Cursor, Colormap, GContext, KeySym),
Atom, Mask, VisualID, Time
|
getCard32 | static long getCard32(long ptr, int index)(Code) | | |
getCard32Size | static int getCard32Size()(Code) | | |
getInt | static int getInt(long ptr)(Code) | | |
getInt | static int getInt(long ptr, int index)(Code) | | |
getIntSize | static int getIntSize()(Code) | | Access to C int data(four bytes)
|
getLong | static long getLong(long ptr)(Code) | | |
getLong | static long getLong(long ptr, int index)(Code) | | Returns index's element of the array of native long pointed by ptr
|
getLongSize | static int getLongSize()(Code) | | Access to C long data(size depends on platform)
|
getShort | static short getShort(long ptr)(Code) | | |
getShortSize | static int getShortSize()(Code) | | Access to C short data(two bytes)
|
getUByte | static short getUByte(long ptr)(Code) | | |
getUByte | static short getUByte(long ptr, int index)(Code) | | |
getUByteSize | static int getUByteSize()(Code) | | Access to C unsigned byte data(one byte)
|
getUInt | static long getUInt(long ptr)(Code) | | |
getUInt | static long getUInt(long ptr, int index)(Code) | | |
getUIntSize | static int getUIntSize()(Code) | | Access to C unsigned int data(four bytes)
|
getULong | static long getULong(long ptr)(Code) | | Access to C "unsigned long" date type, which is XID in X
|
getUShort | static int getUShort(long ptr)(Code) | | |
getUShortSize | static int getUShortSize()(Code) | | Access to C unsigned short data(two bytes)
|
getWindow | static long getWindow(long ptr)(Code) | | |
getWindow | static long getWindow(long ptr, int index)(Code) | | |
getWindowSize | static int getWindowSize()(Code) | | Set of function to return sizes of C data of the appropriate
type.
|
put | static void put(long ptr, long[] arr)(Code) | | Stores Java long[] array into memory. Memory location is treated as array
of native long s
|
putBool | static void putBool(long ptr, boolean data)(Code) | | |
putBool | static void putBool(long ptr, int index, boolean data)(Code) | | |
putByte | static void putByte(long ptr, byte data)(Code) | | Stores to C byte data(one byte)
|
putByte | static void putByte(long ptr, int index, byte data)(Code) | | |
putCard32 | static void putCard32(long ptr, long value)(Code) | | |
putCard32 | static void putCard32(long ptr, int index, long value)(Code) | | |
putInt | static void putInt(long ptr, int data)(Code) | | Stores to C int data(four bytes)
|
putInt | static void putInt(long ptr, int index, int data)(Code) | | |
putLong | static void putLong(long ptr, long data)(Code) | | Stores to C long data(four bytes)
Note: data has long type
to be able to keep 64-bit C long data
|
putLong | static void putLong(long ptr, int index, long data)(Code) | | |
putLong | static void putLong(long ptr, Vector arr)(Code) | | Stores Java Vector of Longs into memory. Memory location is treated as array
of native long s
|
putLongReverse | static void putLongReverse(long ptr, Vector arr)(Code) | | Stores Java Vector of Longs into memory. Memory location is treated as array
of native long s. Array is stored in reverse order
|
putShort | static void putShort(long ptr, short data)(Code) | | Stores to C short data(two bytes)
|
putShort | static void putShort(long ptr, int index, short data)(Code) | | |
putUByte | static void putUByte(long ptr, short data)(Code) | | Stores to C unsigned byte data(one byte)
|
putUByte | static void putUByte(long ptr, int index, short data)(Code) | | |
putUInt | static void putUInt(long ptr, long data)(Code) | | Stores to C unsigned int data(four bytes)
|
putUInt | static void putUInt(long ptr, int index, long data)(Code) | | |
putULong | static void putULong(long ptr, long value)(Code) | | |
putUShort | static void putUShort(long ptr, int data)(Code) | | Stores to C unsigned short data(two bytes)
|
putUShort | static void putUShort(long ptr, int index, int data)(Code) | | |
putWindow | static void putWindow(long ptr, long window)(Code) | | |
putWindow | static void putWindow(long ptr, int index, long window)(Code) | | |
toBytes | static byte[] toBytes(long data, int length)(Code) | | Converts length bytes of data pointed by data into byte array
Returns null if data is zero
Parameters: data - native pointer to native memory Parameters: length - size in bytes of native memory |
toData | static long toData(byte[] bytes)(Code) | | Stores byte array into native memory and returns pointer to this memory
Returns 0 if bytes is null
|
toData | static long toData(short[] shorts)(Code) | | |
toData | static long toData(int[] ints)(Code) | | |
toData | static long toData(long[] longs)(Code) | | |
toLongs | static long[] toLongs(long data, int length)(Code) | | Converts length bytes of data pointed by data into byte array
Returns null if data is zero
Parameters: data - native pointer to native memory Parameters: length - size in longs(platform dependent) of native memory |
toUBytes | static short[] toUBytes(long data, int length)(Code) | | Converts length usnigned bytes of data pointed by data into
short array
Returns null if data is zero
Parameters: data - native pointer to native memory Parameters: length - size in bytes of native memory |
toUData | static long toUData(short[] bytes)(Code) | | Stores short array as unsigned bytes into native memory and returns pointer
to this memory
Returns 0 if bytes is null
|
toUData | static long toUData(int[] shorts)(Code) | | Stores int array as unsigned shorts into native memory and returns pointer
to this memory
Returns 0 if bytes is null
|
toUData | static long toUData(long[] ints)(Code) | | Stores long array as unsigned intss into native memory and returns pointer
to this memory
Returns 0 if bytes is null
|
|
|