1
// flash_pkg.cpp: ActionScript "flash" package, for Gnash.
3
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
// This program is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation; either version 3 of the License, or
8
// (at your option) any later version.
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#include "VM.h" // for getPlayerVersion()
22
#include "Object.h" // for getObjectInterface
23
#include "as_object.h"
25
#include "flash/display_pkg.h"
26
#include "flash/external_pkg.h"
27
#include "flash/filters_pkg.h"
28
#include "flash/geom_pkg.h"
29
#include "flash/net_pkg.h"
30
#include "flash/text_pkg.h"
35
get_flash_package(const fn_call& /*fn*/)
37
log_debug("Loading flash package");
39
as_object* pkg = new as_object(getObjectInterface());
42
// TODO: use a destructive getter-setter for these
43
flash_display_package_init(*pkg);
44
flash_external_package_init(*pkg);
45
flash_filters_package_init(*pkg);
46
flash_geom_package_init(*pkg);
47
flash_net_package_init(*pkg);
48
flash_text_package_init(*pkg);
54
flash_package_init(as_object& global)
56
string_table& st = global.getVM().getStringTable();
57
global.init_destructive_property(st.find("flash"), get_flash_package,
58
as_prop_flags::dontEnum|as_prop_flags::onlySWF8Up);
61
} // end of gnash namespace