|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.swt.internal
Class Callback

java.lang.Objectorg.eclipse.swt.internal.Callback
- public class Callback
- extends java.lang.Object
Instances of this class represent entry points into Java which can be invoked from operating system level callback routines.
IMPORTANT: A callback is only valid when invoked on the thread which created it. The results are undefined (and typically bad) when a callback is passed out to the operating system (or other code) in such a way that the callback is called from a different thread.
| Field Summary | |
(package private) long |
address
|
(package private) int |
argCount
|
(package private) boolean |
isArrayBased
|
(package private) boolean |
isStatic
|
(package private) java.lang.String |
method
|
(package private) java.lang.Object |
object
|
(package private) static java.lang.String |
PTR_SIGNATURE
|
(package private) static int |
PTR_SIZEOF
|
(package private) java.lang.String |
signature
|
(package private) static java.lang.String |
SIGNATURE_0
|
(package private) static java.lang.String |
SIGNATURE_1
|
(package private) static java.lang.String |
SIGNATURE_2
|
(package private) static java.lang.String |
SIGNATURE_3
|
(package private) static java.lang.String |
SIGNATURE_4
|
(package private) static java.lang.String |
SIGNATURE_N
|
| Constructor Summary | |
Callback(java.lang.Object object,
java.lang.String method,
int argCount)
Constructs a new instance of this class given an object to send the message to, a string naming the method to invoke and an argument count. |
|
Callback(java.lang.Object object,
java.lang.String method,
int argCount,
boolean isArrayBased)
Constructs a new instance of this class given an object to send the message to, a string naming the method to invoke, an argument count and a flag indicating whether or not the arguments will be passed in an array. |
|
| Method Summary | |
(package private) static long |
bind(Callback callback)
Allocates the native level resources associated with the callback. |
void |
dispose()
Releases the native level resources associated with the callback, and removes all references between the callback and other objects. |
long |
getAddress()
Returns the address of a block of machine code which will invoke the callback represented by the receiver. |
static boolean |
getEnabled()
Returns whether or not callbacks which are triggered at the native level should cause the messages described by the matching Callback objects to be invoked. |
static int |
getEntryCount()
Returns the number of times the system has been recursively entered through a callback. |
static java.lang.String |
getPlatform()
Returns the SWT platform name. |
(package private) static java.lang.String |
getSignature(int argCount)
|
(package private) static void |
ignoreCallbacks(boolean ignore)
Deprecated. |
(package private) static int |
PTR_sizeof()
|
static void |
reset()
Immediately wipes out all native level state associated with all callbacks. |
static void |
setEnabled(boolean enable)
Indicates whether or not callbacks which are triggered at the native level should cause the messages described by the matching Callback objects to be invoked. |
(package private) static void |
unbind(Callback callback)
Releases the native level resources associated with the callback. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
object
java.lang.Object object
method
java.lang.String method
signature
java.lang.String signature
argCount
int argCount
address
long address
isStatic
boolean isStatic
isArrayBased
boolean isArrayBased
PTR_SIZEOF
static final int PTR_SIZEOF
PTR_SIGNATURE
static final java.lang.String PTR_SIGNATURE
SIGNATURE_0
static final java.lang.String SIGNATURE_0
SIGNATURE_1
static final java.lang.String SIGNATURE_1
SIGNATURE_2
static final java.lang.String SIGNATURE_2
SIGNATURE_3
static final java.lang.String SIGNATURE_3
SIGNATURE_4
static final java.lang.String SIGNATURE_4
SIGNATURE_N
static final java.lang.String SIGNATURE_N
| Constructor Detail |
Callback
public Callback(java.lang.Object object, java.lang.String method, int argCount)
- Constructs a new instance of this class given an object
to send the message to, a string naming the method to
invoke and an argument count. Note that, if the object
is an instance of
Classit is assumed that the method is a static method on that class.
Callback
public Callback(java.lang.Object object, java.lang.String method, int argCount, boolean isArrayBased)
- Constructs a new instance of this class given an object
to send the message to, a string naming the method to
invoke, an argument count and a flag indicating whether
or not the arguments will be passed in an array. Note
that, if the object is an instance of
Classit is assumed that the method is a static method on that class.
| Method Detail |
PTR_sizeof
static final int PTR_sizeof()
bind
static long bind(Callback callback)
- Allocates the native level resources associated with the
callback. This method is only invoked from within the
constructor for the argument.
dispose
public void dispose()
- Releases the native level resources associated with the callback,
and removes all references between the callback and
other objects. This helps to prevent (bad) application code
from accidentally holding onto extraneous garbage.
getAddress
public long getAddress()
- Returns the address of a block of machine code which will
invoke the callback represented by the receiver.
getPlatform
public static java.lang.String getPlatform()
- Returns the SWT platform name.
getEntryCount
public static int getEntryCount()
- Returns the number of times the system has been recursively entered
through a callback.
Note: This should not be called by application code.
- Since:
- 2.1
getSignature
static java.lang.String getSignature(int argCount)
setEnabled
public static final void setEnabled(boolean enable)
- Indicates whether or not callbacks which are triggered at the
native level should cause the messages described by the matching
Callbackobjects to be invoked. This method is used to safely shut down SWT when it is run within environments which can generate spurious events.Note: This should not be called by application code.
getEnabled
public static final boolean getEnabled()
- Returns whether or not callbacks which are triggered at the
native level should cause the messages described by the matching
Callbackobjects to be invoked. This method is used to safely shut down SWT when it is run within environments which can generate spurious events.Note: This should not be called by application code.
ignoreCallbacks
static final void ignoreCallbacks(boolean ignore)
- Deprecated.
- This might be called directly from native code in environments which can generate spurious events. Check before removing it.
- This might be called directly from native code in environments which can generate spurious events. Check before removing it.
reset
public static final void reset()
- Immediately wipes out all native level state associated
with all callbacks.
WARNING: This operation is extremely dangerous, and should never be performed by application code.
unbind
static final void unbind(Callback callback)
- Releases the native level resources associated with the callback.
|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.eclipse.swt.internal.Callback