Top Description Inners Fields Constructors Methods
com.sun.glass.ui.monocle

pack-priv Class C

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer

The C class provides ways to wrap pointers to native C structures in Java objects. C is a singleton. Its instance is obtained by calling C.getC().

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
C.Structure

Structure is used for wrapping C structs in Java objects.

Field Summary

Modifier and TypeField and Description
private static C

Constructor Summary

AccessConstructor and Description
private
C()

Method Summary

Modifier and TypeMethod and Description
pack-priv static C
getC()

Obtains the single instance of LinuxSystem.

pack-priv native long

Returns:

the memory address referenced by b
GetDirectBufferAddress
(ByteBuffer
a direct ByteBuffer
b
)

Finds the memory address pointed to by a direct ByteBuffer

pack-priv native ByteBuffer

Returns:

a new ByteBuffer providing direct access to the requested memory region
NewDirectByteBuffer
(long
The memory address for which to create a ByteBuffer.
ptr
,
int
The byte length of memory to be wrapped in the ByteBuffer.
size
)

Create a new ByteBuffer that provides access to the memory at a given address

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instanceback to summary
private static C instance

Constructor Detail

Cback to summary
private C()

Method Detail

getCback to summary
pack-priv static C getC()

Obtains the single instance of LinuxSystem.

GetDirectBufferAddressback to summary
pack-priv native long GetDirectBufferAddress(ByteBuffer b)

Finds the memory address pointed to by a direct ByteBuffer

Parameters
b:ByteBuffer

a direct ByteBuffer

Returns:long

the memory address referenced by b

NewDirectByteBufferback to summary
pack-priv native ByteBuffer NewDirectByteBuffer(long ptr, int size)

Create a new ByteBuffer that provides access to the memory at a given address

Parameters
ptr:long

The memory address for which to create a ByteBuffer.

size:int

The byte length of memory to be wrapped in the ByteBuffer.

Returns:ByteBuffer

a new ByteBuffer providing direct access to the requested memory region

com.sun.glass.ui.monocle back to summary

pack-priv abstract Class C.Structure

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.glass.ui.monocle.EPDSystem.IntStructure, com.sun.glass.ui.monocle.EPDSystem.MxcfbWaveformModes, com.sun.glass.ui.monocle.EPDSystem.MxcfbUpdateData, com.sun.glass.ui.monocle.LinuxSystem.InputAbsInfo, com.sun.glass.ui.monocle.LinuxSystem.FbVarScreenInfo, com.sun.glass.ui.monocle.MX6Cursor.MXCFBColorKey, com.sun.glass.ui.monocle.MX6Cursor.MXCFBGblAlpha, com.sun.glass.ui.monocle.MX6Cursor.MXCFBPos, com.sun.glass.ui.monocle.X.XSetWindowAttributes, com.sun.glass.ui.monocle.X.XEvent, com.sun.glass.ui.monocle.X.XDisplay, com.sun.glass.ui.monocle.X.XColor

Structure is used for wrapping C structs in Java objects. A subclass of Structure must implement the method sizeof() to define the size of the struct it wraps.

Field Summary

Modifier and TypeField and Description
pack-priv final ByteBuffer
b

pack-priv final long
p

Constructor Summary

AccessConstructor and Description
protected
Structure()

Create a new Structure wrapping a new C struct

protected
Structure(long
The memory address of the C struct to wrap
ptr
)

Create a new Structure wrapping the C struct at the given location in memory

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract int
sizeof()

The size of the C struct in bytes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bback to summary
pack-priv final ByteBuffer b
pback to summary
pack-priv final long p

Constructor Detail

Structureback to summary
protected Structure()

Create a new Structure wrapping a new C struct

Structureback to summary
protected Structure(long ptr)

Create a new Structure wrapping the C struct at the given location in memory

Parameters
ptr:long

The memory address of the C struct to wrap

Method Detail

sizeofback to summary
pack-priv abstract int sizeof()

The size of the C struct in bytes. Must be overridden by subclasses.