org.gnu.glib
org.gnome.glib.Object
.
You should be aware that there is a considerably different API
in the new library: the architecture is completely different
and most notably internals are no longer exposed to public view.public class GObject extends Struct
Modifier and Type | Field and Description |
---|---|
protected boolean |
eventsInitialized
Deprecated.
Event initialization marker.
|
Modifier | Constructor and Description |
---|---|
protected |
GObject()
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
|
GObject(Handle handle)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
|
GObject(Type type)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
Modifier and Type | Method and Description |
---|---|
int |
addEventHandler(java.lang.String name,
java.lang.Object cbrecv)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
int |
addEventHandler(java.lang.String name,
java.lang.Object cbrecv,
java.lang.Object data)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
int |
addEventHandler(java.lang.String name,
java.lang.String func,
java.lang.Class cbrecv)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
int |
addEventHandler(java.lang.String name,
java.lang.String func,
java.lang.Class cbrecv,
java.lang.Object data)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
int |
addEventHandler(java.lang.String name,
java.lang.String func,
java.lang.Object cbrecv)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
int |
addEventHandler(java.lang.String name,
java.lang.String func,
java.lang.Object cbrecv,
boolean shouldCopyIfBoxed)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
int |
addEventHandler(java.lang.String name,
java.lang.String func,
java.lang.Object cbrecv,
java.lang.Object data)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
addListener(PropertyNotificationListener listen)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
static void |
collect()
Deprecated.
|
protected void |
finalize()
Deprecated.
|
void |
freezeNotify()
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
boolean |
getBooleanProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
protected static java.lang.Object |
getData(Handle handle,
java.lang.String key)
Deprecated.
|
java.lang.Object |
getData(java.lang.String key)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
double |
getDoubleProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
java.lang.Class |
getEventListenerClass(java.lang.String signal)
Deprecated.
|
EventType |
getEventType(java.lang.String signal)
Deprecated.
|
float |
getFloatProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
static GObject |
getGObjectFromHandle(Handle hndl)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
protected static int |
getIntFromHandle(Handle handle)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
int |
getIntProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
java.lang.Object |
getJavaObjectProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
long |
getLongProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
Value |
getProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
protected static java.lang.String |
getStringFromHandle(Handle handle)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
java.lang.String |
getStringProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
boolean |
hasProperty(java.lang.String name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
protected static java.lang.Object |
instantiateJGObjectFromGType(int type,
Handle handle)
Deprecated.
|
void |
notify(java.lang.String property_name)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
removeEventHandler(int handler)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
removeListener(PropertyNotificationListener listen)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
protected GObject |
retrieveGObject(Handle hndl)
Deprecated.
This method is deprecated in favor of
getGObjectFromHandle(org.gnu.glib.Handle) . |
void |
setBooleanProperty(java.lang.String name,
boolean value)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
protected static void |
setData(Handle handle,
java.lang.String key,
java.lang.Object data)
Deprecated.
|
void |
setData(java.lang.String key,
java.lang.Object data)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
setDoubleProperty(java.lang.String name,
double value)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
setFloatProperty(java.lang.String name,
float value)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
setIntProperty(java.lang.String name,
int value)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
setJavaObjectProperty(java.lang.String name,
java.lang.Object value)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
setLongProperty(java.lang.String name,
long value)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
setProperty(java.lang.String name,
Value val)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
setStringProperty(java.lang.String name,
java.lang.String value)
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
void |
thawNotify()
Deprecated.
Superceeded by java-gnome 4.0; a method along these lines
may well exist in the new bindings, but if it does it likely
has a different name or signature due to the shift to an
algorithmic mapping of the underlying native libraries.
|
protected boolean eventsInitialized
protected GObject()
public GObject(Type type)
public GObject(Handle handle)
handle
- The handle that represents a pointer to a native resource.public int addEventHandler(java.lang.String name, java.lang.String func, java.lang.Object cbrecv)
name
- The name of the event to map.func
- The name of the callback method.cbrecv
- The name of the object that is to recieve the event.public int addEventHandler(java.lang.String name, java.lang.Object cbrecv)
name
- The name of the event to map.cbrecv
- The name of the object that is to recieve the event.public int addEventHandler(java.lang.String name, java.lang.Object cbrecv, java.lang.Object data)
name
- The name of the event to map.cbrecv
- The name of the object that is to recieve the event.data
- User defined data that will be passed to the callback.public int addEventHandler(java.lang.String name, java.lang.String func, java.lang.Object cbrecv, boolean shouldCopyIfBoxed)
name
- The name of the event to map.func
- The name of the callback method.cbrecv
- The name of the object that is to recieve the event.shouldCopyIfBoxed
- Should copy the incoming object associated with the signal.
Only for type Boxed.public int addEventHandler(java.lang.String name, java.lang.String func, java.lang.Object cbrecv, java.lang.Object data)
name
- The name of the event to map.func
- The name of the callback method.cbrecv
- The name of the object that is to recieve the event.data
- User defined data that will be passed to the callback.public int addEventHandler(java.lang.String name, java.lang.String func, java.lang.Class cbrecv)
name
- The name of the event to map.func
- The name of the static callback method.cbrecv
- The name of the class that is to recieve the event.public int addEventHandler(java.lang.String name, java.lang.String func, java.lang.Class cbrecv, java.lang.Object data)
name
- The name of the event to map.func
- The name of the static callback method.cbrecv
- The name of the class that is to recieve the event.data
- User defined data that will be passed to the callback.public void removeEventHandler(int handler)
handler
- The handler id of the event. This is the value returned from a
call to addEventHandler().public java.lang.Object getData(java.lang.String key)
key
- The association key.setData(String,Object)
public void setData(java.lang.String key, java.lang.Object data)
key
- The association key.data
- The Java Object to associate with the given key.getData(String)
public java.lang.Class getEventListenerClass(java.lang.String signal)
public EventType getEventType(java.lang.String signal)
public void setProperty(java.lang.String name, Value val)
Value
on this object. If there is a GTK property with this
name, the GTK property will be set. Otherwise, a Java-side property will
be set.
NOTE: Prefer using one of the convenience methods over using this method directly.
name
- The name of the property to set.val
- The value to set in the property.public void setIntProperty(java.lang.String name, int value)
name
- The name of the property to set.value
- The value to set in the property.setProperty( String, Value )
public void setStringProperty(java.lang.String name, java.lang.String value)
name
- The name of the property to set.value
- The value to set in the property.setProperty( String, Value )
public void setBooleanProperty(java.lang.String name, boolean value)
name
- The name of the property to set.value
- The value to set in the property.setProperty( String, Value )
public void setFloatProperty(java.lang.String name, float value)
name
- The name of the property to set.value
- The value to set in the property.setProperty( String, Value )
public void setLongProperty(java.lang.String name, long value)
name
- The name of the property to set.value
- The value to set in the property.setProperty( String, Value )
public void setDoubleProperty(java.lang.String name, double value)
name
- The name of the property to set.value
- The value to set in the property.setProperty( String, Value )
public void setJavaObjectProperty(java.lang.String name, java.lang.Object value)
name
- The name of the property to set.value
- The value to set in the property.public Value getProperty(java.lang.String name)
Value
of the given property (name).
If there is a GTK property with this name, the GTK property will be
retrived. Otherwise, a Java-side property will be returned.
NOTE: Prefer using one of the convenience methods over using this method directly.
name
- The name of the property to retrieve.public int getIntProperty(java.lang.String name)
name
- The name of the property to retrieve.public java.lang.String getStringProperty(java.lang.String name)
name
- The name of the property to retrieve.public boolean getBooleanProperty(java.lang.String name)
name
- The name of the property to retrieve.public float getFloatProperty(java.lang.String name)
name
- The name of the property to retrieve.public long getLongProperty(java.lang.String name)
name
- The name of the property to retrieve.public double getDoubleProperty(java.lang.String name)
name
- The name of the property to retrieve.public java.lang.Object getJavaObjectProperty(java.lang.String name)
name
- The name of the property to retrieve.public boolean hasProperty(java.lang.String name)
name
- The property to verify.public void addListener(PropertyNotificationListener listen)
public void removeListener(PropertyNotificationListener listen)
public void freezeNotify()
thawNotify()
is called.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
public void notify(java.lang.String property_name)
property_name
- The name of a property installed on the class of this object.public void thawNotify()
freezeNotify
. This
causes all queued "notify" signals on object to be emitted.protected GObject retrieveGObject(Handle hndl)
getGObjectFromHandle(org.gnu.glib.Handle)
.public static GObject getGObjectFromHandle(Handle hndl)
// Get a Handle from somewhere (typically as a parameter to a method // used as a callback and invoked from the C JNI side). SomeGtkClass finalobj = null; GObject obj = GObject.getGObjectFromHandle(handle); if (obj == null) { finalobj = new SomeGtkClass(handle); } else { finalobj = (SomeGtkClass) obj; }NOTE: This is for internal use only and should never need to be used in application code.
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public static final void collect()
protected static final java.lang.Object getData(Handle handle, java.lang.String key)
protected static final void setData(Handle handle, java.lang.String key, java.lang.Object data)
protected static final java.lang.Object instantiateJGObjectFromGType(int type, Handle handle)
protected static final int getIntFromHandle(Handle handle)
Handle
holds a
pointer. The native Handle is assumed to hold a C pointer to an int (
gint* ). This method dereferences that pointer and returns the value to
which it points as an integer.handle
- The native Handle holding a pointer to an int.protected static final java.lang.String getStringFromHandle(Handle handle)
Handle
holds a
pointer. The native Handle is assumed to hold a C pointer to a String
(char* ). This method dereferences that pointer and returns the value to
which it points as a String.handle
- The native Handle holding a pointer to a String.