SwfdecAsRelay

SwfdecAsRelay — object for attaching to Actionscript objects

Synopsis


#include <swfdec/swfdec.h>

                    SwfdecAsRelay;
                    SwfdecAsRelayClass;
gboolean            swfdec_as_relay_call                (SwfdecAsRelay *relay,
                                                         const char *name,
                                                         guint argc,
                                                         SwfdecAsValue *argv,
                                                         SwfdecAsValue *return_value);
SwfdecAsObject*     swfdec_as_relay_get_as_object       (SwfdecAsRelay *relay);

Object Hierarchy

  GObject
   +----SwfdecGcObject
         +----SwfdecAsRelay
               +----SwfdecAsFunction

Description

SwfdecAsRelay objects can be attached to a SwfdecAsObject using swfdec_as_object_relay(). You can then query an object for its relay in your own native function and use it there, for example by using SWFDEC_AS_CHECK().

Details

SwfdecAsRelay

typedef struct _SwfdecAsRelay SwfdecAsRelay;

This object has no public members.


SwfdecAsRelayClass

typedef struct {
} SwfdecAsRelayClass;

This is the base class for all objects that can be attached to a SwfdecAsObject. It has no virtual functions.


swfdec_as_relay_call ()

gboolean            swfdec_as_relay_call                (SwfdecAsRelay *relay,
                                                         const char *name,
                                                         guint argc,
                                                         SwfdecAsValue *argv,
                                                         SwfdecAsValue *return_value);

Calls the function named name on the given object. This function is essentially equal to the folloeing Actionscript code:

@return_value = @object.@name (@argv[0], ..., @argv[argc-1]);

relay :

a SwfdecAsRelay

name :

garbage-collected string naming the function to call.

argc :

number of arguments to provide to function

argv :

arguments or NULL when argc is 0

return_value :

location to take the return value of the call or NULL to ignore the return value.

Returns :

TRUE if object had a function with the given name, FALSE otherwise

swfdec_as_relay_get_as_object ()

SwfdecAsObject*     swfdec_as_relay_get_as_object       (SwfdecAsRelay *relay);

Gets the Actionscript object associated with this object.

relay :

a SwfdecAsRelay.

Returns :

The SwfdecAsObject associated with this relay.