Class GTKAction

Inherits from:
NSObject
Declared in:
GToolKit/GTKAction.h

Class Hierarchy

    NSObject
      |
      +---GTKAction

Class Description

The GTKAction class manages connections between objects. Instances of this class can be passed as arguments to GTK's -connectSignal:withAction: methods.

Last modified:
21-Feb-2002 (GToolKit/GTKAction.m)

Instance Variables

protected id target
target object of this action
protected SEL selector
target selector to perform
protected IMP method
target function pointer
protected void *data
optional user data
protected BOOL retained
user data should be retained

Method Index

Methods

+ (id) actionWithTarget:(id) _target selector:(SEL) _selector

Create an autoreleased GTKAction that will send selector to target.

See also:
-performWithSender:args:count:

+ (id) actionWithTarget:(id) _target selector:(SEL) _selector data:(const void *) _data

Create an autoreleased GTKAction that will send selector to target. data will be passed as an additional argument to the method. Note that data is not retained by default (if it is an object).

- (void *) data

Return the current user data of this action.

- (BOOL) dataRetained

Return whether the user data should be retained.

- (id) init

Initialize a new GTKAction without target and selector.

See also:
-setTarget:selector:

- (id) initWithTarget:(id) _target selector:(SEL) _selector

Initialize a new GTKAction that will send selector to target.

See also:
-performWithSender:args:count:

- (id) initWithTarget:(id) _target selector:(SEL) _selector data:(const void *) _data

Initialize a new GTKAction that will send selector to target. data will be passed as an additional argument to the method. Note that data is not retained by default (if it is an object).

- (void) performWithSender:(id) sender args:(GtkArg *) args count:(unsigned) count

Send the current selector to the target. The action will pass the sender object, count arguments from the argument array starting at args and the user data (if it has been set) to the method. The return value will be stored in args[count], which must contain the correct type information for the return value.

If the selector's return type is void and count is 0, args may be NULL.

Note: The current implementation will only pass up to 6 arguments from the args array. If it contains more values, the argument list will be truncated.

See also:
-connectSignal:withAction: in class GTK

- (void) retainData

Tell the receiver to retain its user data. Use this only if the data really is some kind of NSObject (or nil).

- (SEL) selector

Return the current selector of this action.

- (void) setData:(const void *) _data

Set the receiver's user data.

- (void) setTarget:(id) _target selector:(SEL) _selector

Set the receiver's target and/or selector. If target is nil or selector is 0, the previous target or selector value is not changed.

- (id) target

Return the current target of this action.


generated on 06-Mar-2002 by ObjcDoc 3.0.1