org.gnu.glib
public class GObject extends Struct
Constructor Summary | |
---|---|
GObject(Type type)
Create a new GObject of the given type. | |
GObject(Handle handle)
Create a new GObject with a handle to a native resource returned from a
call to the native libraries.
|
Method Summary | |
---|---|
int | addEventHandler(String name, String func, Object cbrecv)
Connect a event to a callback method "func" in object "cbrecv".
|
int | addEventHandler(String name, Object cbrecv)
Connect an event to a callback method that has the same name as the
event. |
int | addEventHandler(String name, Object cbrecv, Object data)
Connect a event to a callback method that has the same name as the event.
|
int | addEventHandler(String name, String func, Object cbrecv, boolean shouldCopyIfBoxed)
Connect a event to a callback method "func" in object "cbrecv".
|
int | addEventHandler(String name, String func, Object cbrecv, Object data)
Connect a event to a callback method "func" in object "cbrecv".
|
int | addEventHandler(String name, String func, Class cbrecv)
Connect a event to a static callback method "func" in Class "cbrecv".
|
int | addEventHandler(String name, String func, Class cbrecv, Object data)
Connect a event to a static callback method "func" in Class "cbrecv".
|
void | addListener(PropertyNotificationListener listen)
Add a listener that will be activated when a property is updated updated
("notify" signal). |
static void | collect() |
void | freezeNotify()
Stops emission of "notify" signals on object. |
boolean | getBooleanProperty(String name)
Convenience method for retrieving boolean properties.
|
Object | getData(String key)
Gets the Java Object associated with the given key from this
object's object association table.
|
double | getDoubleProperty(String name)
Convenience method for retrieving double properties.
|
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
float | getFloatProperty(String name)
Convenience method for retrieving float properties.
|
static GObject | getGObjectFromHandle(Handle hndl)
Gets a GObject instance for the given Handle. |
int | getIntProperty(String name)
Convenience method for retrieving int properties.
|
Object | getJavaObjectProperty(String name)
Convenience method for retrieving Object properties.
|
long | getLongProperty(String name)
Convenience method for retrieving long properties.
|
Pixbuf | getPixbufProperty(String name)
Convenience method for retrieving Pixbuf properties.
|
Value | getProperty(String name)
Get the Value of the given property (name).
|
String | getStringProperty(String name)
Convenience method for retrieving String properties.
|
boolean | hasProperty(String name)
Determines if this object supports the given named property. |
void | notify(String property_name)
Emits a "notify" signal for the given property. |
void | removeEventHandler(int handler)
Disconnect a event from its' callback method.
|
void | removeListener(PropertyNotificationListener listen)
Remove the given listener from those activated when a property is
updated. |
void | setBooleanProperty(String name, boolean value)
Convenience method for setting boolean properties.
|
void | setData(String key, Object data)
Sets an association from a String to a Java Object to be
stored in the GTK object's table of associations. |
void | setDoubleProperty(String name, double value)
Convenience method for setting double properties.
|
void | setFloatProperty(String name, float value)
Convenience method for setting float properties.
|
void | setIntProperty(String name, int value)
Convenience method for setting int properties.
|
void | setJavaObjectProperty(String name, Object value)
Convenience method for setting Object properties.
|
void | setLongProperty(String name, long value)
Convenience method for setting long properties.
|
void | setPixbufProperty(String name, Pixbuf value)
Convenience method for setting Pixbuf properties.
|
void | setProperty(String name, Value val)
Set the given property (name) with the given Value on this object. |
void | setStringProperty(String name, String value)
Convenience method for setting String properties.
|
void | thawNotify()
Reverts the effect of a previous call to freezeNotify. |
Parameters: handle The handle that represents a pointer to a native resource.
Parameters: 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.
Returns: The handle id of the event that can be used in a call to removeEventHandler.
Parameters: name The name of the event to map. cbrecv The name of the object that is to recieve the event.
Returns: The handle id of the event that can be used in a call to removeEventHandler.
Parameters: 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.
Returns: The handle id of the event that can be used in a call to removeEventHandler.
Parameters: 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.
Returns: The handle id of the event that can be used in a call to removeEventHandler.
Parameters: 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.
Returns: The handle id of the event that can be used in a call to removeEventHandler.
Parameters: 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.
Returns: The handle id of the event that can be used in a call to removeEventHandler.
Parameters: 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.
Returns: The handle id of the event that can be used in a call to removeEventHandler.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
Parameters: key The association key.
Returns: The Java Object associated with this key or null if the named association key does not exist.
See Also: setData
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
// 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.
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
Deprecated: As of libgtk-java 2.8.5, this method has been deprecated in favour of getJavaObjectProperty. Future major version releases will have this method removed. Please use with caution.
Convenience method for retrieving Pixbuf properties.Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
NOTE: Prefer using one of the convenience methods over using this method directly.
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
Parameters: name The name of the property to retrieve.
Returns: The value of the given property.
Parameters: name The property to verify.
Returns: True if the given name is a property of this object, false otherwise.
Parameters: property_name The name of a property installed on the class of this object.
Parameters: handler The handler id of the event. This is the value returned from a call to addEventHandler().
Parameters: name The name of the property to set. value The value to set in the property.
See Also: GObject
Parameters: key The association key. data The Java Object to associate with the given key.
See Also: getData
Parameters: name The name of the property to set. value The value to set in the property.
See Also: GObject
Parameters: name The name of the property to set. value The value to set in the property.
See Also: GObject
Parameters: name The name of the property to set. value The value to set in the property.
See Also: GObject
Parameters: name The name of the property to set. value The value to set in the property.
Parameters: name The name of the property to set. value The value to set in the property.
See Also: GObject
Deprecated: As of libgtk-java 2.8.5, this method has been deprecated in favour of GObject. Future major version releases will have this method removed. Please use with caution.
Convenience method for setting Pixbuf properties.Parameters: name The name of the property to set. value The value to set in the property.
See Also: GObject
NOTE: Prefer using one of the convenience methods over using this method directly.
Parameters: name The name of the property to set. val The value to set in the property.
Parameters: name The name of the property to set. value The value to set in the property.
See Also: GObject