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);
DSOTEXPORT as_environment(VM &vm)
Definition: as_environment.cpp:106
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:168
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
ActionScript value type.
Definition: as_value.h:95
void set_target(DisplayObject *target)
Set default target for timeline opcodes.
Definition: as_environment.h:68
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
VGPath path
Definition: testr_gtk.cpp:84
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
as_value pop()
Pops an as_value off the stack top and return it.
Definition: as_environment.h:88
Definition: SafeStack.h:41
size_t stack_size() const
Definition: as_environment.h:117
void push(const as_value &val)
Push a value on the stack.
Definition: as_environment.h:83
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
Provides information about timeline context.
Definition: as_environment.h:50
DisplayObject * target() const
Definition: as_environment.h:61
Definition: SafeStack.h:29
int get_version() const
Return the SWF version we're running for.
Definition: as_environment.cpp:276
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
void reset_target()
Definition: as_environment.h:80
void set_original_target(DisplayObject *target)
Definition: as_environment.h:73
as_value & top(size_t dist) const
Get stack value at the given distance from top.
Definition: as_environment.h:102
void drop(size_t count)
Drop 'count' values off the top of the stack.
Definition: as_environment.h:111
void markReachableResources() const
Mark all reachable resources.
Definition: as_environment.cpp:282
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
#define DSOEXPORT
Definition: dsodefs.h:55
int getSWFVersion(const as_environment &env)
Definition: as_environment.cpp:657
VM & getVM() const
Definition: as_environment.h:59
string_table & getStringTable(const as_environment &env)
Definition: as_environment.cpp:639
The AVM1 virtual machine.
Definition: VM.h:71
Dist dist
Definition: BitmapData_as.cpp:198
#define DSOTEXPORT
Definition: dsodefs.h:63
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
std::vector< as_object * > ScopeStack
A stack of objects used for variables/members lookup.
Definition: as_environment.h:55
DisplayObject * findTarget(const as_environment &env, const std::string &path)
Find the DisplayObject referenced by the given path.
Definition: as_environment.cpp:632
DisplayObject * get_original_target() const
Definition: as_environment.h:77
movie_root & getRoot(const as_environment &env)
Definition: as_environment.cpp:645
bool parsePath(const std::string &var_path_in, std::string &path, std::string &var)
Definition: as_environment.cpp:397