Gnash  0.8.10
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
gnash Namespace Reference

Anonymous namespace for callbacks, local functions, event handlers etc. More...

Namespaces

namespace  abc
 

ABC-only resources for parsing and execution.


namespace  amf
 

Functions and classes for handling AMF.


namespace  clocktime
namespace  fontlib
 

Library management.


namespace  geometry
namespace  gui
 

Named constructors.


namespace  image
 

Image handling functions and classes.


namespace  key
namespace  media
 

Gnash media handling subsystem (libmedia)


namespace  noseek_fd_adapter
namespace  NSV
 

Named String Values.


namespace  plugin
namespace  Qt4GuiPrefs
namespace  renderer
namespace  rtmp
namespace  sound
 

Gnash sound handling subsystem (libsound)


namespace  stats
namespace  SWF
 

SWF format parsing classes.


namespace  URLAccessManager
 

Manage a list of URL access configuration.


namespace  utf8
 

Utilities to convert between std::string and std::wstring.


namespace  zlib_adapter
 

Code to wrap zlib compression/decompression around an IOChannel stream.


Classes

class  GtkExt
class  AOS4AggGlue
class  AOS4CairoGlue
class  AOS4Glue
class  AOS4Gui
class  AquaGlue
class  AquaOglGlue
class  AquaGui
class  DumpGui
class  FltkAggGlue
class  FltkCairoGlue
class  FltkGui
class  GtkGlue
class  GtkAggGlue
class  GtkAggVaapiGlue
class  GtkCairoGlue
class  GtkGlExtGlue
class  GtkGui
class  Gui
 Parent class from which all GUI implementations will depend. More...
class  HaikuAggGlue
class  HaikuGui
class  NullGui
 Null GUI, used when rendering is disabled. More...
class  Player
class  KdeGlue
class  KdeAggGlue
class  KdeOpenGLGlue
class  qwidget
class  KdeGui
class  DrawingWidget
class  Qt4Glue
class  Qt4AggGlue
class  Qt4CairoGlue
class  Qt4OglGlue
class  EmbedWidget
class  Qt4Gui
class  ScreenShotter
 Handles screen dumps. More...
class  SdlAggGlue
class  SdlCairoGlue
class  SdlGlue
class  SdlOglGlue
class  SDLGui
class  BitsReader
 BitsReader is used to encapsulate bit-packed buffer reads. More...
class  CachedBitmap
 A CachedBitmap is created by the renderer in a format of its choosing. More...
class  Extension
class  GcRoot
 Abstract class to allow the GC to store "roots" into a container. More...
class  GcResource
 Collectable resource. More...
class  GC
 Garbage collector singleton. More...
struct  CreatePointer
 Return a pointer to a type. More...
class  GnashException
 Top-level gnash exception. More...
class  MediaException
 An exception from MediaHandler subsystem. More...
class  SoundException
 An exception from SoundHandler subsystem. More...
class  ParserException
 An SWF parsing exception. More...
class  ActionException
 An ActionScript error exception. More...
class  ActionLimitException
 An ActionScript limit exception. More...
class  ActionTypeError
 An ActionScript type error. More...
class  ActionParserException
class  GnashFactory
 A generic factory class for registering and retrieving objects by key. More...
class  GnashVaapiImage
 GnashImage implementation using a VA surface. More...
class  GnashVaapiImageProxy
class  GnashVaapiTexture
 OpenGL texture abstraction. More...
class  IOException
 Exception signalling an IO error. More...
class  IOChannel
 A virtual IO channel. More...
class  LogFile
class  HostFunctionReport
class  NamingPolicy
class  OverwriteExisting
class  IncrementalRename
class  NetworkAdapter
 Code to use libcurl as an IOChannel stream. More...
class  RcInitFile
class  ref_counted
 For stuff that's tricky to keep track of w/r/t ownership & cleanup. The only use for this class seems to be for putting derived classes in smart_ptr. More...
class  SharedLib
 TODO: document this class. More...
class  SharedMem
class  SimpleBuffer
 A simple buffer of bytes. More...
class  Socket
 A simple IOChannel subclass for reading and writing sockets. More...
class  StreamProvider
 A StreamProvider makes IOChannels available to the core on request. More...
class  string_table
 A general use string table. More...
class  StringNoCaseLessThan
 A case-insensitive string comparator. More...
class  StringNoCaseEqual
 A case-insensitive string equality operator. More...
class  SWFCtype
 Facet for SWF-compatible case conversion. More...
class  URL
 Uniform Resource Locator. More...
class  WallClockTimer
 General-purpose wall-clock timer. More...
class  asException
class  CodeStreamException
class  CodeStream
class  as_environment
 Provides information about timeline context. More...
class  as_function
 ActionScript Function, either builtin or SWF-defined. More...
class  Trigger
 A trigger that can be associated with a property name. More...
class  as_object
 The base class for all ActionScript objects. More...
class  IsVisible
 Function objects for visiting properties. More...
class  Exists
class  IsEnumerable
class  as_value
 ActionScript value type. More...
class  IsStrictArray
 A visitor to check whether an array is strict or not. More...
class  AsBroadcaster
 AsBroadcaster facilities. More...
class  Date_as
class  BitmapData_as
 Implements the BitmapData native type. More...
class  ColorTransform_as
class  Global_as
 The Global object ultimately contains all objects in an ActionScript run. More...
class  Mouse_as
class  NetConnection_as
 NetConnection ActionScript class. More...
class  BufferedAudioStreamer
 Buffered AudioStreamer. More...
class  NetStream_as
 NetStream_as ActionScript class. More...
class  PlayHead
 The playback controller. More...
class  SharedObjectLibrary
class  String_as
class  TextFormat_as
 The TextFormat_as Relay type stores text properties. More...
class  XML_as
 Implements XML (AS2) and flash.xml.XMLDocument (AS3) class. More...
class  XMLNode_as
 A node in an XML tree. More...
class  Bitmap
class  BitmapMovie
 A top-level movie displaying a still bitmap. More...
class  builtin_function
 This is a special type of function implementing AS-code in C++. More...
class  Button
 Button implements Flash buttons. More...
class  CharacterProxy
 A proxy for DisplayObject pointers. More...
class  ClassHierarchy
 Register all of the ActionScript classes, with their dependencies. More...
class  PoolGuard
class  DisplayList
 A list of on-stage DisplayObjects, ordered by depth. More...
class  DisplayObject
 DisplayObject is the base class for all DisplayList objects. More...
class  DisplayObjectContainer
class  DragState
 What is being dragged and how. More...
class  DynamicShape
 The DynamicShape class represents a mutable shape. More...
class  event_id
 A class to identify 'static' SWF events (system events). More...
struct  ExternalInterface
class  GradientRecord
class  BitmapFill
 A BitmapFill. More...
class  GradientFill
 A GradientFill. More...
struct  SolidFill
 A SolidFill containing one color. More...
class  FillStyle
 FillStyle describes the various fill styles for shapes. More...
class  BitmapFilter
class  BevelFilter
class  BlurFilter
class  ColorMatrixFilter
class  ConvolutionFilter
class  DropShadowFilter
class  GlowFilter
class  GradientBevelFilter
class  GradientGlowFilter
class  kerning_pair
class  Font
 A Font resource. More...
class  FreetypeGlyphsProvider
 Truetype font rasterizer/converter based on freetype library. More...
class  TargetGuard
class  Function
 A simple SWF-defined Function. More...
class  Function2
 Function2 adds extra sauce to ordinary Functions. More...
class  Edge
 Defines an edge with a control point and an anchor point. More...
class  Path
 A subset of a shape, a series of edges sharing a single set of styles. More...
class  CustomMessage
 A custom form of communication with the host application. More...
class  HostMessage
 Built-in forms of communication with the host application. More...
class  FsCallback
 Abstract base class for FS handlers. More...
class  HostInterface
 Abstract base class for hosting app handler. More...
class  InteractiveObject
 The base class for interactive objects. More...
class  LineStyle
 For the outside of outline shapes, or just bare lines. More...
class  NetworkException
class  LoadVariablesThread
 A manager for loadVariable requests. More...
class  ManualClock
 A manually advanced clock. More...
class  MorphShape
 A DisplayObject that tweens between two shapes. More...
struct  MouseButtonState
 Helper to generate mouse events, given mouse state & history. More...
class  Movie
 A top-level, standalone Movie that can be loaded and played. More...
struct  DepthComparator
class  movie_root
 This class represents the 'Stage' and top-level movie. More...
class  MovieClip
 A MovieClip is a container for DisplayObjects. More...
class  MovieFactory
class  MovieLibrary
 Library of SWF movies indexed by URL strings. More...
class  MovieLoader
 Movie loader. More...
class  NativeFunction
 This class implements functions native to the player. More...
struct  ObjectURI
 A URI for describing as_objects. More...
class  action_buffer
 A code segment. More...
class  BitmapMovieDefinition
 A "movie" definition for a bitmap file. More...
class  filter_factory
class  movie_definition
 Client program's interface to the definition of a movie or sprite. More...
class  sound_sample
 An identifier for a sound sample managed by a sound_handler. More...
class  sprite_definition
 Holds the immutable data for a sprite, as read from as SWF stream. @ should *not* derive from movie_definition, probably! More...
class  SWFMovieLoader
 Helper class handling start and execution of a loading thread. More...
class  CharacterDictionary
 The Characters dictionary associated with each SWF file. More...
class  SWFMovieDefinition
 Immutable definition of a SWF movie's contents. More...
class  SWFParser
 The SWFParser parses tags from a SWFStream. More...
class  GetterSetter
 Holder for getter/setter functions. More...
class  Property
 An abstract property. More...
class  PropertyVisitor
 An abstract property visitor. More...
class  KeyVisitor
 An abstract key visitor. More...
class  PropertyList
 Set of properties associated with an ActionScript object. More...
class  PropFlags
 Flags defining the level of protection of a member. More...
class  Relay
 This is the base class for type-specific object data. More...
class  ActiveRelay
 A native type that requires periodic updates from the core (movie_root). More...
class  rgba
 A basic RGBA type. More...
class  RunResources
 Class to group together per-run and external resources for Gnash. More...
class  Shape
 For DisplayObjects that don't store unusual state in their instances. More...
class  StaticText
 Static text fields, SWF-defined with read-only text. More...
class  VideoData
class  swf_event
 For embedding event handlers in place_object_2. More...
class  SWFCxForm
 Color transformation record. More...
class  SWFMatrix
class  SWFMovie
 Stateful Movie object (a special kind of sprite) More...
class  SWFRect
 Rectangle class, see swf defined rectangle record. More...
class  SWFStream
 SWF stream wrapper class. More...
class  SystemClock
 A system-clock based virtual clock. More...
class  TextField
 An instance of a DefineEditTextTag. More...
class  Timer
 An interval timer. More...
class  Transform
 The Transform class expresses a stage in a cumulative transformation. More...
class  UserFunction
 A UserFunction is a callable function defined in ActionScript. More...
class  Video
 VideoStream ActionScript object. More...
class  VirtualClock
 A class used to virtualize time flow. More...
class  InterruptableVirtualClock
 A VirtualClock wrapper adding pause/resume capabilities. More...
class  TryBlock
class  With
class  ActionExec
 Executor of an action_buffer. More...
class  CallFrame
 A CallFrame is an element of a CallStack. More...
class  ExecutableCode
 Any executable code. More...
class  GlobalCode
 Global code (out of any function) More...
class  EventCode
 Event code. More...
class  DelayedFunctionCall
 This class is used to queue a function call action. More...
class  FunctionArgs
 A class to contain transferable arguments for a fn_call. More...
class  fn_call
 Parameters/environment for builtin or user-defined functions callable from ActionScript. More...
struct  ThisIsNative
 Check that the 'this' pointer has a particular native type ('Relay'). More...
struct  IsDisplayObject
 Check that the 'this' pointer is a DisplayObject. More...
struct  ValidThis
 Check that the 'this' pointer is not null. More...
class  StackException
class  SafeStack
class  VM
 The AVM1 virtual machine. More...
class  FrameGuard
class  DeviceGlue
class  UinputDevice
class  InputDevice
class  MouseDevice
class  TouchDevice
class  EventDevice
class  VaapiContextData
 VA context user-data. More...
class  VaapiContext
 VA context abstraction. More...
class  VaapiDisplay
 VA display abstraction. More...
struct  VaapiDisplayGLX
 VA/GLX display representation. More...
class  X11Display
 X11 display. More...
struct  VaapiDisplayX11
 VA/X11 display representation. More...
struct  VaapiException
 VA exception abstraction. More...
class  VaapiGlobalContext
 VA API global context. More...
class  VaapiImage
 VA image abstraction. More...
class  VaapiSubpicture
 VA subpicture abstraction. More...
struct  VaapiRectangle
 VA rectangle abstraction. More...
class  VaapiSurfaceImplBase
 VA surface base representation. More...
class  VaapiSurface
 VA surface abstraction. More...
class  VaapiSurfaceGLX
 VA/GLX surface abstraction. More...
class  VaapiSurfaceProxy
 VA surface proxy used to release surface to context. More...
struct  linear_rgb_interpolator
 Interpolate in the linear RGB colorspace. More...
class  Renderer_agg_base
class  agg_bitmap_info
class  AggStyle
class  StyleHandler
class  agg_mask_style_handler
struct  AddStyles
 Style handler. More...
struct  UnivocalPath
class  PathParser
class  Renderer_cairo
class  GnashTextureFormat
 OpenGL texture format. More...
class  GnashTexture
 OpenGL texture abstraction. More...
class  Renderer
 Base class for render handlers. More...
class  GnashNPVariant
 This class holds ownership of (a copy of) an NPVariant. More...
class  nsPluginInstance
class  GnashPluginScriptObject

Typedefs

typedef geometry::Point2d point
typedef
geometry::SnappingRanges2d
< boost::int32_t > 
InvalidatedRanges
 Standard snapping 2d ranges type for invalidated bounds calculation.
typedef std::vector< std::pair
< ObjectURI, as_value > > 
SortedPropertyList
 This is used to hold an intermediate copy of an as_object's properties.
typedef std::vector< const char * > ConstantPool
 An indexed list of strings (must match the definition in action_buffer.h)
typedef std::vector
< boost::shared_ptr
< BitmapFilter > > 
Filters
typedef std::pair< FillStyle,
boost::optional< FillStyle > > 
OptionalFillPair
 Either a single or a morph-pair FillStyle.
typedef as_value(* as_c_function_ptr )(const fn_call &fn)
typedef std::vector< CallFrameCallStack
typedef std::vector< PathPathVec
typedef std::vector< const Path * > PathPtrVec
typedef GLfloat oglCoord
typedef std::vector
< geometry::Range2d< int > > 
ClipBounds

Enumerations

enum  gnash_cursor_type { CURSOR_HAND, CURSOR_NORMAL, CURSOR_INPUT }
 Enumerates mouse cursor types. More...
enum  FileType {
  GNASH_FILETYPE_JPEG, GNASH_FILETYPE_PNG, GNASH_FILETYPE_GIF, GNASH_FILETYPE_SWF,
  GNASH_FILETYPE_FLV, GNASH_FILETYPE_UNKNOWN
}
enum  Quality { QUALITY_LOW, QUALITY_MEDIUM, QUALITY_HIGH, QUALITY_BEST }
enum  primitive_types { PTYPE_STRING, PTYPE_NUMBER, PTYPE_BOOLEAN }
 These are the primitive types, see the ECMAScript reference. More...
enum  CapStyle { CAP_ROUND = 0, CAP_NONE = 1, CAP_SQUARE = 2 }
enum  JoinStyle { JOIN_ROUND = 0, JOIN_BEVEL = 1, JOIN_MITER = 2 }
enum  filter_types {
  DROP_SHADOW = 0, BLUR = 1, GLOW = 2, BEVEL = 3,
  GRADIENT_GLOW = 4, CONVOLUTION = 5, COLOR_MATRIX = 6, GRADIENT_BEVEL = 7
}
enum  VaapiCodec {
  VAAPI_CODEC_UNKNOWN, VAAPI_CODEC_MPEG2, VAAPI_CODEC_MPEG4, VAAPI_CODEC_H264,
  VAAPI_CODEC_VC1
}
 VA codec. More...
enum  { GNASH_TEXTURE_VAAPI = 1 << 0 }
 Texture flags. More...

Functions

as_value dbus_ext_setsockname (const fn_call &fn)
void dbus_class_init (as_object &obj)
as_value dejagnu_pass (const fn_call &fn)
as_value dejagnu_fail (const fn_call &fn)
as_value dejagnu_totals (const fn_call &fn)
void dejagnu_class_init (as_object &obj)
std::auto_ptr< as_objectinit_dejagnu_instance ()
 Return an instance.
as_value fileio_fopen (const fn_call &fn)
as_value fileio_fread (const fn_call &fn)
as_value fileio_fgetc (const fn_call &fn)
as_value fileio_fgets (const fn_call &fn)
as_value fileio_gets (const fn_call &fn)
as_value fileio_fwrite (const fn_call &fn)
as_value fileio_fputc (const fn_call &fn)
as_value fileio_fputs (const fn_call &fn)
as_value fileio_puts (const fn_call &fn)
as_value fileio_fclose (const fn_call &fn)
as_value fileio_getchar (const fn_call &fn)
as_value fileio_putchar (const fn_call &fn)
as_value fileio_fflush (const fn_call &fn)
as_value fileio_ftell (const fn_call &fn)
as_value fileio_feof (const fn_call &fn)
as_value fileio_fseek (const fn_call &fn)
as_value fileio_unlink (const fn_call &fn)
as_value fileio_asyncmode (const fn_call &fn)
as_value fileio_scandir (const fn_call &fn)
void fileio_class_init (as_object &where, const ObjectURI &)
as_value gtkext_window_new (const fn_call &fn)
as_value gtkext_signal_connect (const fn_call &fn)
as_value gtkext_container_set_border_width (const fn_call &fn)
as_value gtkext_button_new_with_label (const fn_call &fn)
as_value gtkext_signal_connect_swapped (const fn_call &fn)
as_value gtkext_container_add (const fn_call &fn)
as_value gtkext_widget_show (const fn_call &fn)
as_value gtkext_main (const fn_call &fn)
void dump_callbacks (map< string, as_value > &calls)
std::auto_ptr< as_objectinit_gtkext_instance ()
 Return an instance.
void gtkext_class_init (as_object &obj)
as_value lirc_ext_init (const fn_call &fn)
as_value lirc_ext_getkey (const fn_call &fn)
as_value lirc_ext_getbutton (const fn_call &fn)
void lirc_class_init (as_object &obj)
as_value mysql_connect (const fn_call &fn)
as_value mysql_qetData (const fn_call &fn)
as_value mysql_disconnect (const fn_call &fn)
as_value mysql_query (const fn_call &fn)
as_value mysql_row (const fn_call &fn)
as_value mysql_fields (const fn_call &fn)
as_value mysql_fetch (const fn_call &fn)
as_value mysql_store (const fn_call &fn)
as_value mysql_free (const fn_call &fn)
void mysql_class_init (as_object &obj)
std::auto_ptr< GuicreateAOS4Gui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
pascal OSStatus DoWindowClose (EventHandlerCallRef nextHandler, EventRef theEvent, void *userData)
void DoAdvanceMovie (EventLoopTimerRef inTimer, void *data)
std::auto_ptr< GuicreateAQUAGui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
void terminate_signal (int)
std::auto_ptr< GuicreateDumpGui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
std::auto_ptr< GuicreateFLTKGui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
bool cairoFormatFromVisual (const GdkVisual *visual, cairo_format_t *format)
std::auto_ptr< GuicreateGTKGui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
std::auto_ptr< GuicreateGTKGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateKDEGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateQt4Gui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateSDLGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateFLTKGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateAQUAGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateRISCOSGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateAOS4Gui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateHaikuGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateDumpGui (unsigned long xid, float scale, bool loop, RunResources &r)
std::auto_ptr< GuicreateHaikuGui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
std::auto_ptr< GuicreateKDEGui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
std::auto_ptr< GuicreateQt4Gui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
FileType typeFromFileName (const std::string &filename)
 Guess an appropriate file type from the filename.
std::auto_ptr< GuicreateSDLGui (unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
template<typename Container , typename Predicate >
void EraseIf (Container &c, Predicate p)
 Erase elements from an associative container based on a predicate.
template<typename T , size_t N>
size_t arraySize (T(&)[N])
 Get the size of an array without passing a pointer by mistake.
template<typename T , typename U >
void foreachSecond (T begin, T end, U op)
 Call a functor on the second element of each element in a range.
bool mkdirRecursive (const std::string &filename)
 Create a directory for a given filename.
int mkdirUserPermissions (const std::string &dirname)
 Create a directory, granting owner rwx permissions.
bool isFinite (double d)
double infinite_to_zero (double x)
template<typename T >
clamp (T i, T min, T max)
template<typename T >
lerp (T a, T b, T f)
int frnd (float f)
double twipsToPixels (int i)
template<size_t Factor>
boost::int32_t truncateWithFactor (double a)
boost::int32_t pixelsToTwips (double a)
void gnashSleep (size_t useconds)
 Sleep compatibly for the specified number of microseconds.
void processLog_trace (const boost::format &fmt)
void processLog_debug (const boost::format &fmt)
void processLog_abc (const boost::format &fmt)
void processLog_parse (const boost::format &fmt)
void processLog_network (const boost::format &fmt)
void processLog_error (const boost::format &fmt)
void processLog_unimpl (const boost::format &fmt)
void processLog_security (const boost::format &fmt)
void processLog_swferror (const boost::format &fmt)
void processLog_aserror (const boost::format &fmt)
void processLog_action (const boost::format &fmt)
void intrusive_ptr_add_ref (const ref_counted *o)
void intrusive_ptr_release (const ref_counted *o)
bool attached (const SharedMem &mem)
 Check if the SharedMem has been attached.
bool equal (string_table &st, string_table::key a, string_table::key b, bool caseless)
 Check whether two keys are equivalent.
std::auto_ptr< IOChannelmakeFileChannel (FILE *fp, bool close)
 Creates an IOChannel wrapper around a C stream.
std::auto_ptr< IOChannelmakeFileChannel (const char *filepath, const char *mode)
 Creates an IOChannel by opening the given file in the given mode.
std::ostream & operator<< (std::ostream &o, const URL &u)
template<class T >
std::string typeName (const T &inst)
as_objectfindObject (const as_environment &ctx, const std::string &path, const as_environment::ScopeStack *scope=0)
 Find the object referenced by the given path.
as_value getVariable (const as_environment &ctx, const std::string &varname, const as_environment::ScopeStack &scope, as_object **retTarget=0)
 Return the (possibly undefined) value of the named var.
void setVariable (const as_environment &ctx, const std::string &path, const as_value &val, const as_environment::ScopeStack &scope)
 Given a path to variable, set its value.
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.
bool parsePath (const std::string &var_path_in, std::string &path, std::string &var)
DisplayObjectfindTarget (const as_environment &env, const std::string &path)
 Find the DisplayObject referenced by the given path.
string_tablegetStringTable (const as_environment &env)
movie_rootgetRoot (const as_environment &env)
Global_asgetGlobal (const as_environment &env)
int getSWFVersion (const as_environment &env)
VMgetVM (const as_environment &env)
as_objectconstructInstance (as_function &ctor, const as_environment &env, fn_call::Args &args)
as_objectconstructInstance (as_function &ctor, const as_environment &env, FunctionArgs< as_value > &args)
 Construct a new object from the given constructor.
std::string getURLEncodedVars (as_object &o)
 Get url-encoded variables.
SortedPropertyList enumerateProperties (as_object &o)
 Enumerate all non-hidden properties to the passed container.
as_objectgetPathElement (as_object &o, const ObjectURI &uri)
 Resolve the given relative path component.
void sendEvent (as_object &o, const as_environment &env, const ObjectURI &name)
 Send a system event.
as_objectgetObjectWithPrototype (Global_as &gl, const ObjectURI &c)
VMgetVM (const as_object &o)
 Get the VM from an as_object.
movie_rootgetRoot (const as_object &o)
 Get the movie_root from an as_object.
string_tablegetStringTable (const as_object &o)
 Get the string_table from an as_object.
const RunResourcesgetRunResources (const as_object &o)
 Get the RunResources from an as_object.
int getSWFVersion (const as_object &o)
 Get the executing VM version from an as_object.
Global_asgetGlobal (const as_object &o)
 Get the Global object from an as_object.
as_value getMember (as_object &o, const ObjectURI &uri)
 Get a member of an object using AS lookup rules.
as_value getOwnProperty (as_object &o, const ObjectURI &uri)
 Get an own member of an object.
template<typename T >
T * get (as_object *o)
 Extract the DisplayObject attached to an object.
bool hasOwnProperty (as_object &o, const ObjectURI &uri)
 Return true if this object has the named property.
template<typename T >
bool isNativeType (const as_object *obj, T *&relay)
 Check whether the object is an instance of a known type.
bool caseless (const as_object &o)
 Return whether property matching is caseless.
bool parseNonDecimalInt (const std::string &s, double &d, bool whole)
std::string doubleToString (double val, int radix=10)
 Convert numeric value to string value, following ECMA-262 specification.
std::ostream & operator<< (std::ostream &os, const as_value &v)
 Stream operator.
template<typename T >
bool isNaN (const T &num, typename boost::enable_if< boost::is_floating_point< T > >::type *dummy=0)
template<typename T >
bool isInf (const T &num)
void setNaN (as_value &v)
 Set a value to NaN.
void accessibility_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Accessibility class.
void registerAccessibilityNative (as_object &global)
void checkArrayLength (as_object &array, const ObjectURI &uri, const as_value &val)
 Genuine arrays handle the length property in a special way.
size_t arrayLength (as_object &array)
 Get the length of an object as though it were an array.
void registerArrayNative (as_object &global)
void array_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global.Array object.
ObjectURI arrayKey (VM &vm, size_t i)
 Convert an integral value into an ObjectURI.
template<typename T >
void foreachArray (as_object &array, T &pred)
void attachAsBroadcasterStaticInterface (as_object &o)
SWFMatrix toSWFMatrix (as_object &o)
 Convert an object to a SWFMatrix.
SWFCxForm toCxForm (const ColorTransform_as &tr)
 Convert a ColorTransform_as to a SWFCxForm record.
void boolean_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global Boolean class.
void registerBooleanNative (as_object &global)
void camera_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Camera class.
void registerCameraNative (as_object &global)
void registerColorNative (as_object &o)
void color_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global Color class.
void contextmenu_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global ContextMenu class.
void contextmenuitem_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global ContextMenuItem class.
void date_class_init (as_object &global, const ObjectURI &uri)
void registerDateNative (as_object &global)
void Error_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global Error class.
void bitmapdata_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global BitmapData class.
void registerBitmapDataNative (as_object &global)
void flash_display_package_init (as_object &where, const ObjectURI &uri)
void flash_external_package_init (as_object &where, const ObjectURI &uri)
void registerExternalInterfaceNative (as_object &global)
void externalinterface_class_init (gnash::as_object &where, const gnash::ObjectURI &uri)
 Initialize the global ExternalInterface class.
void bevelfilter_class_init (as_object &where, const ObjectURI &uri)
 The prototype of flash.filters.BevelFilter is a new BitmapFilter.
void bitmapfilter_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global BitmapFilter class.
void registerBitmapFilterNative (as_object &global)
void registerBitmapClass (as_object &where, Global_as::ASFunction ctor, Global_as::Properties p, const ObjectURI &uri)
 Convenience function only for BitmapFilter subclasses.
void blurfilter_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global BlurFilter class.
void colormatrixfilter_class_init (as_object &where, const ObjectURI &uri)
 The prototype of flash.filters.ColorMatrixFilter is a new BitmapFilter.
void convolutionfilter_class_init (as_object &where, const ObjectURI &uri)
 The prototype of flash.filters.ConvolutionFilter is a new BitmapFilter.
void displacementmapfilter_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global DisplacementMapFilter class.
void dropshadowfilter_class_init (as_object &where, const ObjectURI &uri)
 The prototype of flash.filters.DropShadowFilter is a new BitmapFilter.
void flash_filters_package_init (as_object &where, const ObjectURI &uri)
void glowfilter_class_init (as_object &where, const ObjectURI &uri)
 The prototype of flash.filters.GlowFilter is a new BitmapFilter.
void gradientbevelfilter_class_init (as_object &where, const ObjectURI &uri)
 The prototype of flash.filters.GradientBevelFilter is a new BitmapFilter.
void gradientglowfilter_class_init (as_object &where, const ObjectURI &uri)
 The prototype of flash.filters.GradientGlowFilter is a new BitmapFilter.
void flash_package_init (as_object &where, const ObjectURI &uri)
void colortransform_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global ColorTransform class.
void registerColorTransformNative (as_object &global)
void flash_geom_package_init (as_object &where, const ObjectURI &uri)
void matrix_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Matrix class.
void point_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Point class.
void rectangle_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Rectangle class.
void transform_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Transform class.
void filereference_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global FileReference class.
as_value filereferencelist_ctor (const fn_call &fn)
void filereferencelist_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global FileReferenceList class.
void flash_net_package_init (as_object &where, const ObjectURI &uri)
void flash_text_package_init (as_object &where, const ObjectURI &uri)
void textrenderer_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global TextRenderer class.
void registerFunctionNative (as_object &global)
 Register Function native functions.
void function_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global Function constructor.
as_objectcreateObject (const Global_as &gl)
as_objectregisterBuiltinObject (as_object &where, Global_as::Properties p, const ObjectURI &uri)
 Register a built-in object.
as_objectregisterBuiltinClass (as_object &where, Global_as::ASFunction ctor, Global_as::Properties p, Global_as::Properties c, const ObjectURI &uri)
 Register a built-in class.
DSOEXPORT as_value invoke (const as_value &method, const as_environment &env, as_object *this_ptr, fn_call::Args &args, as_object *super=0, const movie_definition *callerDef=0)
 Call an as_value on an as_object.
as_functiongetClassConstructor (const fn_call &fn, const std::string &s)
 Convenience function for finding a class constructor.
as_value emptyFunction (const fn_call &)
as_value key_is_accessible (const fn_call &)
as_value key_get_ascii (const fn_call &fn)
 Return the ascii number of the last key pressed.
as_value key_get_code (const fn_call &fn)
 Returns the keycode of the last key pressed.
as_value key_is_down (const fn_call &fn)
 Return true if the specified (first arg keycode) key is pressed.
as_value key_is_toggled (const fn_call &)
 Given the keycode of NUM_LOCK or CAPSLOCK, returns true if the associated state is on.
void registerKeyNative (as_object &global)
void attachKeyInterface (as_object &o)
void key_class_init (as_object &where, const ObjectURI &uri)
void attachLoadableInterface (as_object &where, int flags)
 Attach some common AS code for Loadable objects.
void registerLoadableNative (as_object &global)
 Register methods as native for use by XML_as and LoadVars_as.
void loadvars_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global LoadVars class.
void writeLong (boost::uint8_t *&ptr, boost::uint32_t i)
boost::uint32_t readLong (const boost::uint8_t *buf)
template<typename T , size_t N>
std::string fromByteString (T(&buf)[N])
void localconnection_class_init (as_object &where, const ObjectURI &uri)
void registerLocalConnectionNative (as_object &global)
void registerMathNative (as_object &proto)
void math_class_init (as_object &where, const ObjectURI &uri)
void microphone_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Microphone class.
void registerMicrophoneNative (as_object &global)
void mouse_class_init (as_object &where, const ObjectURI &uri)
void movieclip_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global MovieClip class.
void registerMovieClipNative (as_object &where)
 Register ASNative MovieClip methods (AS2 only).
void registerMovieClipLoaderNative (as_object &global)
void moviecliploader_class_init (as_object &where, const ObjectURI &uri)
 Extern.
void netconnection_class_init (as_object &where, const ObjectURI &uri)
void netstream_class_init (as_object &where, const ObjectURI &uri)
void registerNetStreamNative (as_object &global)
void number_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global Number class.
void registerNumberNative (as_object &global)
void registerObjectNative (as_object &global)
void initObjectClass (as_object *proto, as_object &global, const ObjectURI &uri)
 Initialize the global Object class.
void selection_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global Selection class.
void registerSelectionNative (as_object &global)
 Register native selection methods.
void sharedobject_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global SharedObject class.
void registerSharedObjectNative (as_object &o)
void sound_class_init (as_object &where, const ObjectURI &uri)
void registerSoundNative (as_object &global)
void stage_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global Stage class.
void registerStageNative (as_object &o)
 This is the Stage ActionScript object.
void registerStringNative (as_object &global)
void string_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global String class.
void system_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global System class.
void registerSystemNative (as_object &where)
as_objectcreateTextFieldObject (Global_as &gl)
 Native function to create a plain object with TextField properties.
void textfield_class_init (as_object &where, const ObjectURI &uri)
 This provides the prototype and static methods for TextField.
void registerTextFieldNative (as_object &global)
void registerTextFormatNative (as_object &o)
void textformat_class_init (as_object &global, const ObjectURI &uri)
void textsnapshot_class_init (as_object &where, const ObjectURI &uri)
void registerTextSnapshotNative (as_object &global)
as_objectcreateVideoObject (Global_as &gl)
 Native function to create a plain object with Video properties.
void video_class_init (as_object &global, const ObjectURI &uri)
void registerVideoNative (as_object &global)
void escapeXML (std::string &text)
 Escape using XML entities.
void unescapeXML (std::string &text)
void xml_class_init (as_object &where, const ObjectURI &uri)
 Register the XML class.
void registerXMLNative (as_object &where)
 Register XML native functions.
void registerXMLNodeNative (as_object &where)
 Register ASnative methods.
void xmlnode_class_init (as_object &where, const ObjectURI &uri)
void xmlsocket_class_init (as_object &where, const ObjectURI &uri)
 Initialize the global XMLSocket class.
void registerXMLSocketNative (as_object &global)
void button_class_init (as_object &global, const ObjectURI &uri)
 Initialize the global Button class.
void registerButtonNative (as_object &global)
std::ostream & operator<< (std::ostream &o, const Button::MouseState &st)
DisplayObjectfindDisplayObjectByTarget (const std::string &tgtstr, movie_root &mr)
std::ostream & operator<< (std::ostream &os, const ConstantPool &p)
std::ostream & operator<< (std::ostream &os, const DisplayList &dl)
as_value getHeight (DisplayObject &o)
void setHeight (DisplayObject &o, const as_value &val)
void setIndexedProperty (size_t index, DisplayObject &o, const as_value &val)
 Set a property by its numeric index.
void getIndexedProperty (size_t index, DisplayObject &o, as_value &val)
 Get a property by its numeric index.
bool getDisplayObjectProperty (DisplayObject &obj, const ObjectURI &uri, as_value &val)
 DisplayObject property lookup.
bool setDisplayObjectProperty (DisplayObject &obj, const ObjectURI &uri, const as_value &val)
 Set special properties.
std::ostream & operator<< (std::ostream &o, DisplayObject::BlendMode bm)
 Stream operator for DisplayObject blend mode.
bool isReferenceable (const DisplayObject &d)
 Returns true if the DisplayObject is referenceable in ActionScript.
void copyMatrix (const DisplayObject &from, DisplayObject &to)
 Copy SWFMatrix and caches from given DisplayObjecta.
SWFMatrix getWorldMatrix (const DisplayObject &d, bool includeRoot=true)
 Get concatenated SWFMatrix (all ancestor transforms and our SWFMatrix)
SWFCxForm getWorldCxForm (const DisplayObject &d)
 Get concatenated color transform of a DisplayObject.
const SWFMatrixgetMatrix (const DisplayObject &o)
 Get local transform SWFMatrix for this DisplayObject.
const SWFCxFormgetCxForm (const DisplayObject &o)
as_objectgetObject (const DisplayObject *d)
 Return the as_object associated with a DisplayObject if it exists.
bool isKeyEvent (const event_id &e)
 Check whether an event is a keyboard event.
bool isButtonEvent (const event_id &e)
 Check whether an event is a button-like event.
std::ostream & operator<< (std::ostream &o, const event_id &ev)
bool operator== (const event_id &a, const event_id &b)
 Return whether two event_ids are equal.
bool operator< (const event_id &a, const event_id &b)
 Comparator for use in stdlib containers.
SWFMatrix gradientMatrix (GradientFill::Type t, const SWFMatrix &m)
void setLerp (FillStyle &f, const FillStyle &a, const FillStyle &b, double t)
 Set the FillStyle to a lerp of a and b.
std::ostream & operator<< (std::ostream &os, const BitmapFill::SmoothingPolicy &p)
 Output operator for bitmap smoothing policy.
std::ostream & operator<< (std::ostream &o, GradientFill::Type t)
 Output operator for GradientFill type.
std::ostream & operator<< (std::ostream &o, GradientFill::SpreadMode t)
 Output operator for GradientFill spread mode.
std::ostream & operator<< (std::ostream &o, GradientFill::InterpolationMode t)
 Output operator for GradientFill interpolation mode.
std::ostream & operator<< (std::ostream &os, const FillStyle &fs)
 Output operator for FillStyles.
bool operator< (const kerning_pair &p1, const kerning_pair &p2)
as_objectgetArguments (Function &callee, as_object &args, const fn_call &fn, as_object *caller)
 Add properties to an 'arguments' object.
std::ostream & operator<< (std::ostream &os, const HostMessage &m)
 Stream a description of any host interface message type.
std::ostream & operator<< (std::ostream &os, const CustomMessage &m)
std::ostream & operator<< (std::ostream &os, HostMessage::KnownEvent e)
 Stream a description of an expected message.
void setLerp (LineStyle &s, const LineStyle &ls1, const LineStyle &ls2, double ratio)
bool isLevelTarget (int version, const std::string &name, unsigned int &levelno)
 Return true if the given string can be interpreted as a _level name.
short stringToStageAlign (const std::string &str)
string_table::key getName (const ObjectURI &o)
 Get the name element of an ObjectURI.
std::ostream & operator<< (std::ostream &o, const CharacterDictionary &cd)
SWFMatrix readSWFMatrix (SWFStream &in)
 Read a SWFMatrix from input stream.
rgba readRGBA (SWFStream &in)
 Read an RGBA rgba from input stream.
rgba readRGB (SWFStream &in)
 Read an RGB rgba from input stream.
SWFRect readRect (SWFStream &in)
 Read a bit-packed rectangle from an SWF stream.
OptionalFillPair readFills (SWFStream &in, SWF::TagType t, movie_definition &m, bool readMorph)
 Read FillStyles from a stream.
SWFCxForm readCxFormRGB (SWFStream &in)
 Read a RGB CxForm from the input stream.
SWFCxForm readCxFormRGBA (SWFStream &in)
 Read a CxForm with alpha from the input stream.
bool readOnly (const Property &prop)
 is this a read-only member ?
bool visible (const Property &prop, int version)
 Is this member supposed to be visible by a VM of given version ?
std::ostream & operator<< (std::ostream &os, const PropFlags &fl)
rgba lerp (const rgba &a, const rgba &b, float f)
 Used for morphing.
rgba colorFromHexString (const std::string &color)
 Create an RGBA value from a hex string (e.g. FF0000)
std::ostream & operator<< (std::ostream &os, const rgba &r)
std::ostream & operator<< (std::ostream &os, const SWFCxForm &cx)
bool operator== (const SWFCxForm &a, const SWFCxForm &b)
bool operator!= (const SWFCxForm &a, const SWFCxForm &b)
bool invisible (const SWFCxForm &cx)
 Returns true when the SWFCxForm leads to alpha == 0.
std::ostream & operator<< (std::ostream &o, const SWFMatrix &m)
bool operator== (const SWFMatrix &a, const SWFMatrix &b)
std::ostream & operator<< (std::ostream &os, const SWFRect &r)
Transform operator* (const Transform &a, const Transform &b)
 Concatenate two transforms.
void declareLocal (CallFrame &c, const ObjectURI &name)
 Declare a local variable in this CallFrame.
void setLocal (CallFrame &c, const ObjectURI &name, const as_value &val)
 Set a local variable in this CallFrame.
std::ostream & operator<< (std::ostream &o, const CallFrame &fr)
template<typename T >
T::value_type * ensure (const fn_call &fn)
 Templated function to check the validity of a function call.
string_tablegetStringTable (const fn_call &fn)
movie_rootgetRoot (const fn_call &fn)
int getSWFVersion (const fn_call &fn)
VMgetVM (const fn_call &fn)
Global_asgetGlobal (const fn_call &fn)
void newAdd (as_value &op1, const as_value &op2, const VM &vm)
 Carry out ActionNewAdd.
void subtract (as_value &op1, const as_value &op2, const VM &vm)
 Carry out ActionSubtract.
as_value newLessThan (const as_value &op1, const as_value &op2, const VM &vm)
 Carry out ActionSubtract.
bool equals (const as_value &a, const as_value &b, const VM &vm)
 Check if two values are equal.
bool toBool (const as_value &v, const VM &vm)
 Convert an as_value to boolean type.
double toNumber (const as_value &v, const VM &vm)
 Convert an as_value to a double.
as_objecttoObject (const as_value &v, VM &vm)
 Convert an as_value to an object.
boost::int32_t toInt (const as_value &val, const VM &vm)
 AS2-compatible conversion to 32bit integer.
as_valueconvertToNumber (as_value &v, const VM &vm)
 Force type to number.
as_valueconvertToString (as_value &v, const VM &vm)
 Force type to string.
as_valueconvertToBoolean (as_value &v, const VM &vm)
 Force type to bool.
as_valueconvertToPrimitive (as_value &v, const VM &vm)
 Convert to the appropriate primitive type.
ObjectURI getURI (const VM &vm, const std::string &str, bool lowerCaseHint=false)
ObjectURI getURI (const VM &, NSV::NamedStrings s)
const std::string & toString (VM &vm, const ObjectURI &uri)
void vaapi_set_is_enabled (bool enabled)
 Enable video acceleration (with VA API)
bool vaapi_is_enabled ()
 Check whether video acceleration is enabled.
void DSOEXPORT vaapi_dprintf (const char *format,...)
 Debug output.
bool vaapi_check_status (VAStatus status, const char *msg)
 Check VA status for success or print out an error.
const char * string_of_FOURCC (boost::uint32_t fourcc)
 Return a string representation of a FOURCC.
const char * string_of_VAProfile (VAProfile profile)
 Return a string representation of a VAProfile.
const char * string_of_VAEntrypoint (VAEntrypoint entrypoint)
 Return a string representation of a VAEntrypoint.
double linearToSRGB (double s)
 Convert linear RGB colorspace to sRGB.
template<typename T >
cdiff (T a, T b, double ratio)
bool is_little_endian_host ()
DSOEXPORT Renderer_agg_basecreate_Renderer_agg (const char *pixelformat)
 Create a render handler.
DSOEXPORT const char * agg_detect_pixel_format (unsigned int rofs, unsigned int rsize, unsigned int gofs, unsigned int gsize, unsigned int bofs, unsigned int bsize, unsigned int bpp)
render_handler * create_render_handler_gles1 (bool init, OglGlue *glue)
bool SetVariableCallback (NPObject *npobj, NPIdentifier, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool GetVariableCallback (NPObject *npobj, NPIdentifier, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool GotoFrame (NPObject *npobj, NPIdentifier, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool IsPlaying (NPObject *npobj, NPIdentifier, const NPVariant *, uint32_t argCount, NPVariant *result)
bool LoadMovie (NPObject *npobj, NPIdentifier, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool Pan (NPObject *npobj, NPIdentifier, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool PercentLoaded (NPObject *npobj, NPIdentifier, const NPVariant *, uint32_t argCount, NPVariant *result)
bool Play (NPObject *npobj, NPIdentifier, const NPVariant *, uint32_t argCount, NPVariant *result)
bool Rewind (NPObject *npobj, NPIdentifier, const NPVariant *, uint32_t argCount, NPVariant *result)
bool SetZoomRect (NPObject *npobj, NPIdentifier, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool StopPlay (NPObject *npobj, NPIdentifier, const NPVariant *, uint32_t argCount, NPVariant *result)
bool Zoom (NPObject *npobj, NPIdentifier, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool TotalFrames (NPObject *npobj, NPIdentifier, const NPVariant *, uint32_t argCount, NPVariant *result)
bool remoteCallback (NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result)
const uint32_t & GetNPStringLen (const NPString &str)
const NPUTF8 * GetNPStringChars (const NPString &str)
void CopyVariantValue (const NPVariant &from, NPVariant &to)
std::string NPStringToString (const NPString &str)
 Construct a std::string from an NPString.
bool HasScripting ()
gboolean cleanup_childpid (gpointer data)
gboolean remove_handler (GIOChannel *, GIOCondition, gpointer)
std::string getGnashExecutable ()
void create_standalone_launcher (const std::string &page_url, const std::string &swf_url, const std::map< std::string, std::string > &params)
template<std::size_t N>
void close_fds (const int(&except)[N])
void wait_for_gdb ()
void printNPVariant (const NPVariant *value)

Variables

LogFiledbglogfile = LogFile::getDefaultInstance()
struct lirc_config * config
WindowRef myWindow = NULL
std::sig_atomic_t terminate_request = false
const int32 GNASH_PULSE = 'GPLS'
const int32 GNASH_SEND_PULSE = 'GSPL'
const int32 GNASH_QUITTING = 'GQUI'
const int GNASH_MOUSE_CLICKED = 'GMCL'
const int GNASH_MOUSE_MOVED = 'GMMV'
const int GNASH_KEY_EVENT = 'GKKE'
const int GNASH_RESIZE = 'GRSZ'
const int GNASH_HIDDEN = 'GHID'
const int GNASH_SHOWN = 'GSHN'
const int GNASH_SET_FULLSCREEN = 'GSFS'
const int GNASH_UNSET_FULLSCREEN = 'GUFS'
NPBool plugInitialized = FALSE

Detailed Description

Anonymous namespace for callbacks, local functions, event handlers etc.

Here follows handler registration code.

Anonymous namespace for generic algorithm functors.

String class interface.

SharedObject AS interface.

Functors for use with foreachArray.

Local functors.

Helper for notifying listeners.

Function objects for foreachArray()

This file should also be included for the following system functions:

Win32 implementation for getTicks.

10-4-2008 N. Coesel Added support for tslib. Tslib is a library which allows to create a stack / cascade of filters to filter and scale touch-screen output. The source doesn't come with much documentation, but writing your own filter based on an existing filter is really easy. Tslib can deal with old style H3600 style touchscreens and the newer event interface. See http://tslib.berlios.de/ to get the source.

The check_tslib() routine assumes filtering for movement and presses is properly setup. Scaling is supposed to be performed by tslib or the underlying touchscreen driver.

/ Dialogues /// /

stat() fstat() lstat() dup() readdir()

This file handles DefineFont, DefineFontInfo, DefineFontInfo2, DefineFont2, and DefineFont3. They are all handled in one file because a DefineFont2 or 3 tag contains practically the same as a DefineFont plus DefineFontInfo or DefineFontInfo2.

Note:
This file is a simple base class for any GUI glue layer code That needs to use libdevice devices. Currently this is used by both the GTK and Framebuffer GUIs for OpenVG, OpenGLES1, and OpenGLES2.
This file is the base class for all low level rendering and display devices. These devices must be probed and initialized first, before any renderering or window creation happens. The derived classes for this base class are then used by the renderer to determine functionality.

A Renderer that uses the Anti-Grain Geometry Toolkit (antigrain.com) and renders directly to a buffer (for example to the framebuffer). This backend is *completely* independent of any hardware. It can be used for rendering to the Linux FrameBuffer device, or be blitted inside a window (regardless of what operating system). It should also be no problem to render into a file... This file uses *very* heavily templates and is optimized mainly for speed, meaning that the compiler generates very, very, very much specialized code. That's good for speed but bloats up the resulting machine code.


Typedef Documentation

typedef as_value(* gnash::as_c_function_ptr)(const fn_call &fn)
typedef std::vector<CallFrame> gnash::CallStack
typedef std::vector<geometry::Range2d<int> > gnash::ClipBounds
typedef std::vector<const char*> gnash::ConstantPool

An indexed list of strings (must match the definition in action_buffer.h)

typedef std::vector<boost::shared_ptr<BitmapFilter> > gnash::Filters

Standard snapping 2d ranges type for invalidated bounds calculation.

typedef GLfloat gnash::oglCoord
typedef std::pair<FillStyle, boost::optional<FillStyle> > gnash::OptionalFillPair

Either a single or a morph-pair FillStyle.

typedef std::vector<const Path*> gnash::PathPtrVec
typedef std::vector< Path > gnash::PathVec
typedef std::vector<std::pair<ObjectURI, as_value> > gnash::SortedPropertyList

This is used to hold an intermediate copy of an as_object's properties.

AS enumerates in reverse order of creation because these values are pushed to the stack. The first value to be popped is then the oldest property.


Enumeration Type Documentation

anonymous enum

Texture flags.

Enumerator:
GNASH_TEXTURE_VAAPI 
Enumerator:
CAP_ROUND 
CAP_NONE 
CAP_SQUARE 
Enumerator:
GNASH_FILETYPE_JPEG 
GNASH_FILETYPE_PNG 
GNASH_FILETYPE_GIF 
GNASH_FILETYPE_SWF 
GNASH_FILETYPE_FLV 
GNASH_FILETYPE_UNKNOWN 
Enumerator:
DROP_SHADOW 
BLUR 
GLOW 
BEVEL 
GRADIENT_GLOW 
CONVOLUTION 
COLOR_MATRIX 
GRADIENT_BEVEL 

Enumerates mouse cursor types.

Enumerator:
CURSOR_HAND 
CURSOR_NORMAL 
CURSOR_INPUT 
Enumerator:
JOIN_ROUND 
JOIN_BEVEL 
JOIN_MITER 

These are the primitive types, see the ECMAScript reference.

Enumerator:
PTYPE_STRING 
PTYPE_NUMBER 
PTYPE_BOOLEAN 
Enumerator:
QUALITY_LOW 
QUALITY_MEDIUM 
QUALITY_HIGH 
QUALITY_BEST 

VA codec.

Enumerator:
VAAPI_CODEC_UNKNOWN 
VAAPI_CODEC_MPEG2 
VAAPI_CODEC_MPEG4 
VAAPI_CODEC_H264 
VAAPI_CODEC_VC1 

Function Documentation

void gnash::accessibility_class_init ( as_object &  where,
const ObjectURI &  uri 
)
DSOEXPORT const char * gnash::agg_detect_pixel_format ( unsigned int  rofs,
unsigned int  rsize,
unsigned int  gofs,
unsigned int  gsize,
unsigned int  bofs,
unsigned int  bsize,
unsigned int  bpp 
)

Detect pixel format based on bit mask. If the pixel format is unknown, NULL is returned. Note that a successfully detected pixel format does not necessarily mean that the pixel format is available (compiled in). The bit offsets are assumed to be in host byte order!

References is_little_endian_host().

Referenced by gnash::gui::FBAggGlue::createRenderHandler(), and gnash::GtkAggGlue::createRenderHandler().

void gnash::array_class_init ( as_object &  where,
const ObjectURI &  uri 
)
ObjectURI gnash::arrayKey ( VM &  vm,
size_t  i 
)

Convert an integral value into an ObjectURI.

NB this function adds a string value to the VM for each separate integral value. It's the way the VM works.

Parameters:
iThe integral value to find
Returns:
The ObjectURI to look up.

References getURI().

Referenced by gnash::amf::Writer::writeObject(), foreachArray(), and fileio_scandir().

size_t gnash::arrayLength ( as_object &  array)

Get the length of an object as though it were an array.

It may well be an array, but this also works on normal objects with a length property

Parameters:
arrayThe object whose array length is needed.
Returns:
The array length of the object or 0 if no length is found.

References length, getOwnProperty(), gnash::NSV::PROP_LENGTH, gnash::as_value::is_undefined(), toInt(), and getVM().

Referenced by gnash::amf::Writer::writeObject(), checkArrayLength(), and foreachArray().

template<typename T , size_t N>
size_t gnash::arraySize ( T(&)  [N])
void gnash::attachAsBroadcasterStaticInterface ( as_object &  o)
bool gnash::attached ( const SharedMem &  mem) [inline]

Check if the SharedMem has been attached.

This only checks whether the attach operation was successful, not whether the shared memory still exists and is still attached where it was initially. It is always possible for other processes to remove it while Gnash is using it, but there is nothing we can do about this.

void gnash::attachKeyInterface ( as_object &  o)
void gnash::attachLoadableInterface ( as_object &  where,
int  flags 
)

Attach some common AS code for Loadable objects.

This implements built-in functions.

References getGlobal(), gnash::as_object::init_member(), and gnash::Global_as::createFunction().

void gnash::bevelfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

The prototype of flash.filters.BevelFilter is a new BitmapFilter.

Initialize the global BitmapFilter class.

References registerBitmapClass().

void gnash::bitmapdata_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global BitmapData class.

References gnash::as_object::init_destructive_property().

void gnash::bitmapfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global BitmapFilter class.

References gnash::as_object::init_destructive_property().

void gnash::blurfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global BlurFilter class.

References registerBitmapClass().

void gnash::boolean_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::button_class_init ( as_object &  global,
const ObjectURI &  uri 
)
bool gnash::cairoFormatFromVisual ( const GdkVisual *  visual,
cairo_format_t *  format 
)
void gnash::camera_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Camera class.

References registerBuiltinClass(), and emptyFunction().

bool gnash::caseless ( const as_object &  o) [inline]
template<typename T >
T gnash::cdiff ( a,
b,
double  ratio 
)
void gnash::checkArrayLength ( as_object &  array,
const ObjectURI &  uri,
const as_value &  val 
)

Genuine arrays handle the length property in a special way.

The only distinction between Arrays and Objects is that the length property is changed when an element is added, and that changing the length can result in deleted properties.

References caseless(), getStringTable(), getURI(), getVM(), gnash::NSV::PROP_LENGTH, toInt(), gnash::ObjectURI::toString(), and arrayLength().

Referenced by gnash::as_object::set_member().

template<typename T >
T gnash::clamp ( i,
min,
max 
) [inline]

References assert, and gnash::key::i.

gboolean gnash::cleanup_childpid ( gpointer  data)
template<std::size_t N>
void gnash::close_fds ( const int(&)  except[N])
void gnash::color_class_init ( as_object &  where,
const ObjectURI &  uri 
)
rgba gnash::colorFromHexString ( const std::string &  color)

Create an RGBA value from a hex string (e.g. FF0000)

Parameters:
colorA hex string in 'rrbbgg' format. This must contain only a valid hexadecimal number. It is the caller's responsibility to check it.

References _, and gnash::rgba::parseRGB().

void gnash::colormatrixfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

The prototype of flash.filters.ColorMatrixFilter is a new BitmapFilter.

Initialize the global ColorMatrixFilter class.

References registerBitmapClass().

void gnash::colortransform_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global ColorTransform class.

References gnash::as_object::init_destructive_property().

as_object* gnash::constructInstance ( as_function &  ctor,
const as_environment &  env,
fn_call::Args &  args 
)
as_object* gnash::constructInstance ( as_function &  ctor,
const as_environment &  env,
FunctionArgs< as_value > &  args 
)

Construct a new object from the given constructor.

This function takes care of creating the new object and assigning the __proto__ property. The construct() function is then called with the new object as its 'this' object.

Parameters:
ctorThe constructor to run.
envThe environment to use for the function call.
argThe arguments to pass to the constructor function.
Returns:
A newly-created object constructed by the specified function.
void gnash::contextmenu_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global ContextMenu class.

References registerBuiltinClass().

void gnash::contextmenuitem_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global ContextMenuItem class.

References registerBuiltinClass().

as_value & gnash::convertToBoolean ( as_value &  v,
const VM &  vm 
)

Force type to bool.

Parameters:
vThe value to change to a bool type.
vmThe VM to use for the conversion.
Returns:
The value passed as v.

References gnash::as_value::set_bool(), gnash::as_value::to_bool(), gnash::VM::getSWFVersion(), and test::v.

as_value & gnash::convertToNumber ( as_value &  v,
const VM &  vm 
)

Force type to number.

Parameters:
vThe value to change to a number type.
vmThe VM to use for the conversion.
Returns:
The value passed as v.

References gnash::as_value::set_double(), gnash::as_value::to_number(), gnash::VM::getSWFVersion(), and test::v.

as_value & gnash::convertToPrimitive ( as_value &  v,
const VM &  vm 
)

Convert to the appropriate primitive type.

Parameters:
vThe value to change to a primitive type.
vmThe VM to use for the conversion.
Returns:
The value passed as v.

References gnash::key::t, gnash::as_value::defaultPrimitive(), gnash::VM::getSWFVersion(), gnash::as_value::to_primitive(), and test::v.

Referenced by newAdd().

as_value & gnash::convertToString ( as_value &  v,
const VM &  vm 
)

Force type to string.

Parameters:
vThe value to change to a string type.
vmThe VM to use for the conversion.
Returns:
The value passed as v.

References gnash::as_value::set_string(), gnash::as_value::to_string(), gnash::VM::getSWFVersion(), and test::v.

Referenced by newAdd().

void gnash::convolutionfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

The prototype of flash.filters.ConvolutionFilter is a new BitmapFilter.

Initialize the global ConvolutionFilter class.

References registerBitmapClass().

void gnash::copyMatrix ( const DisplayObject &  from,
DisplayObject &  to 
)

Copy SWFMatrix and caches from given DisplayObjecta.

Parameters:
fromThe DisplayObject to copy from
toThe DisplayObject to copy to.
void gnash::CopyVariantValue ( const NPVariant &  from,
NPVariant &  to 
) [inline]

Makes a deep copy of a NPVariant.

Parameters:
fromThe source NPVariant to copy values from.
toThe destination NPVariant.

References GetNPStringLen(), NPN_MemAlloc(), GetNPStringChars(), and NPN_RetainObject().

Referenced by gnash::GnashNPVariant::GnashNPVariant(), gnash::GnashNPVariant::operator=(), and gnash::GnashNPVariant::copy().

render_handler* gnash::create_render_handler_gles1 ( bool  init,
OglGlue *  glue 
)
DSOEXPORT Renderer_agg_base * gnash::create_Renderer_agg ( const char *  pixelformat)
void gnash::create_standalone_launcher ( const std::string &  page_url,
const std::string &  swf_url,
const std::map< std::string, std::string > &  params 
)
std::auto_ptr<Gui> gnash::createAOS4Gui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createAOS4Gui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createAQUAGui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createAQUAGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createDumpGui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createDumpGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createFLTKGui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createFLTKGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createGTKGui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createGTKGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createHaikuGui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createHaikuGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createKDEGui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createKDEGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
as_object * gnash::createObject ( const Global_as &  gl)
std::auto_ptr<Gui> gnash::createQt4Gui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createQt4Gui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createRISCOSGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
std::auto_ptr<Gui> gnash::createSDLGui ( unsigned  long,
float  ,
bool  ,
RunResourcesfloat  ,
bool  ,
unsigned  int 
)
std::auto_ptr<Gui> gnash::createSDLGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources &  r 
)
as_object * gnash::createTextFieldObject ( Global_as &  gl)

Native function to create a plain object with TextField properties.

This function calls the TextField constructor.

References getMember(), gnash::NSV::CLASS_TEXT_FIELD, gnash::as_value::to_function(), getVM(), and constructInstance().

Referenced by gnash::SWF::DefineEditTextTag::createDisplayObject().

as_object * gnash::createVideoObject ( Global_as &  gl)

Native function to create a plain object with Video properties.

This adds properties to the prototype, but does not add a Video DisplayObject.

References getObjectWithPrototype(), gnash::NSV::CLASS_VIDEO, and gnash::as_object::get_prototype().

Referenced by gnash::SWF::DefineVideoStreamTag::createDisplayObject().

void gnash::date_class_init ( as_object &  global,
const ObjectURI &  uri 
)
void gnash::dbus_class_init ( as_object &  obj)
as_value gnash::dbus_ext_setsockname ( const fn_call &  fn)
void gnash::declareLocal ( CallFrame &  c,
const ObjectURI &  name 
)

Declare a local variable in this CallFrame.

The variable is declared and set to undefined if it doesn't exist already.

Parameters:
cThe CallFrame to set the variable in.
nameThe name of the variable to declare.

References gnash::CallFrame::locals(), hasOwnProperty(), and gnash::as_object::set_member().

Referenced by gnash::Function::call(), and gnash::Function2::call().

void gnash::dejagnu_class_init ( as_object &  obj)
as_value gnash::dejagnu_fail ( const fn_call &  fn)
as_value gnash::dejagnu_pass ( const fn_call &  fn)
as_value gnash::dejagnu_totals ( const fn_call &  fn)
bool gnash::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.

Parameters:
ctxTimeline context to use for variable finding.
varnameVariable name. Must not contain path elements.
scopeThe Scope stack to use for lookups.

References assert, gnash::as_environment::getVM(), getURI(), gnash::key::i, gnash::as_object::delProperty(), getObject(), and gnash::as_environment::target().

void gnash::displacementmapfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global DisplacementMapFilter class.

References registerBitmapClass().

void gnash::DoAdvanceMovie ( EventLoopTimerRef  inTimer,
void *  data 
)

References data.

Referenced by gnash::AquaGui::run().

std::string gnash::doubleToString ( double  val,
int  radix 
)

Convert numeric value to string value, following ECMA-262 specification.

References isNaN(), isInf(), and gnash::key::n.

Referenced by gnash::as_value::to_string().

pascal OSStatus gnash::DoWindowClose ( EventHandlerCallRef  nextHandler,
EventRef  theEvent,
void *  userData 
)
void gnash::dropshadowfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

The prototype of flash.filters.DropShadowFilter is a new BitmapFilter.

Initialize the global DropShadowFilter class.

References registerBitmapClass().

void gnash::dump_callbacks ( map< string, as_value > &  calls)
as_value gnash::emptyFunction ( const fn_call &  ) [inline]
template<typename T >
T::value_type* gnash::ensure ( const fn_call &  fn)

Templated function to check the validity of a function call.

It throws an exception if the condition is not fulfilled, it throws an ActionTypeError, resulting in the function call being aborted and an undefined as_value returned. Note that not carrying out a function because the this pointer is undefined is not ActionScript behaviour in most cases. To avoid spreading its usage outside AS function implementations, this function now takes a fn_call as an argument.

Template Parameters:
TA struct defining a value_type and an operator() that checks the as_object's validity. A pointer to the value_type is returned on success, an exception thrown on failure.
Parameters:
fnThe function whose 'this' pointer should be checked.
Returns:
If the cast succeeds, the pointer cast to the requested type.

References gnash::key::T, typeName(), and source.

SortedPropertyList gnash::enumerateProperties ( as_object &  o)

Enumerate all non-hidden properties to the passed container.

NB: it is likely that this call will change the object, as accessing property values may call getter-setters. The enumeration recurses through the prototype chain. This implementation will keep track of visited object to avoid infinite loops in the prototype chain. NOTE: the Adobe player just chokes in this case. Note that the last element of the returned container is the oldest property, so iterate in reverse to mimic AS behaviour.

Parameters:
oThe object whose properties should be enumerated.
Returns:
A list of properties in reverse creation order.

References gnash::key::e, and gnash::as_object::visitProperties().

Referenced by getURLEncodedVars().

DSOEXPORT bool gnash::equal ( string_table &  st,
string_table::key  a,
string_table::key  b,
bool  caseless 
)

Check whether two keys are equivalent.

This function provides a simple way to check for equivalence either in a case sensitive or case-insensitive way. It is mainly for convenience, to reduce conditionals in the code. If the comparison is case-sensitive, the keys are equivalent if they are equal.

Parameters:
stThe string table to use
aOne key to check
bThe other key to check
caselessWhether to compare in a case-insensitive way.
Returns:
True if the keys are equivalent.

References gnash::string_table::noCase().

Referenced by gnash::media::MediaHandler::isFLV().

bool gnash::equals ( const as_value &  a,
const as_value &  b,
const VM &  vm 
)

Check if two values are equal.

Note that conversions are performed as necessary, which can result in function calls, which can have any conceivable side effect. The order of the values affects the order the conversions are performed in, so can under some circumstances change the result of the comparison. Equality comparisons depend strongly on the SWF version.

Parameters:
aThe first value to compare
bThe second value to compare
vmThe VM to use for the comparison.
Returns:
Whether the values are considered equal.

References gnash::as_value::equals(), and gnash::VM::getSWFVersion().

template<typename Container , typename Predicate >
void gnash::EraseIf ( Container &  c,
Predicate  p 
)

Erase elements from an associative container based on a predicate.

This removes elements from a container such as a map if they fulfil a particular condition. Because keys of associative container are const, we can't do this using iterators, because we can't write to them.

References gnash::key::i, gnash::key::e, and gnash::key::p.

void gnash::Error_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Error class.

References registerBuiltinClass().

void gnash::escapeXML ( std::string &  text)

Escape using XML entities.

Note this is not the same as a URL escape.

References gnash::key::i, and gnash::key::e.

void gnash::externalinterface_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global ExternalInterface class.

References gnash::as_object::init_destructive_property().

as_value gnash::fileio_asyncmode ( const fn_call &  fn)
void gnash::fileio_class_init ( as_object &  where,
const ObjectURI &   
)
as_value gnash::fileio_fclose ( const fn_call &  fn)

References assert.

as_value gnash::fileio_feof ( const fn_call &  fn)

References assert, and gnash::key::b.

as_value gnash::fileio_fflush ( const fn_call &  fn)

References assert.

as_value gnash::fileio_fgetc ( const fn_call &  fn)

References assert, and gnash::key::i.

as_value gnash::fileio_fgets ( const fn_call &  fn)

References assert.

as_value gnash::fileio_fopen ( const fn_call &  fn)
as_value gnash::fileio_fputc ( const fn_call &  fn)
as_value gnash::fileio_fputs ( const fn_call &  fn)

References gnash::fn_call::arg().

as_value gnash::fileio_fread ( const fn_call &  fn)

References assert.

as_value gnash::fileio_fseek ( const fn_call &  fn)
as_value gnash::fileio_ftell ( const fn_call &  fn)

References assert, and gnash::key::i.

as_value gnash::fileio_fwrite ( const fn_call &  fn)

References assert, and gnash::fn_call::arg().

as_value gnash::fileio_getchar ( const fn_call &  fn)

References assert, and gnash::key::i.

as_value gnash::fileio_gets ( const fn_call &  fn)

References assert, and BUFSIZE.

as_value gnash::fileio_putchar ( const fn_call &  fn)

References assert, x, and gnash::fn_call::arg().

as_value gnash::fileio_puts ( const fn_call &  fn)

References gnash::fn_call::arg().

as_value gnash::fileio_scandir ( const fn_call &  fn)
as_value gnash::fileio_unlink ( const fn_call &  fn)

References assert, and gnash::fn_call::arg().

void gnash::filereference_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::filereferencelist_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global FileReferenceList class.

References registerBuiltinClass(), and filereferencelist_ctor().

as_value gnash::filereferencelist_ctor ( const fn_call &  fn)
DisplayObject * gnash::findDisplayObjectByTarget ( const std::string &  tgtstr,
movie_root &  mr 
)
as_object * gnash::findObject ( const as_environment &  ctx,
const std::string &  path,
const as_environment::ScopeStack *  scope = 0 
)

Find the object referenced by the given path.

This is exposed to allow AS-scoped lookup from C++. Supports both /slash/syntax and dot.syntax

Parameters:
ctxTimeline context to use for variable finding.
pathVariable path.
scopeThe Scope stack to use for lookups.

References getObject(), gnash::as_environment::target(), gnash::as_environment::getVM(), gnash::VM::getStringTable(), gnash::VM::getSWFVersion(), gnash::NSV::PROP_uGLOBAL, gnash::key::p, gnash::DisplayObject::getAsRoot(), gnash::as_environment::get_original_target(), assert, IF_VERBOSE_ASCODING_ERRORS, _, getURI(), gnash::key::i, gnash::VM::getGlobal(), and caseless().

Referenced by getVariable(), setVariable(), findTarget(), gnash::DumpGui::run(), and getClassConstructor().

DisplayObject * gnash::findTarget ( const as_environment &  env,
const std::string &  path 
)

Find the DisplayObject referenced by the given path.

Supports both /slash/syntax and dot.syntax. This is a wrapper round findObject(). Note that only AS-referenceable DisplayObjects can be found by path, so that the returned object (if it exists) will have an associated as_object. This logic can't be reflected in the return type.

References findObject().

void gnash::flash_display_package_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::flash_external_package_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::flash_filters_package_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::flash_geom_package_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::flash_net_package_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::flash_package_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::flash_text_package_init ( as_object &  where,
const ObjectURI &  uri 
)
template<typename T >
void gnash::foreachArray ( as_object &  array,
T &  pred 
)
template<typename T , typename U >
void gnash::foreachSecond ( begin,
end,
op 
)

Call a functor on the second element of each element in a range.

Template Parameters:
TAn iterator type satisfying the requirements of a forward iterator
UThe type of the functor op.
Parameters:
beginThe start of the range to call op on.
endThe end of the range to call op on.
opThe function to call on each second element.

References gnash::renderer::opengl::for_each(), second, and gnash::key::_1.

Referenced by gnash::movie_root::markReachableResources(), and gnash::SharedObjectLibrary::markReachableResources().

int gnash::frnd ( float  f) [inline]
template<typename T , size_t N>
std::string gnash::fromByteString ( T(&)  buf[N])

A null byte after the marker or at the beginning of the listeners signifies the end of the list.

void gnash::function_class_init ( as_object &  where,
const ObjectURI &  uri 
)
template<typename T >
T* gnash::get ( as_object *  o)
as_object * gnash::getArguments ( Function &  callee,
as_object &  args,
const fn_call &  fn,
as_object *  caller 
)

Add properties to an 'arguments' object.

The 'arguments' variable is an array with an additional 'callee' member, set to the function being called.

References gnash::key::i, gnash::fn_call::nargs, gnash::NSV::PROP_PUSH, gnash::fn_call::arg(), gnash::as_object::init_member(), gnash::NSV::PROP_CALLEE, and gnash::NSV::PROP_CALLER.

Referenced by gnash::Function::call(), and gnash::Function2::call().

as_function* gnash::getClassConstructor ( const fn_call &  fn,
const std::string &  s 
) [inline]

Convenience function for finding a class constructor.

Only currently useful in AS2.

References findObject(), gnash::fn_call::env(), gnash::key::s, and gnash::as_value::to_function().

const SWFCxForm& gnash::getCxForm ( const DisplayObject &  o) [inline]
bool gnash::getDisplayObjectProperty ( DisplayObject &  obj,
const ObjectURI &  uri,
as_value &  val 
)

DisplayObject property lookup.

Get special properties.

This function is only called on the first object in the inheritance chain after the object's own properties have been checked. In AS2, any DisplayObject marks the end of the inheritance chain for lookups. Lookup order: 1. _level0.._level9 2. Objects on the DisplayList of a MovieClip 3. DisplayObject magic properties (_x, _y etc). 4. MovieClips' TextField variables (this is probably not the best way to do it, but as it is done like this, this must be called here. It will cause an infinite recursion otherwise.

This gets the magic properties of DisplayObjects and handles special MovieClip properties such as DisplayList members.

Parameters:
keyThe uri of the property to get.
objThe DisplayObject whose property should be got
valAn as_value to be set to the value of the property.

References gnash::key::o, getObject(), assert, getStringTable(), gnash::ObjectURI::toString(), isLevelTarget(), getSWFVersion(), getRoot(), gnash::movie_root::getLevel(), gnash::DisplayObject::to_movie(), gnash::MovieClip::getDisplayListObject(), gnash::ObjectURI::noCase(), caseless(), getName(), gnash::NSV::PROP_uROOT, gnash::DisplayObject::getAsRoot(), gnash::NSV::PROP_uGLOBAL, getGlobal(), and gnash::MovieClip::getTextFieldVariables().

Referenced by gnash::as_object::get_member().

Global_as& gnash::getGlobal ( const fn_call &  fn) [inline]
Global_as & gnash::getGlobal ( const as_environment &  env)
Global_as & gnash::getGlobal ( const as_object &  o)

Get the Global object from an as_object.

References gnash::as_object::vm(), and gnash::VM::getGlobal().

std::string gnash::getGnashExecutable ( )
as_value gnash::getHeight ( DisplayObject &  o)
void gnash::getIndexedProperty ( size_t  index,
DisplayObject &  o,
as_value &  val 
)

Get a property by its numeric index.

Used by ASHandlers to get the DisplayObject properties indexed by number

Parameters:
indexThe index of the property to get.
oThe DisplayObject whose property should be got
valAn as_value to be set to the value of the property.

References gnash::key::s, gnash::as_value::set_undefined(), and gnash::key::o.

const SWFMatrix& gnash::getMatrix ( const DisplayObject &  o) [inline]
as_value gnash::getMember ( as_object &  o,
const ObjectURI &  uri 
) [inline]

Get a member of an object using AS lookup rules.

This is a wrapper round as_object::get_member that returns undefined if the member is not found. Note: this is the only full lookup process available in ActionScript code.

Parameters:
uriProperty identifier.
oThe object whose member is required.
Returns:
Value of the member (possibly undefined), or undefined if not found. Use get_member if you need to know whether it was found or not.

Referenced by accessibility_class_init(), gnash::amf::Writer::writeObject(), getObjectWithPrototype(), gnash::AsBroadcaster::initialize(), toSWFMatrix(), registerBitmapClass(), color_class_init(), gnash::Global_as::createFunction(), gnash::Global_as::createClass(), gnash::Global_as::createArray(), gnash::Global_as::registerClasses(), gnash_view_call(), createTextFieldObject(), gnash::VM::getNative(), xml_class_init(), and gnash::XMLNode_as::object().

string_table::key gnash::getName ( const ObjectURI &  o) [inline]
const NPUTF8* gnash::GetNPStringChars ( const NPString &  str) [inline]
const uint32_t& gnash::GetNPStringLen ( const NPString &  str) [inline]
as_object* gnash::getObject ( const DisplayObject *  d) [inline]

Return the as_object associated with a DisplayObject if it exists.

Parameters:
dThe DisplayObject to check. May be null.
Returns:
null if either the DisplayObject or the associated object is null. Otherwise the associated object.

Referenced by gnash::ActionExec::getTarget(), gnash::ActionExec::getThisPointer(), findObject(), getVariable(), delVariable(), gnash::as_value::to_object(), gnash::Button::trackAsMenu(), gnash::Button::isEnabled(), gnash::Button::mouseEvent(), gnash::SWF::ButtonRecord::instantiate(), gnash::DisplayObject::pathElement(), setHeight(), gnash::DisplayObject::getTargetPath(), gnash::DisplayObject::allowHandCursor(), getDisplayObjectProperty(), gnash::SWF::DoABCTag::executeActions(), gnash::Function2::call(), gnash_view_call(), gnash::movie_root::mouseWheel(), gnash::movie_root::setFocus(), gnash::movie_root::processInvoke(), gnash::movie_root::callExternalCallback(), gnash::movie_root::findCharacterByTarget(), gnash::MovieClip::get_frame_number(), gnash::MovieClip::call_frame_actions(), gnash::MovieClip::duplicateMovieClip(), gnash::MovieClip::notifyEvent(), gnash::MovieClip::pathElement(), gnash::MovieClip::setTextFieldVariables(), gnash::MovieClip::queueLoad(), gnash::MovieClip::add_display_object(), gnash::MovieClip::replace_display_object(), gnash::MovieClip::handleFocus(), gnash::MovieClip::trackAsMenu(), gnash::MovieClip::getDisplayListObject(), gnash::MovieClip::constructAsScriptObject(), gnash::MovieClip::construct(), gnash::MovieClip::loadVariables(), gnash::MovieClip::setVariables(), gnash::SWF::ScriptLimitsTag::executeState(), gnash::SWF::StartSoundTag::executeActions(), gnash::SWF::StreamSoundBlockTag::executeActions(), gnash::SWF::SymbolClassTag::executeActions(), gnash::TextField::replaceSelection(), gnash::TextField::updateText(), gnash::TextField::setTextValue(), gnash::TextField::get_text_value(), and gnash::TextField::get_htmltext_value().

as_object * gnash::getObjectWithPrototype ( Global_as &  gl,
const ObjectURI &  c 
)
as_value gnash::getOwnProperty ( as_object &  o,
const ObjectURI &  uri 
) [inline]

Get an own member of an object.

This is a wrapper round as_object::getOwnProperty that returns undefined if the member is not found. Note: this requires two steps in ActionScript (hasOwnProperty + lookup), so is probably only for use in native functions.

Parameters:
uriProperty identifier.
oThe object whose own member is required.
Returns:
Value of the member (possibly undefined), or undefined if not found. Use get_member if you need to know whether it was found or not.

References gnash::key::p, and gnash::Property::getValue().

Referenced by arrayLength(), foreachArray(), and gnash::VM::getNative().

as_object * gnash::getPathElement ( as_object &  o,
const ObjectURI &  uri 
)

Resolve the given relative path component.

Path components are only objects, if the given string points to a non-object member, NULL is returned.

Main use if for getvariable and settarget resolution, currently implemented in as_environment.

References gnash::as_object::get_member(), gnash::as_value::is_object(), toObject(), and getVM().

Referenced by gnash::movie_root::findCharacterByTarget().

movie_root& gnash::getRoot ( const fn_call &  fn) [inline]
movie_root & gnash::getRoot ( const as_environment &  env)
movie_root & gnash::getRoot ( const as_object &  o)
const RunResources & gnash::getRunResources ( const as_object &  o)
string_table& gnash::getStringTable ( const fn_call &  fn) [inline]
string_table & gnash::getStringTable ( const as_environment &  env)
string_table & gnash::getStringTable ( const as_object &  o)
int gnash::getSWFVersion ( const fn_call &  fn) [inline]
int gnash::getSWFVersion ( const as_environment &  env)
int gnash::getSWFVersion ( const as_object &  o)

Get the executing VM version from an as_object.

References gnash::as_object::vm(), and gnash::VM::getSWFVersion().

ObjectURI gnash::getURI ( const VM &  vm,
const std::string &  str,
bool  lowerCaseHint = false 
) [inline]
ObjectURI gnash::getURI ( const VM &  ,
NSV::NamedStrings  s 
) [inline]
std::string gnash::getURLEncodedVars ( as_object &  o)

Get url-encoded variables.

This method will be used for loadVariables and loadMovie calls, to encode variables for sending over a network. Variables starting with a dollar sign will be skipped, as non-enumerable ones.

Parameters:
oThe object whose properties should be encoded.
Returns:
the url-encoded variables string without any leading delimiter.

References enumerateProperties(), data, getStringTable(), gnash::key::i, gnash::key::e, and gnash::URL::encode().

Referenced by gnash::MovieClip::loadVariables().

as_value gnash::getVariable ( const as_environment &  ctx,
const std::string &  varname,
const as_environment::ScopeStack &  scope,
as_object **  retTarget = 0 
)

Return the (possibly undefined) value of the named var.

Parameters:
ctxTimeline context to use for variable finding.
varnameVariable name. Can contain path elements.
scopeThe Scope stack to use for lookups.
retTargetIf not null, the pointer will be set to the actual object containing the found variable (if found).

References path, parsePath(), findObject(), gnash::as_object::get_member(), getURI(), gnash::as_environment::getVM(), gnash::key::d, gnash::as_object::displayObject(), gnash::key::m, gnash::DisplayObject::to_movie(), and getObject().

bool gnash::GetVariableCallback ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
VM& gnash::getVM ( const as_environment &  env) [inline]

Referenced by registerAccessibilityNative(), gnash::ActionExec::ActionExec(), gnash::ActionExec::operator()(), gnash::ActionExec::setLocalVariable(), gnash::amf::Writer::writeObject(), checkArrayLength(), arrayLength(), registerArrayNative(), array_class_init(), foreachArray(), gnash::as_object::get_member(), gnash::as_object::instanceOf(), gnash::as_object::get_prototype(), gnash::Trigger::call(), getPathElement(), getObjectWithPrototype(), gnash::as_value::to_primitive(), gnash::AsBroadcaster::initialize(), attachAsBroadcasterStaticInterface(), gnash::AsBroadcaster::registerNative(), toSWFMatrix(), registerBitmapDataNative(), registerBitmapFilterNative(), registerBitmapClass(), boolean_class_init(), registerBooleanNative(), gnash::builtin_function::call(), gnash::Button::trackAsMenu(), gnash::Button::isEnabled(), registerButtonNative(), registerCameraNative(), gnash::abc::Class::addMethod(), registerColorNative(), color_class_init(), registerColorTransformNative(), registerDateNative(), gnash::DisplayObject::blendMode(), setHeight(), gnash::DisplayObject::allowHandCursor(), gnash::SWF::DoABCTag::executeActions(), gnash::EventCode::execute(), registerExternalInterfaceNative(), fileio_fputc(), fileio_fseek(), fileio_asyncmode(), fileio_scandir(), gnash::Function::call(), gnash::Function2::call(), registerFunctionNative(), function_class_init(), gnash::Global_as::createArray(), invoke(), key_is_down(), registerKeyNative(), attachKeyInterface(), registerLoadableNative(), registerLocalConnectionNative(), gnash::abc::Machine::execute(), registerMathNative(), registerMicrophoneNative(), gnash::Mouse_as::registerNative(), gnash::MovieClip::get_frame_number(), gnash::MovieClip::call_frame_actions(), gnash::MovieClip::duplicateMovieClip(), gnash::MovieClip::pathElement(), gnash::MovieClip::add_display_object(), gnash::MovieClip::replace_display_object(), gnash::MovieClip::handleFocus(), gnash::MovieClip::trackAsMenu(), gnash::MovieClip::constructAsScriptObject(), gnash::MovieClip::setVariables(), registerMovieClipNative(), registerMovieClipLoaderNative(), mysql_qetData(), registerNetStreamNative(), number_class_init(), registerNumberNative(), registerObjectNative(), initObjectClass(), gnash::Property::getValue(), gnash::Property::setValue(), gnash::PropertyList::setValue(), gnash::PropertyList::setFlags(), gnash::PropertyList::getProperty(), gnash::PropertyList::delProperty(), gnash::PropertyList::addGetterSetter(), gnash::PropertyList::addDestructiveGetter(), registerSelectionNative(), registerSharedObjectNative(), registerSoundNative(), registerStageNative(), registerStringNative(), string_class_init(), gnash::SWF::SymbolClassTag::executeActions(), registerSystemNative(), createTextFieldObject(), registerTextFieldNative(), registerTextFormatNative(), registerTextSnapshotNative(), registerVideoNative(), xml_class_init(), registerXMLNative(), gnash::XMLNode_as::object(), gnash::XMLNode_as::setAttribute(), registerXMLNodeNative(), and registerXMLSocketNative().

VM& gnash::getVM ( const fn_call &  fn) [inline]
VM & gnash::getVM ( const as_object &  o)

Get the VM from an as_object.

References gnash::as_object::vm().

SWFCxForm gnash::getWorldCxForm ( const DisplayObject &  d) [inline]

Get concatenated color transform of a DisplayObject.

Maps from our local space into normal color space.

References gnash::SWFCxForm::concatenate(), and getCxForm().

Referenced by gnash::DisplayObject::MaskRenderer::MaskRenderer().

SWFMatrix gnash::getWorldMatrix ( const DisplayObject &  d,
bool  includeRoot = true 
) [inline]
void gnash::glowfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

The prototype of flash.filters.GlowFilter is a new BitmapFilter.

Initialize the global GlowFilter class.

References registerBitmapClass().

void gnash::gnashSleep ( size_t  useconds) [inline]
bool gnash::GotoFrame ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
void gnash::gradientbevelfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

The prototype of flash.filters.GradientBevelFilter is a new BitmapFilter.

Initialize the global GradientBevelFilter class.

References registerBitmapClass().

void gnash::gradientglowfilter_class_init ( as_object &  where,
const ObjectURI &  uri 
)

The prototype of flash.filters.GradientGlowFilter is a new BitmapFilter.

Initialize the global GradientGlowFilter class.

References registerBitmapClass().

SWFMatrix gnash::gradientMatrix ( GradientFill::Type  t,
const SWFMatrix &  m 
)
as_value gnash::gtkext_button_new_with_label ( const fn_call &  fn)
void gnash::gtkext_class_init ( as_object &  obj)
as_value gnash::gtkext_container_add ( const fn_call &  fn)
as_value gnash::gtkext_container_set_border_width ( const fn_call &  fn)
as_value gnash::gtkext_main ( const fn_call &  fn)
as_value gnash::gtkext_signal_connect ( const fn_call &  fn)
as_value gnash::gtkext_signal_connect_swapped ( const fn_call &  fn)
as_value gnash::gtkext_widget_show ( const fn_call &  fn)
as_value gnash::gtkext_window_new ( const fn_call &  fn)
bool gnash::hasOwnProperty ( as_object &  o,
const ObjectURI &  uri 
) [inline]

Return true if this object has the named property.

Parameters:
oThe object whose property should be searched for.
uriProperty identifier.
Returns:
true if the object has the property, false otherwise.

Referenced by declareLocal().

bool gnash::HasScripting ( ) [inline]
double gnash::infinite_to_zero ( double  x) [inline]

References isFinite().

std::auto_ptr<as_object> gnash::init_dejagnu_instance ( )

Return an instance.

std::auto_ptr< as_object > gnash::init_gtkext_instance ( )

Return an instance.

void gnash::initObjectClass ( as_object *  proto,
as_object &  where,
const ObjectURI &  uri 
)
void gnash::intrusive_ptr_add_ref ( const ref_counted *  o) [inline]
void gnash::intrusive_ptr_release ( const ref_counted *  o) [inline]
bool gnash::invisible ( const SWFCxForm &  cx) [inline]

Returns true when the SWFCxForm leads to alpha == 0.

Not the _alpha property, but the visible alpha related to dislpay. The two might be completely different. eg. mc._alpha ranges in [-32768, 32767], but the alpha on screen ranges in [0, 255]

References gnash::SWFCxForm::aa, and gnash::SWFCxForm::ab.

Referenced by gnash::MovieClip::add_invalidated_bounds().

DSOEXPORT as_value gnash::invoke ( const as_value &  method,
const as_environment &  env,
as_object *  this_ptr,
fn_call::Args &  args,
as_object *  super = 0,
const movie_definition *  callerDef = 0 
) [inline]
bool gnash::is_little_endian_host ( )
bool gnash::isButtonEvent ( const event_id &  e)

Check whether an event is a button-like event.

Parameters:
eThe event to check
Returns:
True if it is

References gnash::event_id::id().

Referenced by gnash::MovieClip::notifyEvent().

bool gnash::isFinite ( double  d) [inline]
template<typename T >
bool gnash::isInf ( const T &  num) [inline]

References isNaN().

Referenced by doubleToString(), and gnash::Date_as::toString().

bool gnash::isKeyEvent ( const event_id &  e)

Check whether an event is a keyboard event.

Parameters:
eThe event to check
Returns:
True if it is

References gnash::event_id::id().

Referenced by gnash::MovieClip::notifyEvent().

bool gnash::isLevelTarget ( int  version,
const std::string &  name,
unsigned int &  levelno 
)

Return true if the given string can be interpreted as a _level name.

Parameters:
nameThe target string. Will be considered case-insensitive if VM version is < 7.
levelnoOutput parameter, will be set to the level number, if true is returned

Referenced by getDisplayObjectProperty().

template<typename T >
bool gnash::isNaN ( const T &  num,
typename boost::enable_if< boost::is_floating_point< T > >::type *  dummy = 0 
) [inline]
template<typename T >
bool gnash::isNativeType ( const as_object *  obj,
T *&  relay 
)

Check whether the object is an instance of a known type.

This is used to check the type of certain objects when it can't be done through ActionScript and properties. Examples include conversion of Date and String objects.

Template Parameters:
TThe expected native type
Parameters:
objThe object whose type should be tested
relayThis points to the native type information if the object is of the expected type
Returns:
If the object is of the expected type, true; otherwise false.

References gnash::key::T.

Referenced by gnash::amf::Writer::writeObject(), gnash::as_value::to_string(), and gnash::as_value::defaultPrimitive().

bool gnash::IsPlaying ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  ,
uint32_t  argCount,
NPVariant *  result 
)
bool gnash::isReferenceable ( const DisplayObject &  d) [inline]
void gnash::key_class_init ( as_object &  where,
const ObjectURI &  uri 
)
as_value gnash::key_get_ascii ( const fn_call &  fn)

Return the ascii number of the last key pressed.

References getRoot(), gnash::movie_root::lastKeyEvent(), gnash::key::codeMap, and gnash::key::ASCII.

Referenced by registerKeyNative().

as_value gnash::key_get_code ( const fn_call &  fn)

Returns the keycode of the last key pressed.

References getRoot(), gnash::movie_root::lastKeyEvent(), gnash::key::codeMap, and gnash::key::KEY.

Referenced by registerKeyNative().

as_value gnash::key_is_accessible ( const fn_call &  )

References _.

Referenced by attachKeyInterface().

as_value gnash::key_is_down ( const fn_call &  fn)

Return true if the specified (first arg keycode) key is pressed.

References gnash::fn_call::nargs, IF_VERBOSE_ASCODING_ERRORS, _, toInt(), gnash::fn_call::arg(), getVM(), gnash::key::KEYCOUNT, getRoot(), keys, and gnash::movie_root::unreleasedKeys().

Referenced by registerKeyNative().

as_value gnash::key_is_toggled ( const fn_call &  )

Given the keycode of NUM_LOCK or CAPSLOCK, returns true if the associated state is on.

References _.

Referenced by registerKeyNative().

rgba gnash::lerp ( const rgba &  a,
const rgba &  b,
float  f 
)
template<typename T >
T gnash::lerp ( a,
b,
f 
) [inline]
double gnash::linearToSRGB ( double  s)

Convert linear RGB colorspace to sRGB.

References gnash::key::a, and gnash::key::s.

Referenced by cdiff().

void gnash::lirc_class_init ( as_object &  obj)
as_value gnash::lirc_ext_getbutton ( const fn_call &  fn)
as_value gnash::lirc_ext_getkey ( const fn_call &  fn)
as_value gnash::lirc_ext_init ( const fn_call &  fn)
bool gnash::LoadMovie ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
void gnash::loadvars_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global LoadVars class.

References registerBuiltinClass().

void gnash::localconnection_class_init ( as_object &  where,
const ObjectURI &  uri 
)
DSOEXPORT std::auto_ptr< IOChannel > gnash::makeFileChannel ( FILE *  fp,
bool  close 
)

Creates an IOChannel wrapper around a C stream.

Parameters:
fpA C stream
closeWhether the C stream should be automatically closed.

Referenced by gnash::StreamProvider::getStream(), and makeFileChannel().

DSOEXPORT std::auto_ptr< IOChannel > gnash::makeFileChannel ( const char *  filepath,
const char *  mode 
)

Creates an IOChannel by opening the given file in the given mode.

Parameters:
filepathA path to a file in the local filesystem.
modeThe mode the file should be opened in, such as "rb" "w+b" (see std::fopen)
Returns:
An IOChannel or NULL if the file could not be opened.

References makeFileChannel().

void gnash::math_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::matrix_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Matrix class.

References gnash::as_object::init_destructive_property().

void gnash::microphone_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Microphone class.

References registerBuiltinClass(), and emptyFunction().

DSOEXPORT bool gnash::mkdirRecursive ( const std::string &  filename)

Create a directory for a given filename.

Everything after the last '/' is assumed to be the filename.

Everything after the last '/' is assumed to be the filename.

Parameters:
filenameFull file path, may be absolute or relative to CWD

References gnash::key::t, and mkdirUserPermissions().

int gnash::mkdirUserPermissions ( const std::string &  dirname) [inline]

Create a directory, granting owner rwx permissions.

On non-POSIX systems, just create the directory.

Parameters:
dirnameDirectory name, may be absolute or relative to CWD

Referenced by mkdirRecursive().

void gnash::mouse_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::movieclip_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::moviecliploader_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::mysql_class_init ( as_object &  obj)
as_value gnash::mysql_connect ( const fn_call &  fn)
as_value gnash::mysql_disconnect ( const fn_call &  fn)
as_value gnash::mysql_fetch ( const fn_call &  fn)
as_value gnash::mysql_fields ( const fn_call &  fn)
as_value gnash::mysql_free ( const fn_call &  fn)
as_value gnash::mysql_qetData ( const fn_call &  fn)
as_value gnash::mysql_query ( const fn_call &  fn)
as_value gnash::mysql_row ( const fn_call &  fn)
as_value gnash::mysql_store ( const fn_call &  fn)
void gnash::netconnection_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::netstream_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::newAdd ( as_value &  op1,
const as_value &  op2,
const VM &  vm 
)

Carry out ActionNewAdd.

VM ops on as_value.

These are currently used in: 1. VM (AVM1) 2. Gnash's C++ implementation of ActionScript.

Usage 2 replicates VM behaviour, but does not use the VM's stack or other resources. This can lead to different behaviour, for instance when there are limits on the stack size. Such cases are probably rare.

Parameters:
op1The as_value to add to.
op2The as_value to add.
vmThe VM executing the operation. TODO: Consider whether it would be better to pass something other than the VM. But it is a VM operation, so it is logically sound.

It doesn't matter if either of these fail.

References gnash::key::r, convertToPrimitive(), gnash::key::e, gnash::as_value::is_string(), gnash::VM::getSWFVersion(), convertToString(), gnash::as_value::set_string(), gnash::as_value::to_string(), toNumber(), and gnash::as_value::set_double().

Referenced by gnash::abc::Machine::execute().

as_value gnash::newLessThan ( const as_value &  op1,
const as_value &  op2,
const VM &  vm 
)

Carry out ActionSubtract.

Parameters:
op1The first comparand.
op2The second comparand.
vmThe VM executing the operation.

References gnash::as_value::to_primitive(), gnash::as_value::NUMBER, gnash::key::e, gnash::as_value::is_object(), gnash::as_value::is_sprite(), gnash::as_value::is_string(), gnash::as_value::to_string(), toNumber(), and isNaN().

Referenced by gnash::abc::Machine::execute().

std::string gnash::NPStringToString ( const NPString &  str) [inline]

Construct a std::string from an NPString.

NPStrings are not guaranteed to be NULL-terminated.

References GetNPStringChars(), and GetNPStringLen().

Referenced by SetVariableCallback(), GetVariableCallback(), remoteCallback(), gnash::plugin::ExternalInterface::convertNPVariant(), printNPVariant(), and main().

void gnash::number_class_init ( as_object &  where,
const ObjectURI &  uri 
)
bool gnash::operator!= ( const SWFCxForm &  a,
const SWFCxForm &  b 
) [inline]

References gnash::key::b.

Transform gnash::operator* ( const Transform &  a,
const Transform &  b 
) [inline]

Concatenate two transforms.

References gnash::key::b.

bool gnash::operator< ( const kerning_pair &  p1,
const kerning_pair &  p2 
) [inline]
bool gnash::operator< ( const event_id &  a,
const event_id &  b 
) [inline]

Comparator for use in stdlib containers.

DSOEXPORT std::ostream & gnash::operator<< ( std::ostream &  os,
const HostMessage &  m 
)

Stream a description of any host interface message type.

References gnash::HostMessage::event().

std::ostream & gnash::operator<< ( std::ostream &  os,
const ConstantPool &  p 
)

References gnash::key::i.

DSOEXPORT std::ostream & gnash::operator<< ( std::ostream &  os,
const CustomMessage &  m 
)
DSOEXPORT std::ostream & gnash::operator<< ( std::ostream &  os,
HostMessage::KnownEvent  e 
)

Stream a description of an expected message.

References gnash::key::a, and gnash::key::e.

std::ostream & gnash::operator<< ( std::ostream &  os,
const rgba &  r 
)
std::ostream & gnash::operator<< ( std::ostream &  os,
const SWFCxForm &  cx 
)
std::ostream & gnash::operator<< ( std::ostream &  o,
const CallFrame &  fr 
)
std::ostream & gnash::operator<< ( std::ostream &  o,
const event_id &  ev 
)
std::ostream& gnash::operator<< ( std::ostream &  os,
const PropFlags &  fl 
) [inline]
DSOEXPORT std::ostream & gnash::operator<< ( std::ostream &  os,
const BitmapFill::SmoothingPolicy &  p 
)

Output operator for bitmap smoothing policy.

References gnash::key::p.

std::ostream & gnash::operator<< ( std::ostream &  o,
GradientFill::Type  t 
)

Output operator for GradientFill type.

std::ostream& gnash::operator<< ( std::ostream &  os,
const SWFRect &  r 
) [inline]
std::ostream & gnash::operator<< ( std::ostream &  o,
GradientFill::SpreadMode  t 
)

Output operator for GradientFill spread mode.

std::ostream & gnash::operator<< ( std::ostream &  o,
GradientFill::InterpolationMode  t 
)

Output operator for GradientFill interpolation mode.

std::ostream & gnash::operator<< ( std::ostream &  os,
const FillStyle &  fs 
)

Output operator for FillStyles.

References gnash::FillStyle::fill.

std::ostream & gnash::operator<< ( std::ostream &  o,
const SWFMatrix &  m 
)
std::ostream& gnash::operator<< ( std::ostream &  o,
const CharacterDictionary &  cd 
)
DSOEXPORT std::ostream & gnash::operator<< ( std::ostream &  o,
const URL &  u 
)

References gnash::URL::str().

std::ostream & gnash::operator<< ( std::ostream &  os,
const DisplayList &  dl 
)
std::ostream & gnash::operator<< ( std::ostream &  o,
const Button::MouseState &  st 
)
std::ostream & gnash::operator<< ( std::ostream &  o,
const as_value &  v 
)
std::ostream & gnash::operator<< ( std::ostream &  o,
DisplayObject::BlendMode  bm 
)

Stream operator for DisplayObject blend mode.

bool gnash::operator== ( const SWFCxForm &  a,
const SWFCxForm &  b 
) [inline]
bool gnash::operator== ( const event_id &  a,
const event_id &  b 
) [inline]

Return whether two event_ids are equal.

event_ids are equal if both id and keycode match. Keycode is only relevant for keyboard events, and must be key::INVALID for other event types.

bool gnash::operator== ( const SWFMatrix &  a,
const SWFMatrix &  b 
) [inline]

References gnash::SWFMatrix::a().

bool gnash::Pan ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
bool gnash::parseNonDecimalInt ( const std::string &  s,
double &  d,
bool  whole = true 
)

Try to parse a string into a 32-bit signed int using base 8 or 16. // This function will throw a boost::bad_lexical_cast (or a derived exception) if the passed string cannot be converted.

Parameters:
sThe string to parse
dThe 32-bit int represented as a double. This is only a valid number if the return value is true.
wholeIf true, expect the whole string to be valid, i.e. throw if there are any invalid DisplayObjects. If false, returns any valid number up to the first invalid DisplayObject.
Returns:
True if the string was non-decimal and successfully parsed.

References start, and gnash::key::d.

Referenced by gnash::as_value::to_number().

bool gnash::parsePath ( const std::string &  var_path,
std::string &  path,
std::string &  var 
)

See if the given variable name is actually a sprite path followed by a variable name. These come in the format:

/path/to/some/sprite/:varname

(or same thing, without the last '/')

or path.to.some.var

If that's the format, puts the path part (no colon or trailing slash) in *path, and the varname part (no colon, no dot) in *var and returns true.

If no colon or dot, returns false and leaves *path & *var alone.

TODO: return an integer: 0 not a path, 1 a slash-based path, 2 a dot-based path

References gnash::key::p, and test::v.

Referenced by getVariable(), setVariable(), and gnash::DumpGui::run().

bool gnash::PercentLoaded ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  ,
uint32_t  argCount,
NPVariant *  result 
)
boost::int32_t gnash::pixelsToTwips ( double  a) [inline]
bool gnash::Play ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  ,
uint32_t  argCount,
NPVariant *  result 
)
void gnash::point_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Point class.

References gnash::as_object::init_destructive_property().

void gnash::printNPVariant ( const NPVariant *  value)
DSOEXPORT void gnash::processLog_abc ( const boost::format &  fmt)
DSOEXPORT void gnash::processLog_action ( const boost::format &  fmt)
DSOEXPORT void gnash::processLog_aserror ( const boost::format &  fmt)

References gnash::LogFile::log(), and N_.

DSOEXPORT void gnash::processLog_debug ( const boost::format &  fmt)
DSOEXPORT void gnash::processLog_error ( const boost::format &  fmt)

References gnash::LogFile::log(), and N_.

DSOEXPORT void gnash::processLog_network ( const boost::format &  fmt)

References gnash::LogFile::log(), and N_.

DSOEXPORT void gnash::processLog_parse ( const boost::format &  fmt)

References gnash::LogFile::log().

DSOEXPORT void gnash::processLog_security ( const boost::format &  fmt)

References gnash::LogFile::log(), and N_.

DSOEXPORT void gnash::processLog_swferror ( const boost::format &  fmt)

References gnash::LogFile::log(), and N_.

DSOEXPORT void gnash::processLog_trace ( const boost::format &  fmt)

References gnash::LogFile::log(), and N_.

DSOEXPORT void gnash::processLog_unimpl ( const boost::format &  fmt)

References gnash::LogFile::log(), and N_.

SWFCxForm gnash::readCxFormRGB ( SWFStream &  in)
SWFCxForm gnash::readCxFormRGBA ( SWFStream &  in)
OptionalFillPair gnash::readFills ( SWFStream &  in,
SWF::TagType  t,
movie_definition &  m,
bool  readMorph 
)
boost::uint32_t gnash::readLong ( const boost::uint8_t *  buf) [inline]

References gnash::key::s.

bool gnash::readOnly ( const Property &  prop) [inline]
SWFRect gnash::readRect ( SWFStream &  in)

Read a bit-packed rectangle from an SWF stream.

Format of the bit-packed rectangle is:

bits | name | description ------+-------+------------------------- 5 | nbits | number of bits used in subsequent values nbits | xmin | minimum X value nbits | xmax | maximum X value nbits | ymin | minimum Y value nbits | ymax | maximum Y value

If max values are less then min values the SWF is malformed; in this case this method will raise an swf_error and set the rectangle to the NULL rectangle. See is_null().

References gnash::SWFStream::align(), gnash::SWFStream::ensureBits(), gnash::SWFStream::read_uint(), gnash::SWFStream::read_sint(), IF_VERBOSE_MALFORMED_SWF, and _.

Referenced by gnash::SWF::DefineScalingGridTag::loader(), gnash::SWF::ShapeRecord::read(), and gnash::SWFMovieDefinition::readHeader().

rgba gnash::readRGB ( SWFStream &  in)
rgba gnash::readRGBA ( SWFStream &  in)
SWFMatrix gnash::readSWFMatrix ( SWFStream &  in)
void gnash::rectangle_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Rectangle class.

References gnash::as_object::init_destructive_property().

void gnash::registerAccessibilityNative ( as_object &  global)
void gnash::registerArrayNative ( as_object &  global)
void gnash::registerBitmapClass ( as_object &  where,
Global_as::ASFunction  ctor,
Global_as::Properties  p,
const ObjectURI &  uri 
)
void gnash::registerBitmapDataNative ( as_object &  global)
void gnash::registerBitmapFilterNative ( as_object &  global)
void gnash::registerBooleanNative ( as_object &  global)
as_object* gnash::registerBuiltinClass ( as_object &  where,
Global_as::ASFunction  ctor,
Global_as::Properties  p,
Global_as::Properties  c,
const ObjectURI &  uri 
) [inline]

Register a built-in class.

This is used for classes that are part of the player API. In the reference player these classes are always constructed in ActionScript, though their functions may be native, and the constructor may also call native functions.

Parameters:
ca pointer to a function that will attach properties to the class itself. These are known as static properties.
pa pointer to a function that will attach properties to the class prototype. These are instance properties.
ctorthe constructor function for the new class.
wherethe object to which the created object will be attached
urian ObjectURI describing the name and namespace of the created object.
Returns:
the built-in class with prototype and properties attached.

References getGlobal(), createObject(), gnash::key::c, gnash::key::p, gnash::as_object::init_member(), and gnash::as_object::DefaultFlags.

Referenced by gnash::AsBroadcaster::init(), camera_class_init(), color_class_init(), contextmenu_class_init(), contextmenuitem_class_init(), Error_class_init(), filereferencelist_class_init(), loadvars_class_init(), localconnection_class_init(), microphone_class_init(), netconnection_class_init(), netstream_class_init(), textrenderer_class_init(), textsnapshot_class_init(), and xmlsocket_class_init().

as_object* gnash::registerBuiltinObject ( as_object &  where,
Global_as::Properties  p,
const ObjectURI &  uri 
) [inline]

Register a built-in object.

This is used for simple objects that are part of the player API. In the reference player these objects are always constructed in ActionScript, though their functions may be native. They include (AS2) Mouse, Selection and Stage, and (AS3) all constant enumeration objects.

Parameters:
pa pointer to a function that will attach properties to the object
wherethe object to which the created object will be attached
urian ObjectURI describing the name and namespace of the created object.
Returns:
the built-in object with properties attached.

References getGlobal(), createObject(), gnash::key::p, gnash::as_object::init_member(), and gnash::as_object::DefaultFlags.

Referenced by key_class_init(), math_class_init(), mouse_class_init(), selection_class_init(), stage_class_init(), and system_class_init().

void gnash::registerButtonNative ( as_object &  global)
void gnash::registerCameraNative ( as_object &  global)
void gnash::registerColorNative ( as_object &  o)
void gnash::registerColorTransformNative ( as_object &  global)
void gnash::registerDateNative ( as_object &  global)
void gnash::registerExternalInterfaceNative ( as_object &  global)
void gnash::registerFunctionNative ( as_object &  global)

Register Function native functions.

References getVM(), and gnash::VM::registerNative().

void gnash::registerKeyNative ( as_object &  global)
void gnash::registerLoadableNative ( as_object &  o)

Register methods as native for use by XML_as and LoadVars_as.

This is only automatically used in LoadVars.

References getVM(), and gnash::VM::registerNative().

void gnash::registerLocalConnectionNative ( as_object &  global)
void gnash::registerMathNative ( as_object &  proto)
void gnash::registerMicrophoneNative ( as_object &  global)
void gnash::registerMovieClipLoaderNative ( as_object &  global)
void gnash::registerMovieClipNative ( as_object &  where)

Register ASNative MovieClip methods (AS2 only).

References getVM(), gnash::VM::registerNative(), and gnash::DisplayObject::blendMode().

void gnash::registerNetStreamNative ( as_object &  global)
void gnash::registerNumberNative ( as_object &  global)
void gnash::registerObjectNative ( as_object &  global)
void gnash::registerSelectionNative ( as_object &  global)

Register native selection methods.

References getVM(), and gnash::VM::registerNative().

void gnash::registerSharedObjectNative ( as_object &  o)
void gnash::registerSoundNative ( as_object &  global)
void gnash::registerStageNative ( as_object &  o)

This is the Stage ActionScript object.

Some Stage methods are implemented in movie_root, because it provides the interface to the Gui and/or all the values required are necessarily in movie_root:

  • scaleMode
  • width
  • height
  • displayState
  • alignMode Most functions are ASnative, which means they cannot rely on the existence of a load-on-demand Stage object. Only resize events appear to need this (not ASnative). The ASnative functions are available from SWF5 Register native functions with the VM.

References getVM(), and gnash::VM::registerNative().

void gnash::registerStringNative ( as_object &  global)
void gnash::registerSystemNative ( as_object &  where)
void gnash::registerTextFieldNative ( as_object &  global)
void gnash::registerTextFormatNative ( as_object &  o)
void gnash::registerTextSnapshotNative ( as_object &  global)
void gnash::registerVideoNative ( as_object &  global)
void gnash::registerXMLNative ( as_object &  where)

Register XML native functions.

References getVM(), and gnash::VM::registerNative().

void gnash::registerXMLNodeNative ( as_object &  where)

Register ASnative methods.

References getVM(), and gnash::VM::registerNative().

void gnash::registerXMLSocketNative ( as_object &  global)
bool gnash::remoteCallback ( NPObject *  npobj,
NPIdentifier  name,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
gboolean gnash::remove_handler ( GIOChannel *  ,
GIOCondition  ,
gpointer   
)
bool gnash::Rewind ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  ,
uint32_t  argCount,
NPVariant *  result 
)
void gnash::selection_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Selection class.

Handles addListener, removeListener, and _listeners.

References gnash::key::o, registerBuiltinObject(), gnash::AsBroadcaster::initialize(), getGlobal(), and gnash::NSV::PROP_AS_SET_PROP_FLAGS.

void gnash::sendEvent ( as_object &  o,
const as_environment &  env,
const ObjectURI &  name 
)

Send a system event.

This is used for broadcasting system events. The prototype search is carried out, but there is no call to __resolve and triggers are not processed. The function is called with no arguments.

Parameters:
oThe object to send the event to.
envThe environment to use, generally provided by the calling DisplayObject
nameThe name of the function to call.

References gnash::as_object::findProperty(), invoke(), gnash::Property::getValue(), and gnash::key::o.

Referenced by gnash::Button::mouseEvent(), and gnash::MovieClip::notifyEvent().

bool gnash::setDisplayObjectProperty ( DisplayObject &  obj,
const ObjectURI &  uri,
const as_value &  val 
)

Set special properties.

This sets the magic properties of DisplayObjects.

Parameters:
keyThe string table key of the property to set.
objThe DisplayObject whose property should be set
valAn as_value representing the new value of the property. Some values may be rejected.

Referenced by gnash::as_object::set_member().

void gnash::setHeight ( DisplayObject &  o,
const as_value &  val 
)
void gnash::setIndexedProperty ( size_t  index,
DisplayObject &  o,
const as_value &  val 
)

Set a property by its numeric index.

Used by ASHandlers to set the DisplayObject properties indexed by number

Parameters:
indexThe index of the property to set.
oThe DisplayObject whose property should be set
valAn as_value representing the new value of the property. Some values may be rejected.

References gnash::key::s, gnash::as_value::is_undefined(), gnash::as_value::is_null(), IF_VERBOSE_ASCODING_ERRORS, _, gnash::DisplayObject::getTarget(), and gnash::key::o.

void gnash::setLerp ( LineStyle &  s,
const LineStyle &  ls1,
const LineStyle &  ls2,
double  ratio 
) [inline]
void gnash::setLerp ( FillStyle &  f,
const FillStyle &  a,
const FillStyle &  b,
double  t 
)

Set the FillStyle to a lerp of a and b.

Callers must ensure that all FillStyles have exactly the same type! Most errors are caught by type-checking and will throw an unhandled exception.

References assert, and gnash::FillStyle::fill.

void gnash::setLocal ( CallFrame &  c,
const ObjectURI &  name,
const as_value &  val 
)

Set a local variable in this CallFrame.

If the variable does not already exist, it is created.

Parameters:
cThe CallFrame to set the variable in.
nameThe name of the variable to set.
valThe value to set the variable to.

References gnash::CallFrame::locals(), gnash::as_object::getOwnProperty(), gnash::Property::setValue(), and gnash::as_object::set_member().

Referenced by gnash::ActionExec::setLocalVariable(), gnash::Function::call(), and gnash::Function2::call().

void gnash::setNaN ( as_value &  v) [inline]

Set a value to NaN.

Referenced by gnash::abc::Machine::execute().

void gnash::setVariable ( const as_environment &  ctx,
const std::string &  path,
const as_value &  val,
const as_environment::ScopeStack &  scope 
)

Given a path to variable, set its value.

If no variable with that name is found, a new one is created.

For path-less variables, this would act as a proxy for set_variable_raw.

Parameters:
ctxTimeline context to use for variable finding.
pathVariable path.
valThe value to assign to the variable.
scopeThe Scope stack to use for lookups.

References IF_VERBOSE_ACTION, _, path, parsePath(), findObject(), gnash::as_object::set_member(), getURI(), gnash::as_environment::getVM(), and IF_VERBOSE_ASCODING_ERRORS.

bool gnash::SetVariableCallback ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
bool gnash::SetZoomRect ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
void gnash::sharedobject_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::sound_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::stage_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Stage class.

References registerBuiltinObject(), and gnash::AsBroadcaster::initialize().

bool gnash::StopPlay ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  ,
uint32_t  argCount,
NPVariant *  result 
)
void gnash::string_class_init ( as_object &  where,
const ObjectURI &  uri 
)
DSOEXPORT const char * gnash::string_of_FOURCC ( boost::uint32_t  fourcc)
DSOEXPORT const char * gnash::string_of_VAEntrypoint ( VAEntrypoint  entrypoint)

Return a string representation of a VAEntrypoint.

References ENTRYPOINT.

DSOEXPORT const char * gnash::string_of_VAProfile ( VAProfile  profile)

Return a string representation of a VAProfile.

References PROFILE.

Referenced by gnash::VaapiContext::VaapiContext().

DSOEXPORT short gnash::stringToStageAlign ( const std::string &  str)

Referenced by gnash::Player::run().

void gnash::subtract ( as_value &  op1,
const as_value &  op2,
const VM &  vm 
)

Carry out ActionSubtract.

Parameters:
op1The as_value to subtract from.
op2The as_value to subtract.
vmThe VM executing the operation.

References toNumber(), and gnash::as_value::set_double().

Referenced by gnash::abc::Machine::execute().

void gnash::system_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global System class.

References registerBuiltinObject().

void gnash::terminate_signal ( int  )

References terminate_request.

Referenced by gnash::DumpGui::init().

void gnash::textfield_class_init ( as_object &  where,
const ObjectURI &  uri 
)

This provides the prototype and static methods for TextField.

Initialize the global TextField class.

For SWF5 there is initially no prototype, for SWF6+ there is a limited prototype. This is changed later on instantiation of a TextField.

References getGlobal(), createObject(), gnash::Global_as::createClass(), gnash::as_object::init_member(), gnash::as_object::DefaultFlags, and gnash::NSV::PROP_AS_SET_PROP_FLAGS.

void gnash::textformat_class_init ( as_object &  global,
const ObjectURI &  uri 
)
void gnash::textrenderer_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global TextRenderer class.

References registerBuiltinClass().

void gnash::textsnapshot_class_init ( as_object &  where,
const ObjectURI &  uri 
)
bool gnash::toBool ( const as_value &  v,
const VM &  vm 
)

Convert an as_value to boolean type.

Parameters:
valThe value to return as a boolean
vmThe VM to use for the conversion.
Returns:
The boolean value of the passed as_value.

References gnash::as_value::to_bool(), and gnash::VM::getSWFVersion().

Referenced by gnash::Button::trackAsMenu(), gnash::Button::isEnabled(), gnash::DisplayObject::allowHandCursor(), fileio_asyncmode(), gnash::MovieClip::handleFocus(), and gnash::MovieClip::trackAsMenu().

SWFCxForm gnash::toCxForm ( const ColorTransform_as &  tr)
boost::int32_t gnash::toInt ( const as_value &  val,
const VM &  vm 
)

AS2-compatible conversion to 32bit integer.

This truncates large numbers to fit in the 32-bit space. It is not a proper function of as_value because it is simply a further operation on the stored number type. This function calls to_number(), so performs a conversion if necessary.

Parameters:
valThe value to return as an int.
vmThe VM to use for the conversion.
Returns:
The integer value of the passed as_value.

References gnash::key::d, gnash::as_value::to_number(), gnash::VM::getSWFVersion(), and isFinite().

Referenced by checkArrayLength(), arrayLength(), key_is_down(), and gnash::abc::Machine::execute().

double gnash::toNumber ( const as_value &  v,
const VM &  vm 
)

Convert an as_value to a double.

Parameters:
valThe value to return as a double
vmThe VM to use for the conversion.
Returns:
The double value of the passed as_value.

References gnash::as_value::to_number(), and gnash::VM::getSWFVersion().

Referenced by toSWFMatrix(), gnash::DisplayObject::blendMode(), setHeight(), fileio_fputc(), fileio_fseek(), gnash::abc::Machine::execute(), gnash::MovieClip::get_frame_number(), newAdd(), subtract(), and newLessThan().

as_object * gnash::toObject ( const as_value &  v,
VM &  vm 
)

Convert an as_value to an object.

Parameters:
valThe value to return as an object
vmThe VM to use for the conversion.
Returns:
The Object representation value of the passed as_value.

References gnash::as_value::to_object().

Referenced by gnash::as_object::instanceOf(), gnash::as_object::get_prototype(), getPathElement(), getObjectWithPrototype(), gnash::AsBroadcaster::initialize(), color_class_init(), gnash::Global_as::createArray(), invoke(), gnash::MovieClip::pathElement(), mysql_qetData(), and gnash::XMLNode_as::object().

const std::string& gnash::toString ( VM &  vm,
const ObjectURI &  uri 
) [inline]
SWFMatrix gnash::toSWFMatrix ( as_object &  m)
bool gnash::TotalFrames ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  ,
uint32_t  argCount,
NPVariant *  result 
)
void gnash::transform_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global Transform class.

References gnash::as_object::init_destructive_property().

template<size_t Factor>
boost::int32_t gnash::truncateWithFactor ( double  a)
double gnash::twipsToPixels ( int  i) [inline]
FileType gnash::typeFromFileName ( const std::string &  filename)

Guess an appropriate file type from the filename.

If none can be guessed, we use png.

References GNASH_FILETYPE_PNG, GNASH_FILETYPE_JPEG, and gnash::key::i.

template<class T >
std::string gnash::typeName ( const T &  inst)
void gnash::unescapeXML ( std::string &  text)

References gnash::key::i, and gnash::key::e.

bool DSOEXPORT gnash::vaapi_check_status ( VAStatus  status,
const char *  msg 
)
void DSOEXPORT gnash::vaapi_dprintf ( const char *  format,
  ... 
)

Debug output.

Referenced by vaapi_check_status().

bool DSOEXPORT gnash::vaapi_is_enabled ( )

Check whether video acceleration is enabled.

Referenced by gnash::media::ffmpeg::VaapiContextFfmpeg::create().

void DSOEXPORT gnash::vaapi_set_is_enabled ( bool  enabled)

Enable video acceleration (with VA API)

Referenced by gnash_canvas_setup(), and gnash::VaapiGlobalContext::get().

void gnash::video_class_init ( as_object &  global,
const ObjectURI &  uri 
)
bool gnash::visible ( const Property &  prop,
int  version 
) [inline]

Is this member supposed to be visible by a VM of given version ?

Referenced by gnash::as_object::set_member(), gnash::as_object::get_prototype(), and gnash::IsVisible::operator()().

void gnash::wait_for_gdb ( )
void gnash::writeLong ( boost::uint8_t *&  ptr,
boost::uint32_t  i 
)
void gnash::xml_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::xmlnode_class_init ( as_object &  where,
const ObjectURI &  uri 
)
void gnash::xmlsocket_class_init ( as_object &  where,
const ObjectURI &  uri 
)

Initialize the global XMLSocket class.

References registerBuiltinClass().

bool gnash::Zoom ( NPObject *  npobj,
NPIdentifier  ,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)

Variable Documentation

struct lirc_config* gnash::config
static LogFile & gnash::dbglogfile = LogFile::getDefaultInstance()

Referenced by gnash::EventDevice::init(), and main().

const int gnash::GNASH_HIDDEN = 'GHID'
const int gnash::GNASH_KEY_EVENT = 'GKKE'
const int gnash::GNASH_MOUSE_CLICKED = 'GMCL'
const int gnash::GNASH_MOUSE_MOVED = 'GMMV'
const int32 gnash::GNASH_PULSE = 'GPLS'
const int32 gnash::GNASH_QUITTING = 'GQUI'
const int gnash::GNASH_RESIZE = 'GRSZ'
const int32 gnash::GNASH_SEND_PULSE = 'GSPL'
const int gnash::GNASH_SET_FULLSCREEN = 'GSFS'
const int gnash::GNASH_SHOWN = 'GSHN'
const int gnash::GNASH_UNSET_FULLSCREEN = 'GUFS'
WindowRef gnash::myWindow = NULL
NPBool gnash::plugInitialized = FALSE
std::sig_atomic_t gnash::terminate_request = false