Go to the documentation of this file.
19 #ifndef GNASH_AS_ENVIRONMENT_H
20 #define GNASH_AS_ENVIRONMENT_H
69 if (!_original_target) _original_target =
target;
104 return _stack.top(dist);
114 _stack.drop(std::min(count, _stack.size()));
153 as_value
getVariable(
const as_environment& ctx,
const std::string& varname,
175 bool delVariable(
const as_environment& ctx,
const std::string& varname,
219 DisplayObject*
findTarget(
const as_environment& env,
const std::string&
path);
227 movie_root&
getRoot(
const as_environment& env);
VGPath path
Definition: testr_gtk.cpp:84
virtual MovieClip * getAsRoot()
Return the _root ActionScript property of this DisplayObject.
Definition: DisplayObject.cpp:847
VM & getVM() const
Definition: as_environment.h:59
std::string name
Definition: LocalConnection_as.cpp:149
@ d
Definition: GnashKey.h:150
The base class for all ActionScript objects.
Definition: as_object.h:162
void log_action(StringType msg, Args... args)
Definition: log.h:307
A general use string table.
Definition: string_table.h:42
string_table & getStringTable() const
Get a reference to the string table used by the VM.
Definition: VM.h:117
void log_debug(StringType msg, Args... args)
Definition: log.h:301
@ i
Definition: GnashKey.h:155
bool delVariable(const as_environment &ctx, const std::string &varname, const as_environment::ScopeStack &scope)
Delete a variable, without support for the path, using a ScopeStack.
Definition: as_environment.cpp:357
as_object * getPathElement(as_object &o, const ObjectURI &uri)
Resolve the given relative path component.
Definition: as_object.cpp:1089
void setLocal(CallFrame &c, const ObjectURI &name, const as_value &val)
Set a local variable in this CallFrame.
Definition: CallStack.cpp:80
as_value getVariable(const as_environment &env, const std::string &varname, const as_environment::ScopeStack &scope, as_object **retTarget)
Return the (possibly undefined) value of the named var.
Definition: as_environment.cpp:289
#define _(String)
Definition: log.h:44
movie_root & getRoot() const
Get a pointer to this VM's Root movie (stage)
Definition: VM.cpp:143
Provides information about timeline context.
Definition: as_environment.h:51
bool parsePath(const std::string &var_path_in, std::string &path, std::string &var)
Definition: as_environment.cpp:397
The AVM1 virtual machine.
Definition: VM.h:72
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
Global_as * getGlobal() const
Get a pointer to this VM's _global Object.
Definition: VM.cpp:149
@ m
Definition: GnashKey.h:159
@ PROP_uGLOBAL
Definition: namedStrings.h:104
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
A MovieClip is a container for DisplayObjects.
Definition: MovieClip.h:84
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
void log_error(StringType msg, Args... args)
Definition: log.h:283
int get_version() const
Return the SWF version we're running for.
Definition: as_environment.cpp:276
Definition: SafeStack.h:29
void push(const as_value &val)
Push a value on the stack.
Definition: as_environment.h:83
size_t stack_size() const
Definition: as_environment.h:117
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
std::vector< as_object * > ScopeStack
A stack of objects used for variables/members lookup.
Definition: as_environment.h:55
virtual bool get_member(const ObjectURI &uri, as_value *val)
Get a property by name if it exists.
Definition: as_object.cpp:378
DisplayObject * displayObject() const
Return the DisplayObject associated with this object.
Definition: as_object.h:638
void set_original_target(DisplayObject *target)
Definition: as_environment.h:73
void markReachableResources() const
Mark all reachable resources.
Definition: as_environment.cpp:282
@ p
Definition: GnashKey.h:162
DisplayObject * target() const
Definition: as_environment.h:61
int getSWFVersion() const
Get SWF version context for the currently running actions.
Definition: VM.h:106
bool calling() const
Whether a function call is in progress.
Definition: VM.h:240
ActionScript value type.
Definition: as_value.h:95
DSOTEXPORT as_environment(VM &vm)
Definition: as_environment.cpp:106
void drop(size_t count)
Drop 'count' values off the top of the stack.
Definition: as_environment.h:111
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
void setVariable(const as_environment &env, const std::string &varname, const as_value &val, const as_environment::ScopeStack &scope)
Given a path to variable, set its value.
Definition: as_environment.cpp:328
movie_root & getRoot(const as_environment &env)
Definition: as_environment.cpp:645
#define IF_VERBOSE_ACTION(x)
Definition: log.h:384
Definition: ObjectURI.h:147
DSOTEXPORT std::pair< bool, bool > delProperty(const ObjectURI &uri)
Delete a property of this object, unless protected from deletion.
Definition: as_object.cpp:313
DisplayObject * get_original_target() const
Definition: as_environment.h:77
as_object * getObject(const DisplayObject *d)
Return the as_object associated with a DisplayObject if it exists.
Definition: DisplayObject.h:1160
DisplayObject * findTarget(const as_environment &env, const std::string &path)
Find the DisplayObject referenced by the given path.
Definition: as_environment.cpp:632
#define DSOTEXPORT
Definition: dsodefs.h:63
virtual bool set_member(const ObjectURI &uri, const as_value &val, bool ifFound=false)
Set a member value.
Definition: as_object.cpp:583
void set_target(DisplayObject *target)
Set default target for timeline opcodes.
Definition: as_environment.h:68
int getSWFVersion(const as_environment &env)
Definition: as_environment.cpp:657
uri
Definition: test.py:12
as_value pop()
Pops an as_value off the stack top and return it.
Definition: as_environment.h:88
string_table & getStringTable(const as_environment &env)
Definition: as_environment.cpp:639
#define DSOEXPORT
Definition: dsodefs.h:55
ObjectURI getURI(const VM &vm, const std::string &str, bool lowerCaseHint=false)
Definition: VM.h:290
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:169
bool caseless(const as_object &o)
Return whether property matching is caseless.
Definition: as_object.h:924
A URI for describing as_objects.
Definition: ObjectURI.h:45
void reset_target()
Definition: as_environment.h:80
as_object * findObject(const as_environment &ctx, const std::string &path, const as_environment::ScopeStack *scope)
Find the object referenced by the given path.
Definition: as_environment.cpp:116
@ PROP_THIS
Definition: namedStrings.h:96
as_object & locals()
Access the local variables for this function call.
Definition: CallStack.h:73
as_value & top(size_t dist) const
Get stack value at the given distance from top.
Definition: as_environment.h:102
CallFrame & currentCall()
Return the CallFrame of the currently executing function.
Definition: VM.cpp:229
void setReachable() const
Mark this resource as being reachable.
Definition: GC.h:92
Definition: SafeStack.h:42